explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AXYs

Settings
# exclusive inclusive rows x rows loops node
1. 0.046 3,079.708 ↓ 1.3 104 1

Append (cost=10,000,159,718.46..10,000,323,571.77 rows=80 width=492) (actual time=2,690.702..3,079.708 rows=104 loops=1)

2. 0.325 3,067.584 ↓ 2.0 104 1

Nested Loop (cost=10,000,159,718.46..10,000,194,299.71 rows=53 width=581) (actual time=2,690.699..3,067.584 rows=104 loops=1)

3. 101.751 3,067.155 ↓ 2.0 104 1

Hash Left Join (cost=159,718.17..194,290.20 rows=53 width=567) (actual time=2,690.566..3,067.155 rows=104 loops=1)

  • Hash Cond: (claims_1.events_staffing_days_positions_id = events_staffing_days_positions.id)
4. 0.139 2,186.435 ↓ 2.0 104 1

Hash Join (cost=107,345.90..137,457.21 rows=53 width=563) (actual time=1,868.440..2,186.435 rows=104 loops=1)

  • Hash Cond: (events.programs_id = programs.id)
5. 87.611 2,185.662 ↓ 2.0 104 1

Hash Join (cost=107,277.51..137,388.09 rows=53 width=531) (actual time=1,867.786..2,185.662 rows=104 loops=1)

  • Hash Cond: (claims_1.events_id = events.id)
6. 0.128 1,128.021 ↓ 2.0 104 1

Hash Join (cost=45,146.57..64,506.42 rows=53 width=484) (actual time=897.488..1,128.021 rows=104 loops=1)

  • Hash Cond: (claims_1.payroll_periods_id = payroll_periods.id)
7. 120.587 1,127.807 ↓ 2.0 104 1

Hash Join (cost=45,140.87..64,499.99 rows=53 width=476) (actual time=897.359..1,127.807 rows=104 loops=1)

  • Hash Cond: (venues.id = venues_profiles.venues_id)
8. 128.525 128.525 ↑ 1.0 447,279 1

Seq Scan on venues (cost=0.00..17,658.79 rows=453,279 width=20) (actual time=0.006..128.525 rows=447,279 loops=1)

9. 0.099 878.695 ↓ 2.0 104 1

Hash (cost=45,140.21..45,140.21 rows=53 width=464) (actual time=878.695..878.695 rows=104 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 32kB
10. 51.501 878.596 ↓ 2.0 104 1

Hash Join (cost=40,815.88..45,140.21 rows=53 width=464) (actual time=795.497..878.596 rows=104 loops=1)

  • Hash Cond: (venues_profiles.id = events_venues.venues_profiles_id)
11. 46.348 46.348 ↑ 1.0 192,138 1

Seq Scan on venues_profiles (cost=0.00..3,602.49 rows=192,349 width=8) (actual time=0.003..46.348 rows=192,138 loops=1)

12. 0.126 780.747 ↓ 2.0 104 1

Hash (cost=40,815.22..40,815.22 rows=53 width=460) (actual time=780.747..780.747 rows=104 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 31kB
13. 93.735 780.621 ↓ 2.0 104 1

Hash Join (cost=36,350.45..40,815.22 rows=53 width=460) (actual time=687.280..780.621 rows=104 loops=1)

  • Hash Cond: (claims_1.events_id = events_venues.events_id)
14. 0.216 0.216 ↓ 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.038..0.216 rows=104 loops=1)

  • Index Cond: (staffing_users_id = 27529)
15. 367.843 686.670 ↓ 1.0 1,096,238 1

Hash (cost=18,447.01..18,447.01 rows=1,091,201 width=8) (actual time=686.670..686.670 rows=1,096,238 loops=1)

  • Buckets: 131072 Batches: 16 Memory Usage: 3721kB
16. 318.827 318.827 ↓ 1.0 1,096,238 1

Seq Scan on events_venues (cost=0.00..18,447.01 rows=1,091,201 width=8) (actual time=0.005..318.827 rows=1,096,238 loops=1)

17. 0.040 0.086 ↓ 1.0 121 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
18. 0.046 0.046 ↓ 1.0 121 1

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

19. 457.632 970.030 ↑ 1.0 1,095,863 1

Hash (cost=37,639.53..37,639.53 rows=1,099,953 width=55) (actual time=970.030..970.030 rows=1,095,863 loops=1)

  • Buckets: 65536 Batches: 32 Memory Usage: 2688kB
20. 512.398 512.398 ↑ 1.0 1,095,863 1

Seq Scan on events (cost=0.00..37,639.53 rows=1,099,953 width=55) (actual time=0.005..512.398 rows=1,095,863 loops=1)

21. 0.237 0.634 ↑ 1.0 683 1

Hash (cost=59.84..59.84 rows=684 width=36) (actual time=0.634..0.634 rows=683 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 56kB
22. 0.397 0.397 ↑ 1.0 683 1

Seq Scan on programs (cost=0.00..59.84 rows=684 width=36) (actual time=0.003..0.397 rows=683 loops=1)

23. 382.243 778.969 ↑ 1.0 1,138,124 1

Hash (cost=33,675.12..33,675.12 rows=1,139,612 width=8) (actual time=778.969..778.969 rows=1,138,124 loops=1)

  • Buckets: 131072 Batches: 16 Memory Usage: 3812kB
24. 396.726 396.726 ↑ 1.0 1,138,124 1

Seq Scan on events_staffing_days_positions (cost=0.00..33,675.12 rows=1,139,612 width=8) (actual time=0.008..396.726 rows=1,138,124 loops=1)

25. 0.088 0.104 ↑ 1.0 1 104

Materialize (cost=0.29..8.31 rows=1 width=18) (actual time=0.000..0.001 rows=1 loops=104)

26. 0.016 0.016 ↑ 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.015..0.016 rows=1 loops=1)

  • Index Cond: (id = 27529)
27. 0.005 0.778 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=82,492.95..101,852.11 rows=11 width=229) (actual time=0.778..0.778 rows=0 loops=1)

