Google has announced a new feature for BigQuery called "short query optimized mode," designed to significantly reduce latency for small queries. This update, currently in preview, aims to enhance performance for common workloads such as dashboards and data exploration.
Key Features of Short Query Optimized Mode
- Automatic Optimization: BigQuery automatically determines which queries can be accelerated.
- Inline Execution: For eligible SELECT statements, results are returned inline without creating a job.
- Lower Latency: Designed to improve overall response time for short queries.
- Query Result Cache: Includes a cache to improve performance of repeated queries when data remains unchanged.
How to Enable
- Set the
jobCreationModefield toJOB_CREATION_OPTIONALin thejobs.queryrequest body.
Important Notes
- No
jobReferenceis returned for optimized queries; instead, aqueryIdis provided. - Use
INFORMATION_SCHEMA.JOBSview to get insights about optimized queries. - BigQuery may still create a job if necessary, returning a
jobReferencein such cases. - The
useQueryCacheparameter (default: true) can be used alongside this feature for potential additional performance gains.
Impact on Developers
- Developers should check for the presence of
jobReferencein responses, as it may not always be available. - The
job_creation_reasonfield inINFORMATION_SCHEMA.JOBScan help understand why a job was created for a query.
This update represents Google's ongoing efforts to improve BigQuery's performance and efficiency, particularly for scenarios involving frequent, small-scale queries.
How to Run a Short Query Optimized Query
- Go to the BigQuery page.
- Click SQL QUERY (add_box icon).
- In the query editor, enter a valid GoogleSQL query
- Click settings More, and then click Short query optimized under Choose query mode. Click CONFIRM to confirm the choice.










