We can create a table partitioned by Partitioning Field. Doc Reference here.
I created a table visitors that contains 2 fields:
- visitor: STRING
- part: TIMESTAMP <-- this is the Partitioning Field
When I query the table:
SELECT
*
FROM
mydataset.visitors
WHERE
part >= "2018-03-14 09:00:00"
AND part < "2018-03-15 18:00:00"
Questions:
- Is the BigQuery engine smart enough to scan only the 2 partitions 2018-03-14 and 2018-03-15, then find all rows that satisfy the hour range?
- Or does BigQUery do a full scan of all partitions?
Thanks