explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ftlS

Settings
# exclusive inclusive rows x rows loops node
1. 965.911 7,752.687 ↑ 1.0 423,444 1

Hash Join (cost=33,432.04..7,370,190.61 rows=423,444 width=742) (actual time=509.291..7,752.687 rows=423,444 loops=1)

  • Hash Cond: (claims_1.payroll_periods_id = payroll_periods.id)
2. 241.076 4,246.051 ↑ 1.0 423,444 1

Hash Join (cost=33,426.34..266,382.51 rows=423,444 width=570) (actual time=509.191..4,246.051 rows=423,444 loops=1)

  • Hash Cond: (events.programs_id = programs.id)
3. 733.908 4,004.602 ↑ 1.0 423,444 1

Hash Join (cost=33,385.20..260,519.01 rows=423,444 width=538) (actual time=508.811..4,004.602 rows=423,444 loops=1)

  • Hash Cond: (events_venues.venues_profiles_id = venues_profiles.id)
4. 431.622 2,762.507 ↑ 1.0 423,444 1

Merge Join (cost=185.33..163,447.79 rows=423,444 width=522) (actual time=0.176..2,762.507 rows=423,444 loops=1)

  • Merge Cond: (claims_1.events_id = events_venues.events_id)
5. 515.609 1,768.947 ↑ 1.0 423,444 1

Merge Join (cost=72.85..117,237.94 rows=423,444 width=522) (actual time=0.107..1,768.947 rows=423,444 loops=1)

  • Merge Cond: (claims_1.events_id = events.id)
6. 453.122 453.122 ↑ 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.006..453.122 rows=423,444 loops=1)

7. 800.216 800.216 ↓ 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.005..800.216 rows=1,230,104 loops=1)

8. 561.938 561.938 ↓ 1.2 1,230,479 1

Index Scan using events_venues_events_id on events_venues (cost=0.43..38,307.36 rows=1,059,210 width=8) (actual time=0.005..561.938 rows=1,230,479 loops=1)

9. 48.547 508.187 ↑ 1.0 167,589 1

Hash (cost=30,120.27..30,120.27 rows=167,728 width=20) (actual time=508.187..508.187 rows=167,589 loops=1)

  • Buckets: 65536 Batches: 4 Memory Usage: 2735kB
10. 290.630 459.640 ↑ 1.0 167,589 1

Hash Join (cost=5,875.88..30,120.27 rows=167,728 width=20) (actual time=72.571..459.640 rows=167,589 loops=1)

  • Hash Cond: (venues.id = venues_profiles.venues_id)
11. 96.780 96.780 ↑ 1.0 415,935 1

Seq Scan on venues (cost=0.00..15,475.35 rows=415,935 width=20) (actual time=0.007..96.780 rows=415,935 loops=1)

12. 39.270 72.230 ↑ 1.0 167,728 1

Hash (cost=3,123.28..3,123.28 rows=167,728 width=8) (actual time=72.230..72.230 rows=167,728 loops=1)

  • Buckets: 131072 Batches: 4 Memory Usage: 2655kB
13. 32.960 32.960 ↑ 1.0 167,728 1

Seq Scan on venues_profiles (cost=0.00..3,123.28 rows=167,728 width=8) (actual time=0.008..32.960 rows=167,728 loops=1)

14. 0.151 0.373 ↑ 1.0 673 1

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

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

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

16. 0.027 0.061 ↑ 1.0 120 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
17. 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.011..0.034 rows=120 loops=1)

18.          

SubPlan (forHash Join)

19. 1,270.332 1,270.332 ↑ 1.0 1 423,444

Index Scan using staffing_users_pkey on staffing_users (cost=0.29..8.31 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=423,444)

  • Index Cond: (id = claims_1.staffing_users_id)
20. 1,270.332 1,270.332 ↑ 1.0 1 423,444

Index Scan using events_staffing_days_positions_pkey on events_staffing_days_positions (cost=0.43..8.45 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=423,444)

  • Index Cond: (id = claims_1.events_staffing_days_positions_id)