explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ijw

Settings
# exclusive inclusive rows x rows loops node
1. 7.542 25.089 ↑ 950.5 2 1

GroupAggregate (cost=178.98..326.31 rows=1,901 width=262) (actual time=22.133..25.089 rows=2 loops=1)

  • Group Key: pitch.season, pitch.batter_mlb_id
2. 3.133 17.547 ↓ 2.5 4,819 1

Sort (cost=178.98..183.73 rows=1,901 width=56) (actual time=16.561..17.547 rows=4,819 loops=1)

  • Sort Key: pitch.batter_mlb_id
  • Sort Method: quicksort Memory: 645kB
3. 2.514 14.414 ↓ 2.5 4,819 1

Hash Left Join (cost=2.74..75.45 rows=1,901 width=56) (actual time=0.122..14.414 rows=4,819 loops=1)

  • Hash Cond: (pitch.pitch_result = mlbam_lk_pitch_code.pitch_code)
4. 2.167 11.883 ↓ 2.5 4,819 1

Hash Left Join (cost=1.89..56.38 rows=1,901 width=50) (actual time=0.100..11.883 rows=4,819 loops=1)

  • Hash Cond: (pitch.event_type = mlbam_lk_event_type.event_type)
5. 1.496 9.664 ↓ 2.5 4,819 1

Append (cost=0.00..41.33 rows=1,901 width=33) (actual time=0.023..9.664 rows=4,819 loops=1)

6. 0.002 0.002 ↓ 0.0 0 1

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

  • Filter: ((batter_mlb_id = ANY ('{641355,669257}'::integer[])) AND (season = 2018))
7. 8.166 8.166 ↓ 2.5 4,819 1

Index Scan using aggregated_pitches_2018_batter_mlb_id_idx on aggregated_pitches_2018 pitch_1 (cost=0.43..41.33 rows=1,900 width=33) (actual time=0.020..8.166 rows=4,819 loops=1)

  • Index Cond: (batter_mlb_id = ANY ('{641355,669257}'::integer[]))
  • Filter: (season = 2018)
8. 0.021 0.052 ↑ 1.0 51 1

Hash (cost=1.25..1.25 rows=51 width=41) (actual time=0.052..0.052 rows=51 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
9. 0.031 0.031 ↑ 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=41) (actual time=0.003..0.031 rows=51 loops=1)

10. 0.007 0.017 ↑ 1.2 12 1

Hash (cost=0.68..0.68 rows=14 width=10) (actual time=0.017..0.017 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
11. 0.010 0.010 ↑ 1.2 12 1

Index Scan using mlbam_lk_pitch_code_pkey on mlbam_lk_pitch_code (cost=0.14..0.68 rows=14 width=10) (actual time=0.003..0.010 rows=12 loops=1)

  • Filter: ((automatic = 0) AND (pitchout = 0) AND (bunt = 0))
  • Rows Removed by Filter: 12
Planning time : 1.345 ms
Execution time : 25.219 ms