explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dvAU

Settings
# exclusive inclusive rows x rows loops node
1. 2,156.926 4,571.908 ↑ 74.6 1,069 1

GroupAggregate (cost=101,651.31..175,025.55 rows=79,755 width=239) (actual time=2,206.552..4,571.908 rows=1,069 loops=1)

  • Group Key: pitch.batter_mlb_id, pitch.batter_org
2. 656.254 2,414.982 ↑ 1.1 734,617 1

Sort (cost=101,651.31..103,645.17 rows=797,546 width=67) (actual time=2,206.472..2,414.982 rows=734,617 loops=1)

  • Sort Key: pitch.batter_mlb_id, pitch.batter_org
  • Sort Method: quicksort Memory: 94052kB
3. 352.499 1,758.728 ↑ 1.1 734,617 1

Hash Left Join (cost=1.89..23,471.03 rows=797,546 width=67) (actual time=0.099..1,758.728 rows=734,617 loops=1)

  • Hash Cond: (pitch.event_type = mlbam_lk_event_type.event_type)
4. 227.852 1,406.174 ↑ 1.1 734,617 1

Append (cost=0.00..17,946.93 rows=797,546 width=44) (actual time=0.035..1,406.174 rows=734,617 loops=1)

5. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on aggregated_pitches pitch (cost=0.00..0.00 rows=1 width=154) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: ((season = 2018) AND (raw_sport_code = 'mlb'::text) AND (pbp_game_type = ANY ('{R,F,D,L,W}'::text[])))
6. 1,178.320 1,178.320 ↑ 1.1 734,617 1

Index Scan using aggregated_pitches_2018_raw_sport_code_pbp_game_type_idx on aggregated_pitches_2018 pitch_1 (cost=0.43..17,946.93 rows=797,545 width=44) (actual time=0.032..1,178.320 rows=734,617 loops=1)

  • Index Cond: ((raw_sport_code = 'mlb'::text) AND (pbp_game_type = ANY ('{R,F,D,L,W}'::text[])))
  • Filter: (season = 2018)
7. 0.023 0.055 ↑ 1.0 51 1

Hash (cost=1.25..1.25 rows=51 width=49) (actual time=0.055..0.055 rows=51 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
8. 0.032 0.032 ↑ 1.0 51 1

Index Scan using mlbam_lk_event_type_pkey on mlbam_lk_event_type (cost=0.14..1.25 rows=51 width=49) (actual time=0.003..0.032 rows=51 loops=1)