explain.depesz.com

PostgreSQL's explain analyze made readable

Result: okp

Settings
# exclusive inclusive rows x rows loops node
1. 1,606.063 17,468.657 ↑ 1.0 423,444 1

Hash Join (cost=33,426.34..9,269,860.56 rows=423,444 width=742) (actual time=489.427..17,468.657 rows=423,444 loops=1)

  • Hash Cond: (events.programs_id = programs.id)
2. 782.006 4,005.744 ↑ 1.0 423,444 1

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

  • Hash Cond: (events_venues.venues_profiles_id = venues_profiles.id)
3. 428.025 2,735.328 ↑ 1.0 423,444 1

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

  • Merge Cond: (claims_1.events_id = events_venues.events_id)
4. 534.978 1,735.861 ↑ 1.0 423,444 1

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

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

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

7. 571.442 571.442 ↓ 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.006..571.442 rows=1,230,479 loops=1)

8. 46.280 488.410 ↑ 1.0 167,589 1

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

  • Buckets: 65536 Batches: 4 Memory Usage: 2735kB
9. 278.602 442.130 ↑ 1.0 167,589 1

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

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

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

11. 38.408 71.384 ↑ 1.0 167,728 1

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

  • Buckets: 131072 Batches: 4 Memory Usage: 2655kB
12. 32.976 32.976 ↑ 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..32.976 rows=167,728 loops=1)

13. 0.141 0.418 ↑ 1.0 673 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 56kB
14. 0.277 0.277 ↑ 1.0 673 1

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

15.          

SubPlan (forHash Join)

16. 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)
17. 9,315.768 9,315.768 ↑ 1.0 1 423,444

Seq Scan on payroll_periods (cost=0.00..4.50 rows=1 width=8) (actual time=0.015..0.022 rows=1 loops=423,444)

  • Filter: (claims_1.payroll_periods_id = id)
  • Rows Removed by Filter: 119
18. 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)