explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nM97

Settings
# exclusive inclusive rows x rows loops node
1. 0.047 13.101 ↓ 1.3 104 1

Append (cost=8.81..4,468.66 rows=80 width=492) (actual time=0.186..13.101 rows=104 loops=1)

2. 0.146 2.678 ↓ 2.0 104 1

Nested Loop (cost=8.81..1,212.87 rows=53 width=581) (actual time=0.184..2.678 rows=104 loops=1)

3. 0.010 0.010 ↑ 1.0 1 1

Index Scan using staffing_users_pkey on staffing_users (cost=0.29..8.31 rows=1 width=18) (actual time=0.009..0.010 rows=1 loops=1)

  • Index Cond: (id = 27529)
4. 0.096 2.522 ↓ 2.0 104 1

Nested Loop Left Join (cost=8.52..1,203.50 rows=53 width=567) (actual time=0.169..2.522 rows=104 loops=1)

5. 0.145 2.114 ↓ 2.0 104 1

Nested Loop (cost=8.10..755.38 rows=53 width=563) (actual time=0.160..2.114 rows=104 loops=1)

6. 0.121 1.761 ↓ 2.0 104 1

Nested Loop (cost=7.67..714.82 rows=53 width=551) (actual time=0.153..1.761 rows=104 loops=1)

7. 0.078 1.432 ↓ 2.0 104 1

Nested Loop (cost=7.25..690.67 rows=53 width=547) (actual time=0.146..1.432 rows=104 loops=1)

  • Join Filter: (claims_1.events_id = events_venues.events_id)
8. 0.081 1.042 ↓ 2.0 104 1

Nested Loop (cost=6.83..664.05 rows=53 width=547) (actual time=0.133..1.042 rows=104 loops=1)

9. 0.084 0.753 ↓ 2.0 104 1

Nested Loop (cost=6.55..648.01 rows=53 width=515) (actual time=0.129..0.753 rows=104 loops=1)

10. 0.129 0.357 ↓ 2.0 104 1

Hash Join (cost=6.12..199.89 rows=53 width=460) (actual time=0.118..0.357 rows=104 loops=1)

  • Hash Cond: (claims_1.payroll_periods_id = payroll_periods.id)
11. 0.135 0.135 ↓ 2.0 104 1

Index Scan using claims_staffing_users_id on claims claims_1 (cost=0.42..193.47 rows=53 width=452) (actual time=0.012..0.135 rows=104 loops=1)

  • Index Cond: (staffing_users_id = 27529)
12. 0.049 0.093 ↓ 1.0 121 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
13. 0.044 0.044 ↓ 1.0 121 1

Seq Scan on payroll_periods (cost=0.00..4.20 rows=120 width=12) (actual time=0.004..0.044 rows=121 loops=1)

14. 0.312 0.312 ↑ 1.0 1 104

Index Scan using events_pkey on events (cost=0.43..8.45 rows=1 width=55) (actual time=0.002..0.003 rows=1 loops=104)

  • Index Cond: (id = claims_1.events_id)
15. 0.208 0.208 ↑ 1.0 1 104

Index Scan using programs_pkey on programs (cost=0.28..0.29 rows=1 width=36) (actual time=0.001..0.002 rows=1 loops=104)

  • Index Cond: (id = events.programs_id)
16. 0.312 0.312 ↑ 1.0 1 104

Index Scan using events_venues_events_id on events_venues (cost=0.43..0.49 rows=1 width=8) (actual time=0.002..0.003 rows=1 loops=104)

  • Index Cond: (events_id = events.id)
17. 0.208 0.208 ↑ 1.0 1 104

Index Scan using venues_profiles_pkey on venues_profiles (cost=0.42..0.45 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=104)

  • Index Cond: (id = events_venues.venues_profiles_id)
18. 0.208 0.208 ↑ 1.0 1 104

Index Scan using venues_pkey on venues (cost=0.42..0.76 rows=1 width=20) (actual time=0.002..0.002 rows=1 loops=104)

  • Index Cond: (id = venues_profiles.venues_id)
19. 0.312 0.312 ↑ 1.0 1 104

Index Scan using events_staffing_days_positions_pkey on events_staffing_days_positions (cost=0.43..8.45 rows=1 width=8) (actual time=0.002..0.003 rows=1 loops=104)

  • Index Cond: (claims_1.events_staffing_days_positions_id = id)
20. 0.001 0.010 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=72.10..227.89 rows=11 width=229) (actual time=0.010..0.010 rows=0 loops=1)

21. 0.001 0.009 ↓ 0.0 0 1

Nested Loop Left Join (cost=72.10..227.78 rows=11 width=229) (actual time=0.009..0.009 rows=0 loops=1)

22. 0.000 0.008 ↓ 0.0 0 1

Nested Loop Left Join (cost=71.67..219.31 rows=11 width=217) (actual time=0.008..0.008 rows=0 loops=1)

23. 0.000 0.008 ↓ 0.0 0 1

Nested Loop Left Join (cost=71.25..214.29 rows=11 width=217) (actual time=0.008..0.008 rows=0 loops=1)

24. 0.001 0.008 ↓ 0.0 0 1

Nested Loop Left Join (cost=70.83..208.80 rows=11 width=217) (actual time=0.008..0.008 rows=0 loops=1)

25. 0.000 0.007 ↓ 0.0 0 1

Hash Join (cost=70.40..115.79 rows=11 width=170) (actual time=0.007..0.007 rows=0 loops=1)

  • Hash Cond: (adjustments.programs_id = programs_1.id)
26. 0.001 0.007 ↓ 0.0 0 1

Hash Join (cost=2.01..47.25 rows=11 width=134) (actual time=0.007..0.007 rows=0 loops=1)

  • Hash Cond: (adjustments.claim_types_id = claim_types.id)
