explain.depesz.com

PostgreSQL's explain analyze made readable

Result: u5IG

Settings
# exclusive inclusive rows x rows loops node
1. 1,548.966 8,161.695 ↓ 1.0 427,853 1

Hash Left Join (cost=93,329.42..447,818.90 rows=427,852 width=581) (actual time=1,483.882..8,161.695 rows=427,853 loops=1)

  • Hash Cond: (claims_1.events_staffing_days_positions_id = events_staffing_days_positions.id)
  • Buffers: shared hit=1455527 dirtied=24, temp read=32140 written=32098
2. 344.723 5,831.141 ↓ 1.0 427,853 1

Hash Join (cost=40,984.94..317,360.78 rows=427,852 width=577) (actual time=700.448..5,831.141 rows=427,853 loops=1)

  • Hash Cond: (events.programs_id = programs.id)
  • Buffers: shared hit=1433260 dirtied=24, temp read=12353 written=12341
3. 349.465 5,485.815 ↓ 1.0 427,853 1

Hash Join (cost=40,916.55..311,409.42 rows=427,852 width=545) (actual time=699.825..5,485.815 rows=427,853 loops=1)

  • Hash Cond: (claims_1.staffing_users_id = staffing_users.id)
  • Buffers: shared hit=1433207 dirtied=24, temp read=12353 written=12341
4. 319.375 5,104.086 ↓ 1.0 427,853 1

Hash Join (cost=37,851.94..302,461.85 rows=427,852 width=531) (actual time=667.286..5,104.086 rows=427,853 loops=1)

  • Hash Cond: (claims_1.payroll_periods_id = payroll_periods.id)
  • Buffers: shared hit=1431090 dirtied=24, temp read=12353 written=12341
5. 818.419 4,784.633 ↓ 1.0 427,853 1

Hash Join (cost=37,846.24..296,573.18 rows=427,852 width=523) (actual time=667.187..4,784.633 rows=427,853 loops=1)

  • Hash Cond: (events_venues.venues_profiles_id = venues_profiles.id)
  • Buffers: shared hit=1431087 dirtied=24, temp read=12353 written=12341
6. 642.568 3,299.920 ↓ 1.0 427,853 1

Merge Join (cost=233.36..195,960.33 rows=427,852 width=507) (actual time=0.247..3,299.920 rows=427,853 loops=1)

  • Merge Cond: (claims_1.events_id = events_venues.events_id)
  • Buffers: shared hit=1416292 dirtied=24
7. 836.973 2,027.672 ↓ 1.0 427,853 1

Merge Join (cost=92.07..139,972.83 rows=427,852 width=507) (actual time=0.134..2,027.672 rows=427,853 loops=1)

  • Merge Cond: (claims_1.events_id = events.id)
  • Buffers: shared hit=988449 dirtied=24
8. 431.441 431.441 ↓ 1.0 427,853 1

Index Scan using claims_events_id_idx on claims claims_1 (cost=0.42..48,097.43 rows=427,852 width=452) (actual time=0.007..431.441 rows=427,853 loops=1)

  • Buffers: shared hit=380612 dirtied=24
9. 759.258 759.258 ↓ 1.2 1,267,506 1

Index Scan using events_pkey on events (cost=0.43..83,781.01 rows=1,099,375 width=55) (actual time=0.004..759.258 rows=1,267,506 loops=1)

  • Buffers: shared hit=607837
10. 629.680 629.680 ↓ 1.2 1,267,881 1

Index Scan using events_venues_events_id on events_venues (cost=0.43..48,050.70 rows=1,091,201 width=8) (actual time=0.006..629.680 rows=1,267,881 loops=1)

  • Buffers: shared hit=427843
11. 85.904 666.294 ↑ 1.0 191,961 1

Hash (cost=34,082.95..34,082.95 rows=192,235 width=20) (actual time=666.294..666.294 rows=191,961 loops=1)

  • Buckets: 65536 Batches: 4 Memory Usage: 3065kB
  • Buffers: shared hit=14795, temp read=2217 written=2951
12. 301.905 580.390 ↑ 1.0 191,961 1

Hash Join (cost=6,754.29..34,082.95 rows=192,235 width=20) (actual time=120.411..580.390 rows=191,961 loops=1)

  • Hash Cond: (venues.id = venues_profiles.venues_id)
  • Buffers: shared hit=14795, temp read=2217 written=2211
13. 158.642 158.642 ↑ 1.0 446,769 1

Seq Scan on venues (cost=0.00..17,646.68 rows=452,968 width=20) (actual time=0.004..158.642 rows=446,769 loops=1)

  • Buffers: shared hit=13117
14. 64.256 119.843 ↑ 1.0 192,100 1

Hash (cost=3,600.35..3,600.35 rows=192,235 width=8) (actual time=119.843..119.843 rows=192,100 loops=1)

  • Buckets: 131072 Batches: 4 Memory Usage: 2895kB
  • Buffers: shared hit=1678, temp written=491
15. 55.587 55.587 ↑ 1.0 192,100 1

Seq Scan on venues_profiles (cost=0.00..3,600.35 rows=192,235 width=8) (actual time=0.002..55.587 rows=192,100 loops=1)

  • Buffers: shared hit=1678
16. 0.035 0.078 ↓ 1.0 121 1

Hash (cost=4.20..4.20 rows=120 width=12) (actual time=0.078..0.078 rows=121 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
  • Buffers: shared hit=3
17. 0.043 0.043 ↓ 1.0 121 1

Seq Scan on payroll_periods (cost=0.00..4.20 rows=120 width=12) (actual time=0.003..0.043 rows=121 loops=1)

  • Buffers: shared hit=3
18. 15.867 32.264 ↑ 1.0 42,116 1

Hash (cost=2,538.16..2,538.16 rows=42,116 width=18) (actual time=32.264..32.264 rows=42,116 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2673kB
  • Buffers: shared hit=2117
19. 16.397 16.397 ↑ 1.0 42,116 1

Seq Scan on staffing_users (cost=0.00..2,538.16 rows=42,116 width=18) (actual time=0.003..16.397 rows=42,116 loops=1)

  • Buffers: shared hit=2117
20. 0.249 0.603 ↑ 1.0 683 1

Hash (cost=59.84..59.84 rows=684 width=36) (actual time=0.603..0.603 rows=683 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 56kB
  • Buffers: shared hit=53
21. 0.354 0.354 ↑ 1.0 683 1

Seq Scan on programs (cost=0.00..59.84 rows=684 width=36) (actual time=0.003..0.354 rows=683 loops=1)

  • Buffers: shared hit=53
22. 401.310 781.588 ↑ 1.0 1,137,630 1

Hash (cost=33,656.99..33,656.99 rows=1,138,999 width=8) (actual time=781.588..781.588 rows=1,137,630 loops=1)

  • Buckets: 131072 Batches: 16 Memory Usage: 3811kB
  • Buffers: shared hit=22267, temp written=3636
23. 380.278 380.278 ↑ 1.0 1,137,630 1

Seq Scan on events_staffing_days_positions (cost=0.00..33,656.99 rows=1,138,999 width=8) (actual time=0.007..380.278 rows=1,137,630 loops=1)

  • Buffers: shared hit=22267