explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dxLl

Settings
# exclusive inclusive rows x rows loops node
1. 0.445 2,119.243 ↑ 1.6 368 1

Unique (cost=83,193.26..83,238.90 rows=589 width=2,031) (actual time=2,118.710..2,119.243 rows=368 loops=1)

2.          

CTE transition_events

3. 7.588 36.960 ↑ 1.1 5,578 1

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

  • Group Key: loan_status_transition_events.loan_application_id, loan_status_transition_events.to_status
4. 5.039 29.372 ↓ 1.5 5,873 1

Sort (cost=1,639.54..1,649.30 rows=3,906 width=20) (actual time=27.744..29.372 rows=5,873 loops=1)

  • Sort Key: loan_status_transition_events.loan_application_id, loan_status_transition_events.to_status
  • Sort Method: quicksort Memory: 651kB
5. 8.012 24.333 ↓ 1.5 5,873 1

Gather (cost=976.85..1,406.51 rows=3,906 width=20) (actual time=21.199..24.333 rows=5,873 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
6. 3.054 16.321 ↑ 1.3 2,936 2 / 2

Partial HashAggregate (cost=966.85..1,005.91 rows=3,906 width=20) (actual time=15.354..16.321 rows=2,936 loops=2)

  • Group Key: loan_status_transition_events.loan_application_id, loan_status_transition_events.to_status
7. 13.267 13.267 ↑ 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.267 rows=3,376 loops=2)

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

CTE team_mbrs

9. 0.054 0.054 ↑ 1.5 153 1

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

10.          

CTE peoples

11. 0.063 0.063 ↓ 1.0 121 1

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

12.          

CTE team

13. 34.285 167.761 ↑ 1.0 22,012 1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  • Merge Cond: (la_1.id = lat.loan_application_id)
22. 12.095 12.095 ↓ 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.095 rows=22,012 loops=1)

  • Heap Fetches: 6,317
23. 29.797 29.797 ↑ 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.015..29.797 rows=22,004 loops=1)

24. 0.060 0.506 ↑ 1.5 153 1

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

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

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

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

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

27. 0.048 0.210 ↓ 1.0 121 1

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

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

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

29. 0.068 0.317 ↑ 1.5 153 1

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

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

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

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

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

32. 0.080 0.116 ↓ 1.0 121 1

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

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

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

34. 0.049 0.278 ↑ 1.5 153 1

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

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

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

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

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

37. 0.059 0.098 ↓ 1.0 121 1

Hash (cost=2.34..2.34 rows=117 width=72) (actual time=0.098..0.098 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.066 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
40. 0.101 0.201 ↑ 1.5 153 1

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

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

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

42. 0.049 0.084 ↓ 1.0 121 1

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

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

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

44. 0.052 0.290 ↑ 1.5 153 1

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

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

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

  • Hash Cond: (tm_cl.person_id = p_cl.id)
46. 0.024 0.024 ↑ 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.024 rows=153 loops=1)

47. 0.045 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.038 0.038 ↓ 1.0 121 1

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

49. 0.043 0.277 ↑ 1.5 153 1

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

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

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

  • Hash Cond: (tm_re.person_id = p_re.id)
51. 0.026 0.026 ↑ 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.026 rows=153 loops=1)

52. 0.040 0.087 ↓ 1.0 121 1

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

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

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

54. 0.041 0.093 ↑ 1.5 153 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 16kB
55. 0.052 0.052 ↑ 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.052 rows=153 loops=1)

56. 0.046 0.089 ↓ 1.0 121 1

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

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

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

58.          

CTE ltv_dti

59. 58.994 1,629.923 ↓ 35.8 42,999 1

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

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

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

61. 402.543 1,359.316 ↓ 1.0 242,994 1

Sort (cost=59,631.23..60,232.45 rows=240,485 width=28) (actual time=1,276.866..1,359.316 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. 956.773 956.773 ↓ 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.034..956.773 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. 14.278 27.175 ↓ 1.0 9,620 1

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

65. 7.955 12.897 ↓ 1.0 9,620 1

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

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

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

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

CTE deal_id

68. 62.278 90.907 ↓ 1.0 21,992 1

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

  • Group Key: affiliated_business_details.loan_application_id
69. 28.629 28.629 ↓ 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.010..28.629 rows=43,983 loops=1)