28. 0.019 0.773 ↓ 0.0 0 1

Hash Join (cost=82,492.95..101,852.00 rows=11 width=229) (actual time=0.773..0.773 rows=0 loops=1)

  • Hash Cond: (adjustments.programs_id = programs_1.id)
29. 0.012 0.100 ↓ 0.0 0 1

Hash Join (cost=82,424.56..101,783.41 rows=11 width=193) (actual time=0.100..0.100 rows=0 loops=1)

  • Hash Cond: (adjustments.claim_types_id = claim_types.id)
30. 0.008 0.059 ↓ 0.0 0 1

Hash Right Join (cost=82,422.84..101,781.53 rows=11 width=189) (actual time=0.059..0.059 rows=0 loops=1)

  • Hash Cond: (venues_1.id = venues_profiles_1.venues_id)
31. 0.000 0.000 ↓ 0.0 0

Seq Scan on venues venues_1 (cost=0.00..17,658.79 rows=453,279 width=20) (never executed)

32. 0.003 0.051 ↓ 0.0 0 1

Hash (cost=82,422.70..82,422.70 rows=11 width=177) (actual time=0.051..0.051 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
33. 0.008 0.048 ↓ 0.0 0 1

Hash Right Join (cost=78,098.79..82,422.70 rows=11 width=177) (actual time=0.048..0.048 rows=0 loops=1)

  • Hash Cond: (venues_profiles_1.id = events_venues_1.venues_profiles_id)
34. 0.000 0.000 ↓ 0.0 0

Seq Scan on venues_profiles venues_profiles_1 (cost=0.00..3,602.49 rows=192,349 width=8) (never executed)

35. 0.002 0.040 ↓ 0.0 0 1

Hash (cost=78,098.65..78,098.65 rows=11 width=177) (actual time=0.040..0.040 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
36. 0.008 0.038 ↓ 0.0 0 1

Hash Right Join (cost=55,559.53..78,098.65 rows=11 width=177) (actual time=0.038..0.038 rows=0 loops=1)

  • Hash Cond: (events_venues_1.events_id = events_1.id)
37. 0.000 0.000 ↓ 0.0 0

Seq Scan on events_venues events_venues_1 (cost=0.00..18,447.01 rows=1,091,201 width=8) (never executed)

38. 0.003 0.030 ↓ 0.0 0 1

Hash (cost=55,559.39..55,559.39 rows=11 width=177) (actual time=0.030..0.030 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
39. 0.009 0.027 ↓ 0.0 0 1

Hash Right Join (cost=45.52..55,559.39 rows=11 width=177) (actual time=0.027..0.027 rows=0 loops=1)

  • Hash Cond: (events_1.id = adjustments.events_id)
40. 0.000 0.000 ↓ 0.0 0

Seq Scan on events events_1 (cost=0.00..37,639.53 rows=1,099,953 width=47) (never executed)

41. 0.001 0.018 ↓ 0.0 0 1

Hash (cost=45.38..45.38 rows=11 width=130) (actual time=0.018..0.018 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
42. 0.017 0.017 ↓ 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.017..0.017 rows=0 loops=1)

  • Index Cond: (staffing_users_id = 27529)
43. 0.011 0.029 ↑ 1.0 32 1

Hash (cost=1.32..1.32 rows=32 width=8) (actual time=0.029..0.029 rows=32 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
44. 0.018 0.018 ↑ 1.0 32 1

Seq Scan on claim_types (cost=0.00..1.32 rows=32 width=8) (actual time=0.008..0.018 rows=32 loops=1)

45. 0.244 0.654 ↑ 1.0 683 1

Hash (cost=59.84..59.84 rows=684 width=40) (actual time=0.654..0.654 rows=683 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 59kB
46. 0.410 0.410 ↑ 1.0 683 1

Seq Scan on programs programs_1 (cost=0.00..59.84 rows=684 width=40) (actual time=0.008..0.410 rows=683 loops=1)

47. 0.002 11.300 ↓ 0.0 0 1

Subquery Scan on *SELECT* 3 (cost=8,059.18..27,419.42 rows=16 width=376) (actual time=11.300..11.300 rows=0 loops=1)

48. 0.003 11.298 ↓ 0.0 0 1

Hash Left Join (cost=8,059.18..27,419.26 rows=16 width=376) (actual time=11.298..11.298 rows=0 loops=1)

  • Hash Cond: (manual_claims.submitted_by = contact_info.user_id)
49. 0.011 11.295 ↓ 0.0 0 1

Hash Join (cost=8,030.24..27,389.87 rows=16 width=367) (actual time=11.295..11.295 rows=0 loops=1)

  • Hash Cond: (manual_claims.payroll_periods_id = payroll_periods_1.id)
50. 0.011 11.200 ↓ 0.0 0 1

Hash Join (cost=8,024.54..27,383.95 rows=16 width=359) (actual time=11.200..11.200 rows=0 loops=1)

  • Hash Cond: (programs_2.clients_id = clients.id)
51. 0.010 11.136 ↓ 0.0 0 1

Hash Join (cost=8,020.81..27,380.00 rows=16 width=359) (actual time=11.136..11.136 rows=0 loops=1)

  • Hash Cond: (manual_claims.programs_id = programs_2.id)
52. 0.013 10.587 ↓ 0.0 0 1

Hash Join (cost=7,952.42..27,311.39 rows=16 width=323) (actual time=10.587..10.587 rows=0 loops=1)

  • Hash Cond: (manual_claims.claim_types_id = claim_types_1.id)
53. 0.012 10.549 ↓ 0.0 0 1

Hash Join (cost=7,950.70..27,309.45 rows=16 width=319) (actual time=10.549..10.549 rows=0 loops=1)

  • Hash Cond: (venues_2.id = venues_profiles_2.venues_id)
54. 0.005 0.005 ↑ 453,279.0 1 1

Seq Scan on venues venues_2 (cost=0.00..17,658.79 rows=453,279 width=20) (actual time=0.005..0.005 rows=1 loops=1)

55. 0.001 10.532 ↓ 0.0 0 1

Hash (cost=7,950.50..7,950.50 rows=16 width=307) (actual time=10.532..10.532 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
56. 0.009 10.531 ↓ 0.0 0 1

Merge Join (cost=2,727.65..7,950.50 rows=16 width=307) (actual time=10.531..10.531 rows=0 loops=1)

  • Merge Cond: (venues_profiles_2.id = manual_claims.venues_profiles_id)
57. 0.012 0.012 ↑ 192,349.0 1 1

Index Scan using venues_profiles_pkey on venues_profiles venues_profiles_2 (cost=0.42..6,759.28 rows=192,349 width=8) (actual time=0.012..0.012 rows=1 loops=1)

58. 0.054 10.510 ↓ 0.0 0 1

Sort (cost=2,727.23..2,727.27 rows=16 width=303) (actual time=10.510..10.510 rows=0 loops=1)

  • Sort Key: manual_claims.venues_profiles_id
  • Sort Method: quicksort Memory: 25kB
59. 10.456 10.456 ↓ 0.0 0 1

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

  • Filter: (staffing_users_id = 27529)
  • Rows Removed by Filter: 50346
60. 0.014 0.025 ↑ 1.0 32 1

Hash (cost=1.32..1.32 rows=32 width=8) (actual time=0.025..0.025 rows=32 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
61. 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.004..0.011 rows=32 loops=1)

62. 0.236 0.539 ↑ 1.0 683 1

Hash (cost=59.84..59.84 rows=684 width=40) (actual time=0.539..0.539 rows=683 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 59kB
63. 0.303 0.303 ↑ 1.0 683 1

Seq Scan on programs programs_2 (cost=0.00..59.84 rows=684 width=40) (actual time=0.002..0.303 rows=683 loops=1)

64. 0.028 0.053 ↑ 1.0 77 1

Hash (cost=2.77..2.77 rows=77 width=4) (actual time=0.053..0.053 rows=77 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
65. 0.025 0.025 ↑ 1.0 77 1

Seq Scan on clients (cost=0.00..2.77 rows=77 width=4) (actual time=0.003..0.025 rows=77 loops=1)

66. 0.039 0.084 ↓ 1.0 121 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
67. 0.045 0.045 ↓ 1.0 121 1

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

68. 0.000 0.000 ↓ 0.0 0

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

69. 0.000 0.000 ↓ 0.0 0

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