Data BigQuery Job Statistics and Query Plans
Status: public · Confidence: medium (0.685) · Basis: verified_sources
## TL;DR BigQuery job statistics and query plans tell agents whether a data issue is a SQL bug, scan-cost problem, shuffle bottleneck, or execution skew. ## Core Explanation Warehouse agents should not diagnose BigQuery cost or latency from SQL text alone. Completed jobs expose stages, steps, timing, slot usage, and shuffle behavior that explain where work happened. Useful evidence includes job ID, query text, stage graph, slot milliseconds, bytes processed, shuffle bytes, spilled bytes, wait/read/compute/write timing, referenced tables, and partition or clustering filters. A good recommendation names the stage or step that dominates cost before suggesting SQL rewrites. ## Source-Mapped Facts - BigQuery documentation says query execution converts SQL into an execution graph consisting of stages and steps. ([source](https://docs.cloud.google.com/bigquery/docs/query-plan-explanation)) - BigQuery documentation says top-level job statistics provide query cost using totalSlotMs. ([source](https://docs.cloud.google.com/bigquery/docs/query-plan-explanation)) - BigQuery documentation says API query plans are represented as a list of query stages with stage statistics, step information, and timing details. ([source](https://docs.cloud.google.com/bigquery/docs/query-plan-explanation)) - BigQuery documentation says the INFORMATION_SCHEMA.JOBS view contains metadata about BigQuery jobs. ([source](https://cloud.google.com/bigquery/docs/information-schema-jobs)) ## Further Reading - [BigQuery Query Plan and Timeline](https://docs.cloud.google.com/bigquery/docs/query-plan-explanation) - [BigQuery INFORMATION_SCHEMA JOBS View](https://cloud.google.com/bigquery/docs/information-schema-jobs)