explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uX7l

Settings
# exclusive inclusive rows x rows loops node
1. 65.076 3,307.035 ↑ 1.4 36,779 1

Hash Join (cost=36,547.32..267,769.66 rows=52,401 width=928) (actual time=604.455..3,307.035 rows=36,779 loops=1)

  • Hash Cond: (claims_1.staffing_users_id = staffing_users.id)
2. 20.093 3,200.529 ↑ 1.4 36,779 1

Hash Left Join (cost=33,706.23..263,160.03 rows=52,401 width=774) (actual time=562.904..3,200.529 rows=36,779 loops=1)

  • Hash Cond: (events_staffing_days_positions.staffing_positions_id = staffing_positions.id)
3. 17.602 3,180.304 ↑ 1.4 36,779 1

Nested Loop Left Join (cost=33,695.72..262,431.13 rows=52,401 width=752) (actual time=562.761..3,180.304 rows=36,779 loops=1)

4. 84.734 3,015.586 ↑ 1.4 36,779 1

Hash Join (cost=33,695.30..226,845.83 rows=52,401 width=748) (actual time=562.736..3,015.586 rows=36,779 loops=1)

  • Hash Cond: (events_venues.venues_profiles_id = venues_profiles.id)
5. 27.033 2,382.013 ↑ 1.4 36,779 1

Hash Join (cost=495.43..182,218.45 rows=52,401 width=732) (actual time=13.529..2,382.013 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. 20.129 2,351.662 ↑ 4.4 36,779 1

Hash Join (cost=237.28..167,460.79 rows=161,078 width=703) (actual time=10.176..2,351.662 rows=36,779 loops=1)

  • Hash Cond: (events.programs_id = programs.id)
7. 19.682 2,331.027 ↑ 4.4 36,779 1

Hash Join (cost=196.14..165,204.82 rows=161,078 width=667) (actual time=9.656..2,331.027 rows=36,779 loops=1)

  • Hash Cond: (claims_1.payroll_periods_id = payroll_periods.id)
8. 19.721 2,311.284 ↑ 4.4 36,779 1

Hash Join (cost=190.44..162,984.30 rows=161,078 width=659) (actual time=9.580..2,311.284 rows=36,779 loops=1)

  • Hash Cond: (claims_1.claim_statuses_id = claim_statuses.id)
9. 20.632 2,291.554 ↑ 4.4 36,779 1

Hash Join (cost=189.30..160,768.34 rows=161,078 width=595) (actual time=9.531..2,291.554 rows=36,779 loops=1)

  • Hash Cond: (claims_1.claim_types_id = claim_types.id)
10. 189.796 2,270.873 ↑ 4.4 36,779 1

Merge Join (cost=186.37..158,550.58 rows=161,078 width=527) (actual time=9.470..2,270.873 rows=36,779 loops=1)

  • Merge Cond: (claims_1.events_id = events_venues.events_id)
11. 194.650 1,562.901 ↑ 4.4 36,779 1

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

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

13. 921.480 921.480 ↓ 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=2.787..921.480 rows=420,087 loops=1)

  • Filter: (clients_id = 10)
  • Rows Removed by Filter: 792391
14. 518.176 518.176 ↓ 1.0 1,077,370 1

Index Scan using events_venues_events_id_key on events_venues (cost=0.43..38,307.36 rows=1,059,210 width=8) (actual time=0.008..518.176 rows=1,077,370 loops=1)

15. 0.008 0.049 ↑ 1.0 32 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
16. 0.023 0.041 ↑ 1.0 32 1

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

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

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

18. 0.003 0.009 ↑ 1.0 3 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
19. 0.006 0.006 ↑ 1.0 3 1

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

20. 0.004 0.009 ↑ 1.0 6 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
21. 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.005..0.005 rows=6 loops=1)

22. 0.026 0.061 ↑ 1.0 120 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
23. 0.035 0.035 ↑ 1.0 120 1

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

24. 0.233 0.506 ↑ 1.0 673 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 56kB
25. 0.273 0.273 ↑ 1.0 673 1

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

26. 1.673 3.318 ↑ 1.0 7,006 1

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

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

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

28. 50.948 548.839 ↑ 1.0 167,589 1

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

  • Buckets: 65536 Batches: 4 Memory Usage: 2735kB
29. 277.326 497.891 ↑ 1.0 167,589 1

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

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

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

31. 63.245 101.195 ↑ 1.0 167,728 1

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

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

Seq Scan on venues_profiles (cost=0.00..3,123.28 rows=167,728 width=8) (actual time=0.008..37.950 rows=167,728 loops=1)

33. 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)
34. 0.059 0.132 ↑ 1.0 289 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
35. 0.073 0.073 ↑ 1.0 289 1

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

36. 24.243 41.430 ↑ 1.0 42,004 1

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

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

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