27. 0.006 0.006 ↓ 0.0 0 1

Index Scan using adjustments_staffing_users_id on adjustments (cost=0.29..45.38 rows=11 width=130) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: (staffing_users_id = 27529)
28. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.32..1.32 rows=32 width=8) (never executed)

29. 0.000 0.000 ↓ 0.0 0

Seq Scan on claim_types (cost=0.00..1.32 rows=32 width=8) (never executed)

30. 0.000 0.000 ↓ 0.0 0

Hash (cost=59.84..59.84 rows=684 width=40) (never executed)

31. 0.000 0.000 ↓ 0.0 0

Seq Scan on programs programs_1 (cost=0.00..59.84 rows=684 width=40) (never executed)

32. 0.000 0.000 ↓ 0.0 0

Index Scan using events_pkey on events events_1 (cost=0.43..8.45 rows=1 width=47) (never executed)

  • Index Cond: (adjustments.events_id = id)
33. 0.000 0.000 ↓ 0.0 0

Index Scan using events_venues_events_id on events_venues events_venues_1 (cost=0.43..0.49 rows=1 width=8) (never executed)

  • Index Cond: (events_1.id = events_id)
34. 0.000 0.000 ↓ 0.0 0

Index Scan using venues_profiles_pkey on venues_profiles venues_profiles_1 (cost=0.42..0.45 rows=1 width=8) (never executed)

  • Index Cond: (events_venues_1.venues_profiles_id = id)
35. 0.000 0.000 ↓ 0.0 0

Index Scan using venues_pkey on venues venues_1 (cost=0.42..0.76 rows=1 width=20) (never executed)

  • Index Cond: (venues_profiles_1.venues_id = id)
36. 0.000 10.366 ↓ 0.0 0 1

Subquery Scan on *SELECT* 3 (cost=30.33..3,027.38 rows=16 width=376) (actual time=10.366..10.366 rows=0 loops=1)

37. 0.002 10.366 ↓ 0.0 0 1

Nested Loop (cost=30.33..3,027.22 rows=16 width=376) (actual time=10.366..10.366 rows=0 loops=1)

38. 0.000 10.364 ↓ 0.0 0 1

Nested Loop (cost=30.19..3,004.26 rows=16 width=368) (actual time=10.364..10.364 rows=0 loops=1)

39. 0.001 10.364 ↓ 0.0 0 1

Nested Loop (cost=29.77..2,992.01 rows=16 width=356) (actual time=10.364..10.364 rows=0 loops=1)

40. 0.000 10.363 ↓ 0.0 0 1

Nested Loop (cost=29.35..2,856.85 rows=16 width=352) (actual time=10.363..10.363 rows=0 loops=1)

41. 0.001 10.363 ↓ 0.0 0 1

Hash Left Join (cost=29.21..2,853.94 rows=16 width=352) (actual time=10.363..10.363 rows=0 loops=1)

  • Hash Cond: (manual_claims.submitted_by = contact_info.user_id)
42. 0.001 10.362 ↓ 0.0 0 1

Nested Loop (cost=0.28..2,824.79 rows=16 width=343) (actual time=10.362..10.362 rows=0 loops=1)

43. 0.014 10.361 ↓ 0.0 0 1

Nested Loop (cost=0.00..2,735.95 rows=16 width=307) (actual time=10.361..10.361 rows=0 loops=1)

  • Join Filter: (manual_claims.claim_types_id = claim_types_1.id)
44. 0.011 0.011 ↑ 1.0 32 1

Seq Scan on claim_types claim_types_1 (cost=0.00..1.32 rows=32 width=8) (actual time=0.003..0.011 rows=32 loops=1)

45. 0.012 10.336 ↓ 0.0 0 32

Materialize (cost=0.00..2,726.99 rows=16 width=303) (actual time=0.323..0.323 rows=0 loops=32)

46. 10.324 10.324 ↓ 0.0 0 1

Seq Scan on manual_claims (cost=0.00..2,726.91 rows=16 width=303) (actual time=10.324..10.324 rows=0 loops=1)

  • Filter: (staffing_users_id = 27529)
  • Rows Removed by Filter: 50346
47. 0.000 0.000 ↓ 0.0 0

Index Scan using programs_pkey on programs programs_2 (cost=0.28..5.54 rows=1 width=40) (never executed)

  • Index Cond: (id = manual_claims.programs_id)
48. 0.000 0.000 ↓ 0.0 0

Hash (cost=18.97..18.97 rows=797 width=17) (never executed)

49. 0.000 0.000 ↓ 0.0 0

Seq Scan on contact_info (cost=0.00..18.97 rows=797 width=17) (never executed)

50. 0.000 0.000 ↓ 0.0 0

Index Only Scan using clients_pkey on clients (cost=0.14..0.17 rows=1 width=4) (never executed)

  • Index Cond: (id = programs_2.clients_id)
  • Heap Fetches: 0
51. 0.000 0.000 ↓ 0.0 0

Index Scan using venues_profiles_pkey on venues_profiles venues_profiles_2 (cost=0.42..8.44 rows=1 width=8) (never executed)

  • Index Cond: (id = manual_claims.venues_profiles_id)
52. 0.000 0.000 ↓ 0.0 0

Index Scan using venues_pkey on venues venues_2 (cost=0.42..0.76 rows=1 width=20) (never executed)

  • Index Cond: (id = venues_profiles_2.venues_id)
53. 0.000 0.000 ↓ 0.0 0

Index Scan using payroll_periods_pkey on payroll_periods payroll_periods_1 (cost=0.14..1.41 rows=1 width=12) (never executed)

  • Index Cond: (id = manual_claims.payroll_periods_id)