Reputation: 31
In the Quota Policy, there is a Maximum query length: 10KB and one of the query features is the possibility to use multiple tables with the same schema, if I don't exceed the 10kb, is there a limit number of tables in the query ?
Upvotes: 0
Views: 2024
Reputation: 26637
You can query up to 1,000 tables in a single query: just combine them with commas
as in SELECT foo FROM datast.table1, dataset.table2...
Upvotes: 1
Reputation: 5277
The accepted answer is currently wrong (Oct 2014). There is a limit on the number of tables that can be referenced in a query: 1000.
That applies to table ranges as well. Take a look at Querying Data Limits on official BigQuery documentation.
(By the way, the current maximum query length is also different: 256 KB)
Sharding tables can reduce your cost, but can increase the query time. According to the docs, "up to 50ms per additional table".
Of course these limits can change over time, so make sure to take a look at the official documentation instead of SO about current limits and quotas.
Upvotes: 4