explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Nye1

Settings
# exclusive inclusive rows x rows loops node
1. 2,373.745 19,443.619 ↑ 1.0 423,444 1

Hash Join (cost=33,385.20..16,286,815.80 rows=423,444 width=1,234) (actual time=560.748..19,443.619 rows=423,444 loops=1)

  • Hash Cond: (events_venues.venues_profiles_id = venues_profiles.id)
2. 491.944 2,959.615 ↑ 1.0 423,444 1

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

  • Merge Cond: (claims_1.events_id = events_venues.events_id)
3. 559.097 1,841.370 ↑ 1.0 423,444 1

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

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

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

6. 626.301 626.301 ↓ 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.011..626.301 rows=1,230,479 loops=1)

7. 73.372 560.051 ↑ 1.0 167,589 1

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

  • Buckets: 65536 Batches: 4 Memory Usage: 2735kB
8. 300.137 486.679 ↑ 1.0 167,589 1

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

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

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

10. 41.483 76.135 ↑ 1.0 167,728 1

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

  • Buckets: 131072 Batches: 4 Memory Usage: 2655kB
11. 34.652 34.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.006..34.652 rows=167,728 loops=1)

12.          

SubPlan (forHash Join)

13. 846.888 846.888 ↑ 1.0 1 423,444

Index Scan using programs_pkey on programs (cost=0.28..8.29 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=423,444)

  • Index Cond: (id = events.programs_id)
14. 846.888 846.888 ↑ 1.0 1 423,444

Index Scan using programs_pkey on programs programs_1 (cost=0.28..8.29 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=423,444)

  • Index Cond: (id = events.programs_id)
15. 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)
16. 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
17. 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)