explain.depesz.com

PostgreSQL's explain analyze made readable

Result: e0yS

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

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

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

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

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

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

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

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

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

7. 45.749 503.262 ↑ 1.0 167,589 1

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

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

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

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

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

10. 38.002 69.754 ↑ 1.0 167,728 1

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

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

Seq Scan on venues_profiles (cost=0.00..3,123.28 rows=167,728 width=8) (actual time=0.005..31.752 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.014..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)