70. 1.627 2,118.798 ↑ 1.6 368 1

Sort (cost=3,253.33..3,254.80 rows=589 width=2,031) (actual time=2,118.709..2,118.798 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
71. 2.186 2,117.171 ↑ 1.6 368 1

Nested Loop Left Join (cost=1,884.85..3,226.23 rows=589 width=2,031) (actual time=1,949.946..2,117.171 rows=368 loops=1)

72. 0.515 2,112.777 ↑ 1.6 368 1

Hash Left Join (cost=1,884.56..2,994.52 rows=589 width=1,931) (actual time=1,949.869..2,112.777 rows=368 loops=1)

  • Hash Cond: (la.id = mi.loan_application_id)
73. 0.572 2,074.017 ↑ 1.6 368 1

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

  • Hash Cond: (la.id = bottom_dti.loan_application_id)
74. 0.547 2,058.307 ↑ 1.6 368 1

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

  • Hash Cond: (la.id = top_dti.loan_application_id)
75. 0.648 2,041.499 ↑ 1.6 368 1

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

  • Hash Cond: (la.id = ltv.loan_application_id)
76. 0.802 375.234 ↑ 1.6 368 1

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

  • Join Filter: (NOT pri.is_removed)
77. 0.583 372.224 ↑ 1.6 368 1

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

78. 0.721 369.433 ↑ 1.6 368 1

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

79. 7.304 366.136 ↑ 1.6 368 1

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

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

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

81. 0.394 171.792 ↑ 1.6 368 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 51kB
82. 0.388 171.398 ↑ 1.6 368 1

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

  • Hash Cond: (la.id = ca.loan_application_id)
83. 0.322 168.298 ↑ 1.6 368 1

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

  • Hash Cond: (la.id = cl.loan_application_id)
84. 7.269 126.750 ↑ 1.6 368 1

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

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

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

86. 0.320 15.973 ↑ 1.6 368 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 46kB
87. 0.605 15.653 ↑ 1.6 368 1

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

  • Hash Cond: (la.loan_status_id = lo.id)
88. 0.470 15.003 ↓ 1.0 1,192 1

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

89. 8.548 8.548 ↑ 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.139..8.548 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
90. 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
91. 0.018 0.045 ↓ 1.5 34 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
92. 0.027 0.027 ↓ 1.5 34 1

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

  • Filter: is_active
  • Rows Removed by Filter: 19
93. 0.963 41.226 ↓ 81.1 2,351 1

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

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

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

  • Filter: (to_status = 10)
  • Rows Removed by Filter: 3,227
95. 1.026 2.712 ↓ 111.3 3,227 1

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

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

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

  • Filter: (to_status = 7)
  • Rows Removed by Filter: 2,351
97. 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.006..0.007 rows=1 loops=368)

  • Index Cond: (la.primary_borrower_id = id)
98. 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)
99. 2.208 2.208 ↑ 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.006 rows=1 loops=368)

  • Index Cond: (address_id = pri.address_id)
  • Filter: (loan_application_id = pri.loan_application_id)
100. 6.795 1,665.617 ↓ 2,388.8 14,333 1

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

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

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

  • Filter: (tolerance_property_id = 4)
  • Rows Removed by Filter: 28,666
102. 5.161 16.261 ↓ 2,388.8 14,333 1

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

  • Buckets: 16,384 (originally 1024) Batches: 1 (originally 1) Memory Usage: 792kB
103. 11.100 11.100 ↓ 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..11.100 rows=14,333 loops=1)

  • Filter: (tolerance_property_id = 17)
  • Rows Removed by Filter: 28,666
104. 4.598 15.138 ↓ 2,388.8 14,333 1

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

  • Buckets: 16,384 (originally 1024) Batches: 1 (originally 1) Memory Usage: 793kB
105. 10.540 10.540 ↓ 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.007..10.540 rows=14,333 loops=1)

  • Filter: (tolerance_property_id = 18)
  • Rows Removed by Filter: 28,666
106. 4.059 38.245 ↓ 200.4 9,620 1

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

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

CTE Scan on mi (cost=0.00..216.00 rows=48 width=40) (actual time=9.756..34.186 rows=9,620 loops=1)

  • Filter: (rn = 1)
108. 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 : 17.288 ms
Execution time : 2,127.061 ms