explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SPzY

Settings
# exclusive inclusive rows x rows loops node
1. 438.919 4,101.107 ↑ 1.0 423,444 1

Hash Join (cost=52,733.67..255,840.06 rows=423,444 width=690) (actual time=612.458..4,101.107 rows=423,444 loops=1)

  • Hash Cond: (events.programs_id = programs.id)
2. 275.343 3,661.849 ↑ 1.0 423,444 1

Hash Join (cost=52,692.53..247,859.34 rows=423,444 width=530) (actual time=612.112..3,661.849 rows=423,444 loops=1)

  • Hash Cond: (claims_1.staffing_users_id = staffing_users.id)
3. 197.243 3,363.688 ↑ 1.0 423,444 1

Hash Join (cost=49,851.44..239,195.89 rows=423,444 width=530) (actual time=589.251..3,363.688 rows=423,444 loops=1)

  • Hash Cond: (claims_1.payroll_periods_id = payroll_periods.id)
4. 879.448 3,166.390 ↑ 1.0 423,444 1

Hash Left Join (cost=49,845.74..233,367.84 rows=423,444 width=522) (actual time=589.183..3,166.390 rows=423,444 loops=1)

  • Hash Cond: (claims_1.events_staffing_days_positions_id = events_staffing_days_positions.id)
5. 520.440 1,698.422 ↑ 1.0 423,444 1

Merge Join (cost=72.85..117,237.94 rows=423,444 width=518) (actual time=0.114..1,698.422 rows=423,444 loops=1)

  • Merge Cond: (claims_1.events_id = events.id)
6. 471.288 471.288 ↑ 1.0 423,444 1

Index Scan using claims_events_id_idx on claims claims_1 (cost=0.42..43,146.11 rows=423,444 width=466) (actual time=0.010..471.288 rows=423,444 loops=1)

7. 706.694 706.694 ↓ 1.2 1,230,104 1

Index Scan using events_pkey on events (cost=0.43..66,221.03 rows=1,058,835 width=56) (actual time=0.007..706.694 rows=1,230,104 loops=1)

8. 332.969 588.520 ↑ 1.0 1,100,884 1

Hash (cost=31,710.84..31,710.84 rows=1,100,884 width=8) (actual time=588.520..588.520 rows=1,100,884 loops=1)

  • Buckets: 131072 Batches: 16 Memory Usage: 3723kB
9. 255.551 255.551 ↑ 1.0 1,100,884 1

Seq Scan on events_staffing_days_positions (cost=0.00..31,710.84 rows=1,100,884 width=8) (actual time=0.008..255.551 rows=1,100,884 loops=1)

10. 0.021 0.055 ↑ 1.0 120 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
11. 0.034 0.034 ↑ 1.0 120 1

Seq Scan on payroll_periods (cost=0.00..4.20 rows=120 width=12) (actual time=0.007..0.034 rows=120 loops=1)

12. 10.703 22.818 ↑ 1.0 42,004 1

Hash (cost=2,316.04..2,316.04 rows=42,004 width=4) (actual time=22.818..22.818 rows=42,004 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 1989kB
13. 12.115 12.115 ↑ 1.0 42,004 1

Seq Scan on staffing_users (cost=0.00..2,316.04 rows=42,004 width=4) (actual time=0.008..12.115 rows=42,004 loops=1)

14. 0.143 0.339 ↑ 1.0 673 1

Hash (cost=32.73..32.73 rows=673 width=36) (actual time=0.339..0.339 rows=673 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 56kB
15. 0.196 0.196 ↑ 1.0 673 1

Seq Scan on programs (cost=0.00..32.73 rows=673 width=36) (actual time=0.007..0.196 rows=673 loops=1)