runt18 / google-bigquery

Automatically exported from code.google.com/p/google-bigquery
0 stars 0 forks source link

Add range-directed implicit table queries #372

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
BQ encourages aggressive, reasoned table partitioning.
Approaches typically involve segregating values or value ranges from particular 
columns into their own tables.
A good result is a relatively large number of tables containing well-defined, 
mostly non-overlapping subsets of the overall dataset.
Common queries should be able to immediately eliminate large numbers of queries 
from the scan set based on knowledge of the partitioning.

It would be a great convenience if BQ tracked column value ranges for tables 
and incorporated this into an automatic table selection capability. Tables 
would be automatically included/excluded from a search based on whether 
conditionals in the query overlapped the range of values known to be in each 
table.

So, for example, I could do things like:

SELECT * FROM my_dataset WHERE timestamp > '2015-11-13' AND timestamp < 
'2015-11-15';

and only tables in my_project that overlapped the timestamp condition would be 
considered.

We are finding ourselves creating and maintaining a reasonable amount of 
meta-infrastructure to turn ranges into tables sets to drive queries, when it 
seems this information should be pretty readily available from the table loads 
themselves. 

Original issue reported on code.google.com by jo...@cedexis.com on 24 Nov 2015 at 10:04

GoogleCodeExporter commented 8 years ago
Thanks for the feature request - better support for exactly this type of use 
case is coming.  Please keep an eye on http://googlecloudplatform.blogspot.com/ 
for launch announcements.

Original comment by thomasp...@google.com on 25 Nov 2015 at 11:57

GoogleCodeExporter commented 8 years ago
The better support for this use case... are you referring to the TABLE_QUERY 
functions, or is there something else down the road ? In essence this request 
is more or less partition pruning in an optimizer.

Original comment by nick.u...@nytimes.com on 8 Feb 2016 at 1:18

GoogleCodeExporter commented 8 years ago
Your suggestion is a good one, and we expect to provide something similarly 
intuitive to the user. We'll be able to provide more details in the near future.

Original comment by epa...@google.com on 8 Feb 2016 at 4:39

GoogleCodeExporter commented 8 years ago
Your suggestion is a good one, and we expect to provide something similarly 
intuitive to the user. We'll be able to provide more details in the near future.

Original comment by epa...@google.com on 8 Feb 2016 at 4:39