Skip to main content

Execution Plan

Visualize how BigQuery processed your query to identify performance bottlenecks.


Accessing the Plan

  1. Execute a query
  2. Click "View Execution Plan" in results section

Or from Query History: select a query → "View Execution Plan"


What It Shows

Stage Diagram

┌──────────────────┐
│ Stage 1: Read │
│ 45.2 GB read │
│ 2.3s │
└────────┬─────────┘

┌──────────────────┐
│ Stage 2: Filter │
│ 1.2 GB output │
│ 0.8s │
└──────────────────┘

Timeline View

Stage 1: ████████████████                    2.3s
Stage 2: ████████ 0.8s
Stage 3: ██████████ 1.1s

Stage Types

StageWhat It DoesOptimization
ReadScan table dataAdd partition/cluster filters
FilterApply WHEREPush filters to Read stage
JoinCombine tablesFilter before joining
AggregateGROUP BYReduce cardinality
SortORDER BYAdd LIMIT, remove if not needed

Red Flags

  • Shuffle > Input: Inefficient data movement
  • One stage 80%+ of time: Bottleneck
  • Output >> Input: Cross join or data explosion

Optimization Tips

  1. Partition pruning: Add date filters to reduce Read stage
  2. Column pruning: Select only needed columns
  3. Early filtering: Filter before JOINs
  4. Broadcast joins: Small tables join more efficiently