explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gHmM

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

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

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

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

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

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

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

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

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

7. 47.491 520.440 ↑ 1.0 167,589 1

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

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

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

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

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

10. 48.890 83.487 ↑ 1.0 167,728 1

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

  • Buckets: 131072 Batches: 4 Memory Usage: 2655kB
11. 34.597 34.597 ↑ 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.597 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,693.776 1,693.776 ↑ 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.004 rows=1 loops=423,444)

  • Index Cond: (id = claims_1.events_staffing_days_positions_id)