Database Reference
In-Depth Information
giant results. Much of the time, however, you don't actually care about those
giant results. For example, you might want to read some of the data from the
table, so you run a “ SELECT * ” query on the table. If that table is 100 TB,
you've just filled up the equivalent of dozens of hard drives just to read a few
rows.
Sometimes, however, you really do want to run a query that generates a lot
of output data. The way to tell BigQuery you're serious about wanting all
that data is to set allowLargeResults to true in the query configuration.
Note that because you're going to be writing out a lot of data, BigQuery
wants to make sure you know in advance where that data is supposed
to
go.
As
a
consequence, allowLargeResults requires
the
destinationTable parameter to be set on the job.
Query Priorities
By default, queries run at an INTERACTIVE priority, which is the highest
priority level. However, sometimes you might not need the results of a
query immediately. Maybe you're building a dashboard or computing some
intermediate tables that will be queried later. In this case, you can specify
BATCH as the query priority.
The advantage to running your query at BATCH priority is that you will not
be subject to the same query limitations as when you run interactive queries.
When you run a query at INTERACTIVE priority, BigQuery assumes there is
someone waiting for the answer who will be grumpy if he doesn't get it soon,
so if it can't process the query quickly, it will return an error. When running
at BATCH priority, BigQuery tries to run the query if at all possible, even if it
is going to take a long time.
There are a number of query quotas, described in the next section, designed
to keep one user from taking too many compute resources at once. Batch
queries are not subject to concurrent query quotas; however, if BigQuery
can't run your query quickly or soon, it will just queue it up and run it when
there is available space. This makes it easy to create a lot of batch queries at
once without having to worry about rate limits.
Query Billing and Quotas
When you run a BigQuery query, you may be using several thousand
machines and hundreds of thousands of disks. That hardware is expensive
Search WWH ::




Custom Search