How do you analyze a BigQuery query execution plan to identify performance bottlenecks and optimize query performance?

Quick Overview

Asks how to read a BigQuery query execution plan to locate performance bottlenecks and then speed the query up. Tests knowledge of stage statistics, shuffles, slot contention, data skew, partition pruning, and how to verify that an optimization reduced the real cost.

How do you analyze a BigQuery query execution plan to identify performance bottlenecks and optimize query performance?

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Other

How do you analyze a BigQuery query execution plan to identify performance bottlenecks and optimize query performance? ```hint Sort the time Each stage reports how long its workers spent waiting, reading, computing and writing. Ask what it would tell you if one of those dominated. ``` ```hint Compare workers and rows Look at the gap between average and slowest worker in a stage, and at stages that write far more rows than they read. ``` ### What a Strong Answer Covers - Where the plan and the per-stage statistics are found, and how stages feed each other - Which stage metrics point to expensive shuffles, slot contention, data skew and row explosion - How to trace a symptom in the plan back to a specific part of the SQL - Concrete fixes for each kind of bottleneck, and how to confirm that a fix worked ### Follow-up Questions - A join stage's slowest worker takes 50 times longer than the average worker. What do you check first, and how do you fix it? - How would you find the most expensive queries in a project over the last 30 days? - Why can a query that references the same CTE three times be slower than expected, and what would you do about it?

Overview: Asks how to read a BigQuery query execution plan to locate performance bottlenecks and then speed the query up. Tests knowledge of stage statistics, shuffles, slot contention, data skew, partition pruning, and how to verify that an optimization reduced the real cost.

Nov 25, 2026
mediumData ScientistOtherData Manipulation (SQL/Python)
0
0

How do you analyze a BigQuery query execution plan to identify performance bottlenecks and optimize query performance?

What a Strong Answer Covers Guidance

  • Where the plan and the per-stage statistics are found, and how stages feed each other
  • Which stage metrics point to expensive shuffles, slot contention, data skew and row explosion
  • How to trace a symptom in the plan back to a specific part of the SQL
  • Concrete fixes for each kind of bottleneck, and how to confirm that a fix worked

Follow-up Questions Guidance

  • A join stage's slowest worker takes 50 times longer than the average worker. What do you check first, and how do you fix it?
  • How would you find the most expensive queries in a project over the last 30 days?
  • Why can a query that references the same CTE three times be slower than expected, and what would you do about it?