explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 33hG

Settings
# exclusive inclusive rows x rows loops node
1. 60.676 2,591.277 ↑ 1.4 36,779 1

Hash Left Join (cost=36,435.26..255,112.33 rows=52,401 width=928) (actual time=533.253..2,591.277 rows=36,779 loops=1)

  • Hash Cond: (events_staffing_days_positions.staffing_positions_id = staffing_positions.id)
2. 32.406 2,530.480 ↑ 1.4 36,779 1

Nested Loop Left Join (cost=36,424.76..253,335.41 rows=52,401 width=766) (actual time=533.120..2,530.480 rows=36,779 loops=1)

3. 79.334 2,350.958 ↑ 1.4 36,779 1

Hash Join (cost=36,424.33..217,750.11 rows=52,401 width=762) (actual time=533.113..2,350.958 rows=36,779 loops=1)

  • Hash Cond: (events_venues.venues_profiles_id = venues_profiles.id)
4. 15.234 1,769.816 ↑ 1.4 36,779 1

Nested Loop (cost=3,224.47..172,918.73 rows=52,401 width=746) (actual time=30.991..1,769.816 rows=36,779 loops=1)

5. 76.760 1,607.466 ↑ 1.4 36,779 1

Hash Join (cost=3,224.04..144,344.09 rows=52,401 width=742) (actual time=30.975..1,607.466 rows=36,779 loops=1)

  • Hash Cond: ((claims_1.claim_types_id = claim_types_programs.claim_types_id) AND (events.programs_id = claim_types_programs.programs_id))
6. 18.615 1,527.561 ↑ 4.4 36,779 1

Hash Join (cost=2,965.89..129,586.43 rows=161,078 width=713) (actual time=27.821..1,527.561 rows=36,779 loops=1)

  • Hash Cond: (events.programs_id = programs.id)
7. 23.539 1,508.595 ↑ 4.4 36,779 1

Hash Join (cost=2,924.75..127,330.46 rows=161,078 width=677) (actual time=27.465..1,508.595 rows=36,779 loops=1)

  • Hash Cond: (claims_1.staffing_users_id = staffing_users.id)
8. 18.504 1,462.435 ↑ 4.4 36,779 1

Hash Join (cost=83.66..122,274.55 rows=161,078 width=663) (actual time=4.739..1,462.435 rows=36,779 loops=1)

  • Hash Cond: (claims_1.payroll_periods_id = payroll_periods.id)
9. 19.221 1,443.876 ↑ 4.4 36,779 1

Hash Join (cost=77.96..120,054.03 rows=161,078 width=655) (actual time=4.679..1,443.876 rows=36,779 loops=1)

  • Hash Cond: (claims_1.claim_statuses_id = claim_statuses.id)
10. 19.345 1,424.648 ↑ 4.4 36,779 1

Hash Join (cost=76.82..117,838.07 rows=161,078 width=591) (actual time=4.667..1,424.648 rows=36,779 loops=1)

  • Hash Cond: (claims_1.claim_types_id = claim_types.id)
11. 141.350 1,405.267 ↑ 4.4 36,779 1

Merge Join (cost=73.89..115,620.31 rows=161,078 width=523) (actual time=4.625..1,405.267 rows=36,779 loops=1)

  • Merge Cond: (claims_1.events_id = events.id)
12. 483.017 483.017 ↑ 1.0 423,440 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..483.017 rows=423,440 loops=1)

13. 780.900 780.900 ↓ 1.0 420,087 1

Index Scan using events_pkey on events (cost=0.43..68,868.11 rows=402,781 width=57) (actual time=1.792..780.900 rows=420,087 loops=1)

  • Filter: (clients_id = 10)
  • Rows Removed by Filter: 792391
14. 0.008 0.036 ↑ 1.0 32 1

Hash (cost=2.54..2.54 rows=32 width=68) (actual time=0.036..0.036 rows=32 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
15. 0.016 0.028 ↑ 1.0 32 1

Hash Join (cost=1.07..2.54 rows=32 width=68) (actual time=0.013..0.028 rows=32 loops=1)

  • Hash Cond: (claim_types.claim_categories_id = claim_categories.id)
16. 0.007 0.007 ↑ 1.0 32 1

Seq Scan on claim_types (cost=0.00..1.32 rows=32 width=40) (actual time=0.004..0.007 rows=32 loops=1)

17. 0.002 0.005 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=36) (actual time=0.005..0.005 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
18. 0.003 0.003 ↑ 1.0 3 1

Seq Scan on claim_categories (cost=0.00..1.03 rows=3 width=36) (actual time=0.003..0.003 rows=3 loops=1)

19. 0.002 0.007 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=68) (actual time=0.007..0.007 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
20. 0.005 0.005 ↑ 1.0 6 1

Seq Scan on claim_statuses (cost=0.00..1.06 rows=6 width=68) (actual time=0.004..0.005 rows=6 loops=1)

21. 0.023 0.055 ↑ 1.0 120 1

Hash (cost=4.20..4.20 rows=120 width=12) (actual time=0.055..0.055 rows=120 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
22. 0.032 0.032 ↑ 1.0 120 1

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

23. 11.035 22.621 ↑ 1.0 42,004 1

Hash (cost=2,316.04..2,316.04 rows=42,004 width=18) (actual time=22.621..22.621 rows=42,004 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2667kB
24. 11.586 11.586 ↑ 1.0 42,004 1

Seq Scan on staffing_users (cost=0.00..2,316.04 rows=42,004 width=18) (actual time=0.006..11.586 rows=42,004 loops=1)

25. 0.144 0.351 ↑ 1.0 673 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 56kB
26. 0.207 0.207 ↑ 1.0 673 1

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

27. 1.553 3.145 ↑ 1.0 7,006 1

Hash (cost=153.06..153.06 rows=7,006 width=45) (actual time=3.145..3.145 rows=7,006 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 438kB
28. 1.592 1.592 ↑ 1.0 7,006 1

Seq Scan on claim_types_programs (cost=0.00..153.06 rows=7,006 width=45) (actual time=0.012..1.592 rows=7,006 loops=1)

29. 147.116 147.116 ↑ 1.0 1 36,779

Index Scan using events_venues_events_id_key on events_venues (cost=0.43..0.54 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=36,779)

  • Index Cond: (events_id = claims_1.events_id)
30. 70.156 501.808 ↑ 1.0 167,589 1

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

  • Buckets: 65536 Batches: 4 Memory Usage: 2735kB
31. 264.606 431.652 ↑ 1.0 167,589 1

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

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

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

33. 38.768 71.973 ↑ 1.0 167,728 1

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

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

35. 147.116 147.116 ↑ 1.0 1 36,779

Index Scan using events_staffing_days_positions_pkey on events_staffing_days_positions (cost=0.43..0.67 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=36,779)

  • Index Cond: (claims_1.events_staffing_days_positions_id = id)
36. 0.067 0.121 ↑ 1.0 289 1

Hash (cost=6.89..6.89 rows=289 width=26) (actual time=0.121..0.121 rows=289 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
37. 0.054 0.054 ↑ 1.0 289 1

Seq Scan on staffing_positions (cost=0.00..6.89 rows=289 width=26) (actual time=0.006..0.054 rows=289 loops=1)