explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VInR

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

Hash Join (cost=33,434.44..7,370,193.01 rows=423,444 width=742) (actual time=500.730..7,715.453 rows=423,444 loops=1)

  • Hash Cond: (claims_1.payroll_periods_id = period_end_dates.id)
2.          

CTE period_end_dates

3. 0.033 0.033 ↑ 1.0 120 1

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

4. 207.412 4,220.873 ↑ 1.0 423,444 1

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

  • Hash Cond: (events.programs_id = programs.id)
5. 636.947 4,013.082 ↑ 1.0 423,444 1

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

  • Hash Cond: (events_venues.venues_profiles_id = venues_profiles.id)
6. 401.694 2,876.649 ↑ 1.0 423,444 1

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

  • Merge Cond: (claims_1.events_id = events_venues.events_id)
7. 610.935 1,844.173 ↑ 1.0 423,444 1

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

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

9. 779.006 779.006 ↓ 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.006..779.006 rows=1,230,104 loops=1)

10. 630.782 630.782 ↓ 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.007..630.782 rows=1,230,479 loops=1)

11. 46.282 499.486 ↑ 1.0 167,589 1

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

  • Buckets: 65536 Batches: 4 Memory Usage: 2735kB
12. 262.443 453.204 ↑ 1.0 167,589 1

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

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

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

14. 40.473 74.125 ↑ 1.0 167,728 1

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

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

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

16. 0.141 0.379 ↑ 1.0 673 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 56kB
17. 0.238 0.238 ↑ 1.0 673 1

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

18. 0.028 0.104 ↑ 1.0 120 1

Hash (cost=2.40..2.40 rows=120 width=12) (actual time=0.104..0.104 rows=120 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
19. 0.076 0.076 ↑ 1.0 120 1

CTE Scan on period_end_dates (cost=0.00..2.40 rows=120 width=12) (actual time=0.013..0.076 rows=120 loops=1)

20.          

SubPlan (forHash Join)

21. 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)
22. 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)