explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dC8

Settings
# exclusive inclusive rows x rows loops node
1. 2,005.543 4,354.584 ↑ 6.5 990 1

GroupAggregate (cost=99,791.68..168,497.70 rows=6,425 width=236) (actual time=2,143.794..4,354.584 rows=990 loops=1)

  • Group Key: pitch.batter_mlb_id
2. 562.203 2,349.041 ↑ 1.1 724,496 1

Sort (cost=99,791.68..101,751.04 rows=783,743 width=67) (actual time=2,143.720..2,349.041 rows=724,496 loops=1)

  • Sort Key: pitch.batter_mlb_id
  • Sort Method: quicksort Memory: 93095kB
3. 361.826 1,786.838 ↑ 1.1 724,496 1

Hash Left Join (cost=1.89..23,063.16 rows=783,743 width=67) (actual time=0.105..1,786.838 rows=724,496 loops=1)

  • Hash Cond: (pitch.event_type = mlbam_lk_event_type.event_type)
4. 230.004 1,424.954 ↑ 1.1 724,496 1

Append (cost=0.00..17,634.63 rows=783,743 width=44) (actual time=0.037..1,424.954 rows=724,496 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 (pbp_game_type = 'R'::text) AND (raw_sport_code = 'mlb'::text))
6. 1,194.948 1,194.948 ↑ 1.1 724,496 1

Index Scan using aggregated_pitches_2018_raw_sport_code_pbp_game_type_idx on aggregated_pitches_2018 pitch_1 (cost=0.43..17,634.63 rows=783,742 width=44) (actual time=0.034..1,194.948 rows=724,496 loops=1)

  • Index Cond: ((raw_sport_code = 'mlb'::text) AND (pbp_game_type = 'R'::text))
  • Filter: (season = 2018)
7. 0.032 0.058 ↑ 1.0 51 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
8. 0.026 0.026 ↑ 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.002..0.026 rows=51 loops=1)

Planning time : 1.299 ms
Execution time : 4,364.099 ms