explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5FNh

Settings
# exclusive inclusive rows x rows loops node
1. 0.470 2,110.919 ↑ 1.6 368 1

Unique (cost=83,095.27..83,140.92 rows=589 width=2,031) (actual time=2,110.363..2,110.919 rows=368 loops=1)

2.          

CTE transition_events

3. 7.603 36.602 ↑ 1.1 5,578 1

Finalize GroupAggregate (cost=1,639.54..1,752.26 rows=5,893 width=20) (actual time=27.414..36.602 rows=5,578 loops=1)

  • Group Key: loan_status_transition_events.loan_application_id, loan_status_transition_events.to_status
4. 5.011 28.999 ↓ 1.5 5,864 1

Sort (cost=1,639.54..1,649.30 rows=3,906 width=20) (actual time=27.375..28.999 rows=5,864 loops=1)

  • Sort Key: loan_status_transition_events.loan_application_id, loan_status_transition_events.to_status
  • Sort Method: quicksort Memory: 651kB
5. 7.720 23.988 ↓ 1.5 5,864 1

Gather (cost=976.85..1,406.51 rows=3,906 width=20) (actual time=21.040..23.988 rows=5,864 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
6. 2.813 16.268 ↑ 1.3 2,932 2 / 2

Partial HashAggregate (cost=966.85..1,005.91 rows=3,906 width=20) (actual time=15.408..16.268 rows=2,932 loops=2)

  • Group Key: loan_status_transition_events.loan_application_id, loan_status_transition_events.to_status
7. 13.455 13.455 ↑ 1.2 3,376 2 / 2

Parallel Seq Scan on loan_status_transition_events (cost=0.00..937.56 rows=3,906 width=20) (actual time=0.041..13.455 rows=3,376 loops=2)

  • Filter: (to_status = ANY ('{7,10}'::integer[]))
  • Rows Removed by Filter: 46,628
8.          

CTE team_mbrs

9. 0.077 0.077 ↑ 1.5 153 1

Seq Scan on team_members (cost=0.00..2.82 rows=222 width=116) (actual time=0.029..0.077 rows=153 loops=1)

10.          

CTE peoples

11. 0.078 0.078 ↓ 1.0 121 1

Index Scan using persons_pkey on persons (cost=0.14..2.40 rows=117 width=313) (actual time=0.019..0.078 rows=121 loops=1)

12.          

CTE team

13. 33.986 168.431 ↑ 1.0 22,012 1

Hash Left Join (cost=90.49..7,245.71 rows=22,013 width=232) (actual time=2.343..168.431 rows=22,012 loops=1)

  • Hash Cond: (tm_ma.person_id = p_ma.id)
14. 11.203 134.362 ↑ 1.0 22,012 1

Hash Left Join (cost=86.69..6,260.13 rows=22,013 width=400) (actual time=2.202..134.362 rows=22,012 loops=1)

  • Hash Cond: (lat.customer_care_member_id = tm_ma.id)
  • Join Filter: (NOT lat.is_removed)
15. 12.671 123.069 ↑ 1.0 22,012 1

Hash Left Join (cost=79.48..5,424.74 rows=22,013 width=401) (actual time=2.096..123.069 rows=22,012 loops=1)

  • Hash Cond: (lat.received_member_id = tm_re.id)
  • Join Filter: (NOT lat.is_removed)
16. 8.539 110.128 ↑ 1.0 22,012 1

Hash Left Join (cost=66.33..4,588.65 rows=22,013 width=345) (actual time=1.806..110.128 rows=22,012 loops=1)

  • Hash Cond: (lat.closer_member_id = tm_cl.id)
  • Join Filter: (NOT lat.is_removed)
17. 7.731 101.326 ↑ 1.0 22,012 1

Hash Left Join (cost=53.17..3,887.98 rows=22,013 width=289) (actual time=1.527..101.326 rows=22,012 loops=1)

  • Hash Cond: (lat.secondary_member_id = tm_s.id)
  • Join Filter: (NOT lat.is_removed)
18. 8.213 93.287 ↑ 1.0 22,012 1

Hash Left Join (cost=40.02..3,194.47 rows=22,013 width=233) (actual time=1.204..93.287 rows=22,012 loops=1)

  • Hash Cond: (lat.processor_member_id = tm_pr.id)
  • Join Filter: (NOT lat.is_removed)
19. 8.806 84.807 ↑ 1.0 22,012 1

Hash Left Join (cost=26.88..2,475.13 rows=22,013 width=177) (actual time=0.919..84.807 rows=22,012 loops=1)

  • Hash Cond: (lat.underwriter_member_id = tm_u.id)
  • Join Filter: (NOT lat.is_removed)
20. 8.700 75.722 ↑ 1.0 22,012 1

Hash Left Join (cost=13.72..1,752.52 rows=22,013 width=121) (actual time=0.620..75.722 rows=22,012 loops=1)

  • Hash Cond: (lat.quality_review_id = tm_q.id)
  • Join Filter: (NOT lat.is_removed)
21. 24.193 66.476 ↑ 1.0 22,012 1

Merge Left Join (cost=0.57..1,062.66 rows=22,013 width=65) (actual time=0.051..66.476 rows=22,012 loops=1)

  • Merge Cond: (la_1.id = lat.loan_application_id)
22. 12.532 12.532 ↓ 1.0 22,012 1

Index Only Scan using loan_applications_pkey on loan_applications la_1 (cost=0.29..337.10 rows=21,994 width=8) (actual time=0.032..12.532 rows=22,012 loops=1)

  • Heap Fetches: 6,317
23. 29.751 29.751 ↑ 1.0 22,004 1

Index Scan using loan_application_team_members_unique_per_loan on loan_application_team_members lat (cost=0.29..395.61 rows=22,013 width=65) (actual time=0.012..29.751 rows=22,004 loops=1)

24. 0.055 0.546 ↑ 1.5 153 1

Hash (cost=10.38..10.38 rows=222 width=72) (actual time=0.546..0.546 rows=153 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 17kB
25. 0.105 0.491 ↑ 1.5 153 1

Hash Left Join (cost=3.80..10.38 rows=222 width=72) (actual time=0.301..0.491 rows=153 loops=1)

  • Hash Cond: (tm_q.person_id = p_q.id)
26. 0.142 0.142 ↑ 1.5 153 1

CTE Scan on team_mbrs tm_q (cost=0.00..4.44 rows=222 width=16) (actual time=0.031..0.142 rows=153 loops=1)

27. 0.048 0.244 ↓ 1.0 121 1

Hash (cost=2.34..2.34 rows=117 width=72) (actual time=0.244..0.244 rows=121 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 15kB
28. 0.196 0.196 ↓ 1.0 121 1

CTE Scan on peoples p_q (cost=0.00..2.34 rows=117 width=72) (actual time=0.022..0.196 rows=121 loops=1)

29. 0.069 0.279 ↑ 1.5 153 1

Hash (cost=10.38..10.38 rows=222 width=72) (actual time=0.279..0.279 rows=153 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 17kB
30. 0.102 0.210 ↑ 1.5 153 1

Hash Left Join (cost=3.80..10.38 rows=222 width=72) (actual time=0.123..0.210 rows=153 loops=1)

  • Hash Cond: (tm_u.person_id = p_u.id)
31. 0.022 0.022 ↑ 1.5 153 1

CTE Scan on team_mbrs tm_u (cost=0.00..4.44 rows=222 width=16) (actual time=0.001..0.022 rows=153 loops=1)

32. 0.044 0.086 ↓ 1.0 121 1

Hash (cost=2.34..2.34 rows=117 width=72) (actual time=0.086..0.086 rows=121 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 15kB
33. 0.042 0.042 ↓ 1.0 121 1

CTE Scan on peoples p_u (cost=0.00..2.34 rows=117 width=72) (actual time=0.001..0.042 rows=121 loops=1)

34. 0.059 0.267 ↑ 1.5 153 1

Hash (cost=10.38..10.38 rows=222 width=72) (actual time=0.267..0.267 rows=153 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 17kB
35. 0.091 0.208 ↑ 1.5 153 1

Hash Left Join (cost=3.80..10.38 rows=222 width=72) (actual time=0.108..0.208 rows=153 loops=1)

  • Hash Cond: (tm_pr.person_id = p_pr.id)
36. 0.030 0.030 ↑ 1.5 153 1

CTE Scan on team_mbrs tm_pr (cost=0.00..4.44 rows=222 width=16) (actual time=0.000..0.030 rows=153 loops=1)

37. 0.048 0.087 ↓ 1.0 121 1

Hash (cost=2.34..2.34 rows=117 width=72) (actual time=0.087..0.087 rows=121 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 15kB
38. 0.039 0.039 ↓ 1.0 121 1

CTE Scan on peoples p_pr (cost=0.00..2.34 rows=117 width=72) (actual time=0.001..0.039 rows=121 loops=1)

39. 0.063 0.308 ↑ 1.5 153 1

Hash (cost=10.38..10.38 rows=222 width=72) (actual time=0.308..0.308 rows=153 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 17kB
40. 0.122 0.245 ↑ 1.5 153 1

Hash Left Join (cost=3.80..10.38 rows=222 width=72) (actual time=0.133..0.245 rows=153 loops=1)

  • Hash Cond: (tm_s.person_id = p_s.id)
41. 0.020 0.020 ↑ 1.5 153 1

CTE Scan on team_mbrs tm_s (cost=0.00..4.44 rows=222 width=16) (actual time=0.001..0.020 rows=153 loops=1)

42. 0.066 0.103 ↓ 1.0 121 1

Hash (cost=2.34..2.34 rows=117 width=72) (actual time=0.103..0.103 rows=121 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 15kB
43. 0.037 0.037 ↓ 1.0 121 1

CTE Scan on peoples p_s (cost=0.00..2.34 rows=117 width=72) (actual time=0.001..0.037 rows=121 loops=1)

44. 0.054 0.263 ↑ 1.5 153 1

Hash (cost=10.38..10.38 rows=222 width=72) (actual time=0.263..0.263 rows=153 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 17kB
45. 0.099 0.209 ↑ 1.5 153 1

Hash Left Join (cost=3.80..10.38 rows=222 width=72) (actual time=0.103..0.209 rows=153 loops=1)

  • Hash Cond: (tm_cl.person_id = p_cl.id)
46. 0.027 0.027 ↑ 1.5 153 1

CTE Scan on team_mbrs tm_cl (cost=0.00..4.44 rows=222 width=16) (actual time=0.000..0.027 rows=153 loops=1)

47. 0.048 0.083 ↓ 1.0 121 1

Hash (cost=2.34..2.34 rows=117 width=72) (actual time=0.083..0.083 rows=121 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 15kB
48. 0.035 0.035 ↓ 1.0 121 1

CTE Scan on peoples p_cl (cost=0.00..2.34 rows=117 width=72) (actual time=0.001..0.035 rows=121 loops=1)

49. 0.057 0.270 ↑ 1.5 153 1

Hash (cost=10.38..10.38 rows=222 width=72) (actual time=0.270..0.270 rows=153 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 17kB
50. 0.101 0.213 ↑ 1.5 153 1

Hash Left Join (cost=3.80..10.38 rows=222 width=72) (actual time=0.110..0.213 rows=153 loops=1)

  • Hash Cond: (tm_re.person_id = p_re.id)
51. 0.029 0.029 ↑ 1.5 153 1

CTE Scan on team_mbrs tm_re (cost=0.00..4.44 rows=222 width=16) (actual time=0.001..0.029 rows=153 loops=1)

52. 0.047 0.083 ↓ 1.0 121 1

Hash (cost=2.34..2.34 rows=117 width=72) (actual time=0.083..0.083 rows=121 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 15kB
53. 0.036 0.036 ↓ 1.0 121 1

CTE Scan on peoples p_re (cost=0.00..2.34 rows=117 width=72) (actual time=0.001..0.036 rows=121 loops=1)

54. 0.062 0.090 ↑ 1.5 153 1

Hash (cost=4.44..4.44 rows=222 width=16) (actual time=0.090..0.090 rows=153 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 16kB
55. 0.028 0.028 ↑ 1.5 153 1

CTE Scan on team_mbrs tm_ma (cost=0.00..4.44 rows=222 width=16) (actual time=0.001..0.028 rows=153 loops=1)

56. 0.043 0.083 ↓ 1.0 121 1

Hash (cost=2.34..2.34 rows=117 width=72) (actual time=0.083..0.083 rows=121 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 15kB
57. 0.040 0.040 ↓ 1.0 121 1

CTE Scan on peoples p_ma (cost=0.00..2.34 rows=117 width=72) (actual time=0.001..0.040 rows=121 loops=1)

58.          

CTE ltv_dti

59. 60.608 1,622.605 ↓ 35.8 42,999 1

Subquery Scan on a (cost=59,631.23..68,048.21 rows=1,202 width=28) (actual time=1,274.376..1,622.605 rows=42,999 loops=1)

  • Filter: (a.rn = 1)
  • Rows Removed by Filter: 199,995
60. 208.792 1,561.997 ↓ 1.0 242,994 1

WindowAgg (cost=59,631.23..65,042.15 rows=240,485 width=36) (actual time=1,274.359..1,561.997 rows=242,994 loops=1)

61. 393.744 1,353.205 ↓ 1.0 242,994 1

Sort (cost=59,631.23..60,232.45 rows=240,485 width=28) (actual time=1,274.347..1,353.205 rows=242,994 loops=1)

  • Sort Key: loan_tolerance_snapshot_items.loan_application_id, loan_tolerance_snapshot_items.tolerance_property_id, loan_tolerance_snapshot_items.last_updated_date DESC
  • Sort Method: external merge Disk: 9,440kB
62. 959.461 959.461 ↓ 1.0 242,994 1

Seq Scan on loan_tolerance_snapshot_items (cost=0.00..38,137.18 rows=240,485 width=28) (actual time=0.035..959.461 rows=242,994 loops=1)

  • Filter: (tolerance_property_id = ANY ('{4,17,18}'::integer[]))
  • Rows Removed by Filter: 2,052,139
63.          

CTE mi

64. 2.919 29.962 ↓ 200.4 9,620 1

Subquery Scan on a_1 (cost=793.60..1,249.60 rows=48 width=48) (actual time=9.709..29.962 rows=9,620 loops=1)

  • Filter: (a_1.rn = 1)
65. 14.442 27.043 ↓ 1.0 9,620 1

WindowAgg (cost=793.60..1,129.60 rows=9,600 width=56) (actual time=9.704..27.043 rows=9,620 loops=1)

66. 7.726 12.601 ↓ 1.0 9,620 1

Sort (cost=793.60..817.60 rows=9,600 width=20) (actual time=9.681..12.601 rows=9,620 loops=1)

  • Sort Key: mortgage_insurances.loan_application_id, mortgage_insurances.last_updated_date DESC
  • Sort Method: quicksort Memory: 975kB
67. 4.875 4.875 ↓ 1.0 9,620 1

Seq Scan on mortgage_insurances (cost=0.00..158.62 rows=9,600 width=20) (actual time=0.041..4.875 rows=9,620 loops=1)

  • Filter: (NOT is_removed)
  • Rows Removed by Filter: 1,862
68.          

CTE deal_id

69. 62.238 90.131 ↓ 1.0 21,992 1

GroupAggregate (cost=0.29..1,758.93 rows=21,958 width=16) (actual time=0.037..90.131 rows=21,992 loops=1)

  • Group Key: affiliated_business_details.loan_application_id
70. 27.893 27.893 ↓ 1.0 43,983 1

Index Scan using affiliated_business_details_loan_and_business_idx on affiliated_business_details (cost=0.29..770.83 rows=43,915 width=21) (actual time=0.012..27.893 rows=43,983 loops=1)

71. 1.606 2,110.449 ↑ 1.6 368 1

Sort (cost=3,035.34..3,036.81 rows=589 width=2,031) (actual time=2,110.363..2,110.449 rows=368 loops=1)

  • Sort Key: addr.state_code, la.id, b.last_name, (((b.last_name || ', '::text) || b.first_name)), lad.submitted_1003_local_date, ((LEAST((lad.preapproval_local_date)::timestamp without time zone, (lad.fast_preapproval_local_date)::timestamp without time zone, ca.created_instant))::date), lad.application_received_local_date, (CASE WHEN (lad.rate_lock_cancelled_local_date IS NULL) THEN lad.rate_lock_local_date ELSE NULL::date END), lad.closing_local_date, (CASE WHEN (cl.created_instant IS NOT NULL) THEN 1 ELSE 0 END), (CASE WHEN ((lad.closing_local_date IS NOT NULL) AND (lad.application_received_local_date IS NOT NULL) AND (lo.id <> ALL ('{2,31,41,13,33,12,30,23,1,999,42,14,21,22,19,18,20,5,43,3,27,29,28}'::bigint[]))) THEN 1 ELSE 0 END), ltv.value_on_creation, top_dti.value_on_creation, bottom_dti.value_on_creation, lt.amount, lt.interest_rate, (COALESCE((di.deal_id)::bigint, la.deal_id)), lo.name, t.processor, t.underwriter, t.quality_reviewer, t.received, t.closer, t.secondary, t.mortgage_adviser, lo.is_closed_deal, (CASE WHEN (pri.project_type = 2) THEN 'Condo'::text WHEN (pri.num_units > 1) THEN 'Multi-Fam'::text WHEN (pri.num_units = 1) THEN 'SFR'::text ELSE 'Other'::text END), (CASE lt.product_type_id WHEN 1 THEN '30 Yr Fixed'::text WHEN 2 THEN '15 Yr Fixed'::text WHEN 3 THEN '5/1 ARM'::text WHEN 4 THEN '7/1 ARM'::text WHEN 5 THEN '10/1 ARM'::text WHEN 6 THEN '20 Yr Fixed'::text WHEN 7 THEN '25 Yr Fixed'::text WHEN 8 THEN '10 Yr Fixed'::text WHEN 9 THEN '3/1 ARM'::text ELSE NULL::text END), mi.mi_company, (CASE WHEN (COALESCE((di.deal_id)::bigint, la.deal_id) IS NOT NULL) THEN 'Y'::text ELSE 'N'::text END)
  • Sort Method: quicksort Memory: 134kB
72. 2.338 2,108.843 ↑ 1.6 368 1

Nested Loop Left Join (cost=1,669.81..3,008.24 rows=589 width=2,031) (actual time=1,940.052..2,108.843 rows=368 loops=1)

73. 0.530 2,104.297 ↑ 1.6 368 1

Hash Left Join (cost=1,669.52..2,776.53 rows=589 width=1,931) (actual time=1,939.976..2,104.297 rows=368 loops=1)

  • Hash Cond: (la.id = mi.loan_application_id)
74. 0.559 2,064.397 ↑ 1.6 368 1

Hash Left Join (cost=1,667.96..2,772.75 rows=589 width=1,899) (actual time=1,900.588..2,064.397 rows=368 loops=1)

  • Hash Cond: (la.id = bottom_dti.loan_application_id)
75. 0.562 2,048.896 ↑ 1.6 368 1

Hash Left Join (cost=1,640.84..2,743.42 rows=589 width=1,383) (actual time=1,885.619..2,048.896 rows=368 loops=1)

  • Hash Cond: (la.id = top_dti.loan_application_id)
76. 0.657 2,033.211 ↑ 1.6 368 1

Hash Left Join (cost=1,613.72..2,714.08 rows=589 width=867) (actual time=1,870.467..2,033.211 rows=368 loops=1)

  • Hash Cond: (la.id = ltv.loan_application_id)
77. 0.335 375.326 ↑ 1.6 368 1

Nested Loop Left Join (cost=1,586.60..2,684.74 rows=589 width=351) (actual time=213.196..375.326 rows=368 loops=1)

  • Join Filter: (NOT pri.is_removed)
78. 0.652 372.415 ↑ 1.6 368 1

Nested Loop Left Join (cost=1,586.31..2,490.34 rows=589 width=365) (actual time=213.180..372.415 rows=368 loops=1)

79. 0.833 369.555 ↑ 1.6 368 1

Nested Loop Left Join (cost=1,586.02..2,303.30 rows=589 width=342) (actual time=213.164..369.555 rows=368 loops=1)

80. 7.272 366.146 ↑ 1.6 368 1

Hash Right Join (cost=1,585.73..2,114.43 rows=589 width=337) (actual time=213.143..366.146 rows=368 loops=1)

  • Hash Cond: (t.loan_id = la.id)
81. 187.710 187.710 ↑ 1.0 22,012 1

CTE Scan on team t (cost=0.00..440.26 rows=22,013 width=232) (actual time=2.345..187.710 rows=22,012 loops=1)

82. 0.372 171.164 ↑ 1.6 368 1

Hash (cost=1,578.38..1,578.38 rows=588 width=113) (actual time=171.164..171.164 rows=368 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 51kB
83. 0.405 170.792 ↑ 1.6 368 1

Hash Left Join (cost=1,043.64..1,578.38 rows=588 width=113) (actual time=82.731..170.792 rows=368 loops=1)

  • Hash Cond: (la.id = ca.loan_application_id)
84. 0.341 167.657 ↑ 1.6 368 1

Hash Left Join (cost=910.68..1,441.74 rows=588 width=105) (actual time=79.981..167.657 rows=368 loops=1)

  • Hash Cond: (la.id = cl.loan_application_id)
85. 7.153 126.472 ↑ 1.6 368 1

Hash Right Join (cost=777.73..1,305.10 rows=588 width=97) (actual time=39.105..126.472 rows=368 loops=1)

  • Hash Cond: (di.loan_application_id = la.id)
86. 102.680 102.680 ↓ 1.0 21,992 1

CTE Scan on deal_id di (cost=0.00..439.16 rows=21,958 width=12) (actual time=0.040..102.680 rows=21,992 loops=1)

87. 0.321 16.639 ↑ 1.6 368 1

Hash (cost=770.38..770.38 rows=588 width=93) (actual time=16.639..16.639 rows=368 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 46kB
88. 0.625 16.318 ↑ 1.6 368 1

Hash Join (cost=1.24..770.38 rows=588 width=93) (actual time=0.303..16.318 rows=368 loops=1)

  • Hash Cond: (la.loan_status_id = lo.id)
89. 0.710 15.649 ↓ 1.0 1,192 1

Nested Loop (cost=0.29..759.14 rows=1,175 width=60) (actual time=0.166..15.649 rows=1,192 loops=1)

90. 8.954 8.954 ↑ 1.0 1,197 1

Seq Scan on loan_application_dates lad (cost=0.00..315.66 rows=1,199 width=36) (actual time=0.148..8.954 rows=1,197 loops=1)

  • Filter: ((application_received_local_date IS NOT NULL) AND (closing_local_date >= (('now'::cstring)::date - 90)))
  • Rows Removed by Filter: 12,331
91. 5.985 5.985 ↑ 1.0 1 1,197

Index Scan using loan_applications_pkey on loan_applications la (cost=0.29..0.36 rows=1 width=32) (actual time=0.004..0.005 rows=1 loops=1,197)

  • Index Cond: (id = lad.loan_application_id)
  • Filter: ((NOT is_test) AND (NOT is_removed))
  • Rows Removed by Filter: 0
92. 0.016 0.044 ↓ 1.5 34 1

Hash (cost=0.66..0.66 rows=23 width=41) (actual time=0.044..0.044 rows=34 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
93. 0.028 0.028 ↓ 1.5 34 1

Seq Scan on loan_status lo (cost=0.00..0.66 rows=23 width=41) (actual time=0.013..0.028 rows=34 loops=1)

  • Filter: is_active
  • Rows Removed by Filter: 19
94. 0.922 40.844 ↓ 81.1 2,351 1

Hash (cost=132.59..132.59 rows=29 width=16) (actual time=40.844..40.844 rows=2,351 loops=1)

  • Buckets: 4,096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 143kB
95. 39.922 39.922 ↓ 81.1 2,351 1

CTE Scan on transition_events cl (cost=0.00..132.59 rows=29 width=16) (actual time=27.429..39.922 rows=2,351 loops=1)

  • Filter: (to_status = 10)
  • Rows Removed by Filter: 3,227
96. 1.034 2.730 ↓ 111.3 3,227 1

Hash (cost=132.59..132.59 rows=29 width=16) (actual time=2.730..2.730 rows=3,227 loops=1)

  • Buckets: 4,096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 184kB
97. 1.696 1.696 ↓ 111.3 3,227 1

CTE Scan on transition_events ca (cost=0.00..132.59 rows=29 width=16) (actual time=0.004..1.696 rows=3,227 loops=1)

  • Filter: (to_status = 7)
  • Rows Removed by Filter: 2,351
98. 2.576 2.576 ↑ 1.0 1 368

Index Scan using borrowers_pkey on borrowers b (cost=0.29..0.31 rows=1 width=21) (actual time=0.007..0.007 rows=1 loops=368)

  • Index Cond: (la.primary_borrower_id = id)
99. 2.208 2.208 ↑ 1.0 1 368

Index Scan using property_information_loan_application_idx on property_information pri (cost=0.29..0.31 rows=1 width=23) (actual time=0.005..0.006 rows=1 loops=368)

  • Index Cond: (loan_application_id = la.id)
  • Filter: (NOT is_removed)
100. 2.576 2.576 ↑ 1.0 1 368

Index Scan using addresses_pkey on addresses addr (cost=0.29..0.32 rows=1 width=19) (actual time=0.006..0.007 rows=1 loops=368)

  • Index Cond: (address_id = pri.address_id)
  • Filter: (loan_application_id = pri.loan_application_id)
101. 6.796 1,657.228 ↓ 2,388.8 14,333 1

Hash (cost=27.04..27.04 rows=6 width=524) (actual time=1,657.228..1,657.228 rows=14,333 loops=1)

  • Buckets: 16,384 (originally 1024) Batches: 1 (originally 1) Memory Usage: 799kB
102. 1,650.432 1,650.432 ↓ 2,388.8 14,333 1

CTE Scan on ltv_dti ltv (cost=0.00..27.04 rows=6 width=524) (actual time=1,274.384..1,650.432 rows=14,333 loops=1)

  • Filter: (tolerance_property_id = 4)
  • Rows Removed by Filter: 28,666
103. 4.333 15.123 ↓ 2,388.8 14,333 1

Hash (cost=27.04..27.04 rows=6 width=524) (actual time=15.123..15.123 rows=14,333 loops=1)

  • Buckets: 16,384 (originally 1024) Batches: 1 (originally 1) Memory Usage: 792kB
104. 10.790 10.790 ↓ 2,388.8 14,333 1

CTE Scan on ltv_dti top_dti (cost=0.00..27.04 rows=6 width=524) (actual time=0.005..10.790 rows=14,333 loops=1)

  • Filter: (tolerance_property_id = 17)
  • Rows Removed by Filter: 28,666
105. 4.448 14.942 ↓ 2,388.8 14,333 1

Hash (cost=27.04..27.04 rows=6 width=524) (actual time=14.942..14.942 rows=14,333 loops=1)

  • Buckets: 16,384 (originally 1024) Batches: 1 (originally 1) Memory Usage: 793kB
106. 10.494 10.494 ↓ 2,388.8 14,333 1

CTE Scan on ltv_dti bottom_dti (cost=0.00..27.04 rows=6 width=524) (actual time=0.018..10.494 rows=14,333 loops=1)

  • Filter: (tolerance_property_id = 18)
  • Rows Removed by Filter: 28,666
107. 3.698 39.370 ↓ 200.4 9,620 1

Hash (cost=0.96..0.96 rows=48 width=40) (actual time=39.370..39.370 rows=9,620 loops=1)

  • Buckets: 16,384 (originally 1024) Batches: 1 (originally 1) Memory Usage: 556kB
108. 35.672 35.672 ↓ 200.4 9,620 1

CTE Scan on mi (cost=0.00..0.96 rows=48 width=40) (actual time=9.713..35.672 rows=9,620 loops=1)

109. 2.208 2.208 ↑ 1.0 1 368

Index Scan using loan_terms_unique_per_loan on loan_terms lt (cost=0.29..0.31 rows=1 width=24) (actual time=0.005..0.006 rows=1 loops=368)

  • Index Cond: (la.id = loan_application_id)
Planning time : 16.796 ms
Execution time : 2,118.388 ms