Enabling the advanced runtime in BigQuery now includes short query optimizations, a preview feature that dynamically identifies queries suitable to run as a single stage. This reduces latency and slot consumption by avoiding the usual distributed shuffle layer. Single-stage execution also allows more effective use of specialized encodings. These optimizations work best with optional job creation mode, which minimizes job startup, maintenance, and result retrieval latency.
Eligibility for Short Query Optimization
The decision to apply short query optimization depends on several dynamic factors:
- Predicted size of the data scan
- Amount of data movement required
- Selectivity of query filters
- Type and physical layout of stored data
- Overall query structure
- Historical statistics from past query executions
Enabling the Advanced Runtime
To enable the advanced runtime for a project or organization, use the ALTER PROJECT
or ALTER ORGANIZATION
SQL statement, setting the query_runtime
option to 'advanced'
. For example:
ALTER PROJECT PROJECT_NAME
SET OPTIONS (
`region-LOCATION.query_runtime` = 'advanced'
);
Replace PROJECT_NAME
with your project name and LOCATION
with the project location. It may take several minutes for the change to take effect. Once enabled, qualifying queries use the advanced runtime regardless of the user who created the query job.
Disabling the Advanced Runtime
To disable the advanced runtime, use a similar ALTER
statement but set query_runtime
to NULL
:
ALTER PROJECT PROJECT_NAME
SET OPTIONS (
`region-LOCATION.query_runtime` = NULL
);
Again, replace PROJECT_NAME
and LOCATION
accordingly. The change also takes several minutes to propagate.