Skip to content

Diagnosing why a query is slow and fixing it

BigQuery query performance issues typically stem from scanning too much data, inefficient joins, or poor use of partitioning and clustering. Troubleshooting relies on the Query Execution Details/Execution Graph and INFORMATION_SCHEMA views to pinpoint bottlenecks like shuffling, slot contention, or stage skew.

1 · Learn the must-know

  • Use the Execution Details tab (query plan) in the BigQuery console to identify slow stages, high wait/read/compute times, and data skew between workers.
  • Avoid SELECT * and instead select only needed columns, since BigQuery is columnar and charges/scans based on columns accessed, not rows.
  • Filter and JOIN on partitioned and clustered columns (e.g., a DATE partition column) to enable partition pruning and reduce bytes scanned.
  • Large joins should have the biggest table first/on the left and use appropriate join keys to minimize shuffle; avoid CROSS JOINs and unnecessary self-joins.
  • Repeated queries against the same data can benefit from BigQuery's automatic caching or materialized views to avoid redundant scans and computation.
  • Check INFORMATION_SCHEMA.JOBS_BY_* views for slot utilization, shuffle bytes, and query stats to detect if performance issues are due to resource contention (e.g., insufficient slots) rather than query design.
  • Data skew (a few keys with disproportionately large row counts) causes uneven work distribution across slots; consider salting keys or restructuring queries to mitigate this.

2 · Check your understanding

Check this objectiveFree · always available

A table named logs.web_events is partitioned by day on the TIMESTAMP column event_ts. A dashboard query filters with WHERE DATE(event_ts) = '2026-08-01', and the query execution details show that the full table is scanned even though the analyst only needs one day of data. What is the most effective way to fix this without changing the table's partitioning scheme?

Your objective map0 tried · 0 answered correctly · 67 untouched

What you have tried across GCP PDE's objectives, not a readiness score.

Designing data processing systems~22% of the exam0 of 17 tried
Ingesting and processing the data~25% of the exam0 of 11 tried
Storing the data~20% of the exam0 of 13 tried
Preparing and using data for analysis~15% of the exam0 of 11 tried
Maintaining and automating data workloads~18% of the exam0 of 15 tried

3 · Keep going