explain.depesz.com

PostgreSQL's explain analyze made readable

Result: A6Yl : Optimization for: plan #sWHF

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Subquery Scan on a (cost=38,767,277.25..42,831,570.21 rows=14,515,332 width=772) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=38,767,277.25..42,613,840.23 rows=14,515,332 width=768) (actual rows= loops=)

  • Group Key: e.id, e.lead_id, e.created_at, l.created_at, l.updated_at, mst.sale_type, e.otp_verified, er.id, er.project_id, er.option_id, er.listing_id, pj.cms_project_name, (CASE WHEN (pj.latitude < '1'::double precision) THEN COALESCE(lt.latitude, lt2.latitude) ELSE COALESCE(pj.latitude, lt.latitude, lt2.latitude) END), (CASE WHEN (pj.longitude < '1'::double precision) THEN COALESCE(lt.longitude, lt2.longitude) ELSE COALESCE(pj.longitude, lt.longitude, lt2.longitude) END), (COALESCE(cs1.display_name, cs2.display_name, mps.project_status)), pj.promised_completion_date, er.locality_id, loc.label, er.bedroom, e.city_id, city.label, (COALESCE(rpo.option_type, rpo2.option_type, (((array_agg(DISTINCT rpo3.option_type)))::text)::character varying)), (COALESCE((rpo.bedrooms)::text, (rpo2.bedrooms)::text, ((array_agg(DISTINCT rpo3.bedrooms)))::text)), (COALESCE((er.min_budget)::bigint, CASE WHEN ((lp1.price IS NOT NULL) AND (lp1.price <> 0)) THEN (lp1.price)::bigint WHEN (((lp1.price IS NULL) OR (lp1.price = 0)) AND (rpo."SIZE" IS NOT NULL)) THEN (COALESCE((lp1.price_per_unit_area)::bigint, rpo.carpet_area) * rpo."SIZE") ELSE (lp1.price_per_unit_area * rpo.carpet_area) END, CASE WHEN ((lp2.price IS NOT NULL) AND (lp2.price <> 0)) THEN (lp2.price)::bigint WHEN (((lp2.price IS NULL) OR (lp2.price = 0)) AND (rpo2."SIZE" IS NOT NULL)) THEN (COALESCE((lp2.price_per_unit_area)::bigint, rpo2.carpet_area) * rpo2."SIZE") ELSE (lp2.price_per_unit_area * rpo2.carpet_area) END, (min(CASE WHEN ((lp3.price IS NOT NULL) AND (lp3.price <> 0)) THEN (lp3.price)::bigint WHEN (((lp3.price IS NULL) OR (lp3.price = 0)) AND (rpo3."SIZE" IS NOT NULL)) THEN (COALESCE((lp3.price_per_unit_area)::bigint, rpo3.carpet_area) * rpo3."SIZE") ELSE (lp3.price_per_unit_area * rpo3.carpet_area) END)))), (COALESCE((er.max_budget)::bigint, CASE WHEN ((lp1.price IS NOT NULL) AND (lp1.price <> 0)) THEN (lp1.price)::bigint WHEN (((lp1.price IS NULL) OR (lp1.price = 0)) AND (rpo."SIZE" IS NOT NULL)) THEN (COALESCE((lp1.price_per_unit_area)::bigint, rpo.carpet_area) * rpo."SIZE") ELSE (lp1.price_per_unit_area * rpo.carpet_area) END, CASE WHEN ((lp2.price IS NOT NULL) AND (lp2.price <> 0)) THEN (lp2.price)::bigint WHEN (((lp2.price IS NULL) OR (lp2.price = 0)) AND (rpo2."SIZE" IS NOT NULL)) THEN (COALESCE((lp2.price_per_unit_area)::bigint, rpo2.carpet_area) * rpo2."SIZE") ELSE (lp2.price_per_unit_area * rpo2.carpet_area) END, (max(CASE WHEN ((lp3.price IS NOT NULL) AND (lp3.price <> 0)) THEN (lp3.price)::bigint WHEN (((lp3.price IS NULL) OR (lp3.price = 0)) AND (rpo3."SIZE" IS NOT NULL)) THEN (COALESCE((lp3.price_per_unit_area)::bigint, rpo3.carpet_area) * rpo3."SIZE") ELSE (lp3.price_per_unit_area * rpo3.carpet_area) END)))), ea.is_fake, ea.duplicate_lead, ea.lead_filler, ea.lead_generator, e.source_lead_id, ms.source, sc.name, e.client_id, us.full_name, (COALESCE(ct.country_code, pct.dial_code)), l.company_id, (CASE WHEN (e.domain_id = 1) THEN 'Makaan'::text WHEN (e.domain_id = 2) THEN 'PropTiger'::text WHEN (e.domain_id = 5) THEN 'Housing'::text ELSE 'Other'::text END), (CASE WHEN (l.company_id = 499) THEN 'Yes'::text ELSE 'No'::text END), la.agent_id
3. 0.000 0.000 ↓ 0.0

Sort (cost=38,767,277.25..38,803,565.58 rows=14,515,332 width=552) (actual rows= loops=)

  • Sort Key: e.id, e.lead_id, e.created_at, l.created_at, l.updated_at, mst.sale_type, e.otp_verified, er.id, er.project_id, er.option_id, er.listing_id, pj.cms_project_name, (CASE WHEN (pj.latitude < '1'::double precision) THEN COALESCE(lt.latitude, lt2.latitude) ELSE COALESCE(pj.latitude, lt.latitude, lt2.latitude) END), (CASE WHEN (pj.longitude < '1'::double precision) THEN COALESCE(lt.longitude, lt2.longitude) ELSE COALESCE(pj.longitude, lt.longitude, lt2.longitude) END), (COALESCE(cs1.display_name, cs2.display_name, mps.project_status)), pj.promised_completion_date, er.locality_id, loc.label, er.bedroom, e.city_id, city.label, (COALESCE(rpo.option_type, rpo2.option_type, (((array_agg(DISTINCT rpo3.option_type)))::text)::character varying)), (COALESCE((rpo.bedrooms)::text, (rpo2.bedrooms)::text, ((array_agg(DISTINCT rpo3.bedrooms)))::text)), (COALESCE((er.min_budget)::bigint, CASE WHEN ((lp1.price IS NOT NULL) AND (lp1.price <> 0)) THEN (lp1.price)::bigint WHEN (((lp1.price IS NULL) OR (lp1.price = 0)) AND (rpo."SIZE" IS NOT NULL)) THEN (COALESCE((lp1.price_per_unit_area)::bigint, rpo.carpet_area) * rpo."SIZE") ELSE (lp1.price_per_unit_area * rpo.carpet_area) END, CASE WHEN ((lp2.price IS NOT NULL) AND (lp2.price <> 0)) THEN (lp2.price)::bigint WHEN (((lp2.price IS NULL) OR (lp2.price = 0)) AND (rpo2."SIZE" IS NOT NULL)) THEN (COALESCE((lp2.price_per_unit_area)::bigint, rpo2.carpet_area) * rpo2."SIZE") ELSE (lp2.price_per_unit_area * rpo2.carpet_area) END, (min(CASE WHEN ((lp3.price IS NOT NULL) AND (lp3.price <> 0)) THEN (lp3.price)::bigint WHEN (((lp3.price IS NULL) OR (lp3.price = 0)) AND (rpo3."SIZE" IS NOT NULL)) THEN (COALESCE((lp3.price_per_unit_area)::bigint, rpo3.carpet_area) * rpo3."SIZE") ELSE (lp3.price_per_unit_area * rpo3.carpet_area) END)))), (COALESCE((er.max_budget)::bigint, CASE WHEN ((lp1.price IS NOT NULL) AND (lp1.price <> 0)) THEN (lp1.price)::bigint WHEN (((lp1.price IS NULL) OR (lp1.price = 0)) AND (rpo."SIZE" IS NOT NULL)) THEN (COALESCE((lp1.price_per_unit_area)::bigint, rpo.carpet_area) * rpo."SIZE") ELSE (lp1.price_per_unit_area * rpo.carpet_area) END, CASE WHEN ((lp2.price IS NOT NULL) AND (lp2.price <> 0)) THEN (lp2.price)::bigint WHEN (((lp2.price IS NULL) OR (lp2.price = 0)) AND (rpo2."SIZE" IS NOT NULL)) THEN (COALESCE((lp2.price_per_unit_area)::bigint, rpo2.carpet_area) * rpo2."SIZE") ELSE (lp2.price_per_unit_area * rpo2.carpet_area) END, (max(CASE WHEN ((lp3.price IS NOT NULL) AND (lp3.price <> 0)) THEN (lp3.price)::bigint WHEN (((lp3.price IS NULL) OR (lp3.price = 0)) AND (rpo3."SIZE" IS NOT NULL)) THEN (COALESCE((lp3.price_per_unit_area)::bigint, rpo3.carpet_area) * rpo3."SIZE") ELSE (lp3.price_per_unit_area * rpo3.carpet_area) END)))), ea.is_fake, ea.duplicate_lead, ea.lead_filler, ea.lead_generator, e.source_lead_id, ms.source, sc.name, e.client_id, us.full_name, (COALESCE(ct.country_code, pct.dial_code)), l.company_id, (CASE WHEN (e.domain_id = 1) THEN 'Makaan'::text WHEN (e.domain_id = 2) THEN 'PropTiger'::text WHEN (e.domain_id = 5) THEN 'Housing'::text ELSE 'Other'::text END), (CASE WHEN (l.company_id = 499) THEN 'Yes'::text ELSE 'No'::text END), la.agent_id
4. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=25,274,891.77..29,896,330.55 rows=14,515,332 width=552) (actual rows= loops=)

  • Hash Cond: (pj.project_status_id = mps.id)
5. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=25,274,847.12..28,245,166.88 rows=14,515,332 width=582) (actual rows= loops=)

  • Hash Cond: (us.country_id = pct.country_id)
6. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=25,274,840.39..28,062,871.78 rows=14,515,332 width=583) (actual rows= loops=)

  • Hash Cond: (us.country_id = ct.country_id)
7. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=25,274,831.59..27,880,574.60 rows=14,515,332 width=580) (actual rows= loops=)

  • Hash Cond: (pr.lead_id = l.id)
8. 0.000 0.000 ↓ 0.0

Seq Scan on crm_property_requirements pr (cost=0.00..597,986.68 rows=25,794,068 width=24) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Hash (cost=24,044,429.94..24,044,429.94 rows=14,515,332 width=564) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=21,661,633.75..24,044,429.94 rows=14,515,332 width=564) (actual rows= loops=)

  • Merge Cond: (la.agent_id = sn.user_id)
11. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=21,661,633.31..21,839,651.54 rows=2,981,859 width=553) (actual rows= loops=)

  • Merge Cond: (la.agent_id = se.user_id)
12. 0.000 0.000 ↓ 0.0

Sort (cost=17,943,701.03..17,946,265.90 rows=1,025,949 width=525) (actual rows= loops=)

  • Sort Key: la.agent_id
13. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=15,640,929.53..17,357,343.57 rows=1,025,949 width=525) (actual rows= loops=)

  • Hash Cond: (lah.reason_status_mapping_id = rsm.id)
14. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=15,640,652.70..17,343,528.66 rows=1,025,949 width=514) (actual rows= loops=)

  • Hash Cond: (lah.lead_assign_id = la.id)
15. 0.000 0.000 ↓ 0.0

Seq Scan on crm_lead_action_history lah (cost=0.00..1,016,785.80 rows=47,027,380 width=16) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Hash (cost=15,592,741.87..15,592,741.87 rows=614,786 width=506) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=12,743,930.73..15,592,741.87 rows=614,786 width=506) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash Join (cost=12,743,930.29..13,835,769.08 rows=281,732 width=498) (actual rows= loops=)

  • Hash Cond: (e.client_id = us.id)
19. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=11,985,470.62..12,942,102.12 rows=281,732 width=484) (actual rows= loops=)

  • Hash Cond: (lt2.construction_status_id = cs2.id)
20. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=11,985,430.69..12,939,260.93 rows=281,732 width=473) (actual rows= loops=)

  • Hash Cond: (lt.construction_status_id = cs1.id)
21. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=11,985,390.77..12,936,419.74 rows=281,732 width=462) (actual rows= loops=)

  • Hash Cond: (lt2.option_id = rpo2.options_id)
22. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=892,213.38..1,819,511.55 rows=432,332 width=32) (actual rows= loops=)

  • Hash Cond: (lp2.id = lt2.current_price_id)
23. 0.000 0.000 ↓ 0.0

Seq Scan on cms_listing_prices lp2 (cost=0.00..702,774.55 rows=16,209,980 width=12) (actual rows= loops=)

  • Filter: ((version)::text = 'Website'::text)
24. 0.000 0.000 ↓ 0.0

Hash (cost=883,853.22..883,853.22 rows=432,332 width=28) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Seq Scan on cms_listings lt2 (cost=0.00..883,853.22 rows=432,332 width=28) (actual rows= loops=)

  • Filter: ((domain_id = 2) AND ((listing_category)::text = 'Primary'::text))
26. 0.000 0.000 ↓ 0.0

Hash (cost=11,073,697.74..11,073,697.74 rows=281,732 width=438) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=10,001,138.64..11,073,697.74 rows=281,732 width=438) (actual rows= loops=)

  • Hash Cond: (er.option_id = rpo2.options_id)
28. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=9,735,749.65..10,741,365.03 rows=281,732 width=407) (actual rows= loops=)

  • Hash Cond: (lt.option_id = rpo.options_id)
29. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=9,470,360.65..10,407,871.56 rows=281,732 width=384) (actual rows= loops=)

  • Hash Cond: (lp1.id = lt.current_price_id)
30. 0.000 0.000 ↓ 0.0

Seq Scan on cms_listing_prices lp1 (cost=0.00..702,774.55 rows=16,209,980 width=12) (actual rows= loops=)

  • Filter: ((version)::text = 'Website'::text)
31. 0.000 0.000 ↓ 0.0

Hash (cost=9,452,807.00..9,452,807.00 rows=281,732 width=380) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Merge Right Join (cost=9,418,558.91..9,452,807.00 rows=281,732 width=380) (actual rows= loops=)

  • Merge Cond: (rpo3.project_id = er.project_id)
33. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=2,097,335.28..2,126,215.39 rows=62,368 width=84) (actual rows= loops=)

  • Group Key: rpo3.project_id
34. 0.000 0.000 ↓ 0.0

Sort (cost=2,097,335.28..2,098,887.76 rows=620,991 width=39) (actual rows= loops=)

  • Sort Key: rpo3.project_id
35. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=1,083,346.43..2,020,600.86 rows=620,991 width=39) (actual rows= loops=)

  • Hash Cond: (lt3.option_id = rpo3.options_id)
36. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=890,946.38..1,816,977.55 rows=432,332 width=12) (actual rows= loops=)

  • Hash Cond: (lp3.id = lt3.current_price_id)
37. 0.000 0.000 ↓ 0.0

Seq Scan on cms_listing_prices lp3 (cost=0.00..702,774.55 rows=16,209,980 width=12) (actual rows= loops=)

  • Filter: ((version)::text = 'Website'::text)
38. 0.000 0.000 ↓ 0.0

Hash (cost=883,853.22..883,853.22 rows=432,332 width=8) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Seq Scan on cms_listings lt3 (cost=0.00..883,853.22 rows=432,332 width=8) (actual rows= loops=)

  • Filter: ((domain_id = 2) AND ((listing_category)::text = 'Primary'::text))
40. 0.000 0.000 ↓ 0.0

Hash (cost=179,785.66..179,785.66 rows=620,991 width=35) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Seq Scan on cms_resi_project_options rpo3 (cost=0.00..179,785.66 rows=620,991 width=35) (actual rows= loops=)

  • Filter: ((option_category)::text <> 'Unverified'::text)
42. 0.000 0.000 ↓ 0.0

Materialize (cost=7,321,223.63..7,321,948.43 rows=144,960 width=300) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Sort (cost=7,321,223.63..7,321,586.03 rows=144,960 width=300) (actual rows= loops=)

  • Sort Key: er.project_id
44. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,862,209.66..7,288,479.22 rows=144,960 width=300) (actual rows= loops=)

  • Hash Cond: (pj.project_type_id = pt.project_type_id)
45. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,862,167.03..7,286,443.39 rows=144,960 width=304) (actual rows= loops=)

  • Hash Cond: (er.project_id = pj.project_id)
46. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,602,598.82..6,984,125.66 rows=83,251 width=242) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,602,598.38..6,772,001.56 rows=35,086 width=214) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,602,597.95..6,652,836.21 rows=21,232 width=203) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,602,597.51..6,536,243.26 rows=21,232 width=175) (actual rows= loops=)

  • Hash Cond: (e.city_id = city.city_id)
50. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,602,566.42..6,535,920.23 rows=21,232 width=167) (actual rows= loops=)

  • Hash Cond: (er.locality_id = loc.locality_id)
51. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,596,988.20..6,530,135.14 rows=21,232 width=152) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,596,987.76..6,413,301.63 rows=21,232 width=123) (actual rows= loops=)

  • Hash Cond: (l.sale_type_id = mst.id)
53. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,596,935.24..6,412,957.16 rows=21,232 width=124) (actual rows= loops=)

  • Hash Cond: (e.source_id = ms.id)
54. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,596,907.84..6,412,637.83 rows=21,232 width=104) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,596,907.28..6,207,527.49 rows=36,337 width=72) (actual rows= loops=)

  • Hash Cond: (e.lead_id = l.id)
  • Join Filter: ((date(e.created_at) >= (date(now()) - 4)) OR (date(l.updated_at) >= (date(now()) - 4)))
56. 0.000 0.000 ↓ 0.0

Seq Scan on crm_enquiries e (cost=0.00..963,665.16 rows=35,208,616 width=40) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Hash (cost=929,028.68..929,028.68 rows=34,540,768 width=32) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Seq Scan on crm_leads l (cost=0.00..929,028.68 rows=34,540,768 width=32) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Index Scan using crm_enquiry_requirements_enquiry_id on crm_enquiry_requirements er (cost=0.56..5.63 rows=1 width=36) (actual rows= loops=)

  • Index Cond: (enquiry_id = e.id)
  • Filter: (project_id IS NOT NULL)
60. 0.000 0.000 ↓ 0.0

Hash (cost=20.60..20.60 rows=544 width=28) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1.68..20.60 rows=544 width=28) (actual rows= loops=)

  • Hash Cond: (ms.category_id = sc.id)
62. 0.000 0.000 ↓ 0.0

Seq Scan on crm_master_sources ms (cost=0.00..11.44 rows=544 width=20) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

Hash (cost=1.30..1.30 rows=30 width=16) (actual rows= loops=)

64. 0.000 0.000 ↓ 0.0

Seq Scan on crm_master_lead_source_categories sc (cost=0.00..1.30 rows=30 width=16) (actual rows= loops=)

65. 0.000 0.000 ↓ 0.0

Hash (cost=28.90..28.90 rows=1,890 width=11) (actual rows= loops=)

66. 0.000 0.000 ↓ 0.0

Seq Scan on crm_master_sale_types mst (cost=0.00..28.90 rows=1,890 width=11) (actual rows= loops=)

67. 0.000 0.000 ↓ 0.0

Index Scan using crm_enq_attributes_enquiry_id on crm_enq_attributes ea (cost=0.44..5.49 rows=1 width=33) (actual rows= loops=)

  • Index Cond: (e.id = enquiry_id)
68. 0.000 0.000 ↓ 0.0

Hash (cost=4,336.43..4,336.43 rows=99,343 width=19) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

Seq Scan on cms_locality loc (cost=0.00..4,336.43 rows=99,343 width=19) (actual rows= loops=)

70. 0.000 0.000 ↓ 0.0

Hash (cost=24.93..24.93 rows=493 width=16) (actual rows= loops=)

71. 0.000 0.000 ↓ 0.0

Seq Scan on cms_city city (cost=0.00..24.93 rows=493 width=16) (actual rows= loops=)

72. 0.000 0.000 ↓ 0.0

Index Scan using cms_listings_id on cms_listings lt (cost=0.43..5.48 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = er.listing_id)
73. 0.000 0.000 ↓ 0.0

Index Scan using user_user_contact_numbers_user_id on user_user_contact_numbers uc (cost=0.43..5.59 rows=2 width=15) (actual rows= loops=)

  • Index Cond: (e.client_id = user_id)
  • Filter: (priority = 1)
74. 0.000 0.000 ↓ 0.0

Index Scan using user_user_emails_user_id on user_user_emails um (cost=0.44..6.03 rows=2 width=32) (actual rows= loops=)

  • Index Cond: (e.client_id = user_id)
  • Filter: (priority = 1)
75. 0.000 0.000 ↓ 0.0

Hash (cost=225,860.92..225,860.92 rows=1,391,783 width=66) (actual rows= loops=)

76. 0.000 0.000 ↓ 0.0

Seq Scan on cms_project pj (cost=0.00..225,860.92 rows=1,391,783 width=66) (actual rows= loops=)

  • Filter: ((version)::text = 'Website'::text)
77. 0.000 0.000 ↓ 0.0

Hash (cost=24.50..24.50 rows=1,450 width=4) (actual rows= loops=)

78. 0.000 0.000 ↓ 0.0

Seq Scan on cms_resi_project_type pt (cost=0.00..24.50 rows=1,450 width=4) (actual rows= loops=)

79. 0.000 0.000 ↓ 0.0

Hash (cost=167,074.33..167,074.33 rows=5,084,533 width=31) (actual rows= loops=)

80. 0.000 0.000 ↓ 0.0

Seq Scan on cms_resi_project_options rpo (cost=0.00..167,074.33 rows=5,084,533 width=31) (actual rows= loops=)

81. 0.000 0.000 ↓ 0.0

Hash (cost=167,074.33..167,074.33 rows=5,084,533 width=31) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

Seq Scan on cms_resi_project_options rpo2 (cost=0.00..167,074.33 rows=5,084,533 width=31) (actual rows= loops=)

83. 0.000 0.000 ↓ 0.0

Hash (cost=23.30..23.30 rows=1,330 width=19) (actual rows= loops=)

84. 0.000 0.000 ↓ 0.0

Seq Scan on cms_master_listing_construction_status cs1 (cost=0.00..23.30 rows=1,330 width=19) (actual rows= loops=)

85. 0.000 0.000 ↓ 0.0

Hash (cost=23.30..23.30 rows=1,330 width=19) (actual rows= loops=)

86. 0.000 0.000 ↓ 0.0

Seq Scan on cms_master_listing_construction_status cs2 (cost=0.00..23.30 rows=1,330 width=19) (actual rows= loops=)

87. 0.000 0.000 ↓ 0.0

Hash (cost=473,851.30..473,851.30 rows=15,502,030 width=18) (actual rows= loops=)

88. 0.000 0.000 ↓ 0.0

Seq Scan on user_users us (cost=0.00..473,851.30 rows=15,502,030 width=18) (actual rows= loops=)

89. 0.000 0.000 ↓ 0.0

Index Scan using crm_lead_assignments_lead_id on crm_lead_assignments la (cost=0.44..6.22 rows=2 width=12) (actual rows= loops=)

  • Index Cond: (lead_id = e.lead_id)
90. 0.000 0.000 ↓ 0.0

Hash (cost=203.13..203.13 rows=5,896 width=19) (actual rows= loops=)

91. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=2.10..203.13 rows=5,896 width=19) (actual rows= loops=)

  • Hash Cond: (rsm.next_status_id = las.id)
92. 0.000 0.000 ↓ 0.0

Seq Scan on crm_reason_status_mapping rsm (cost=0.00..119.96 rows=5,896 width=8) (actual rows= loops=)

93. 0.000 0.000 ↓ 0.0

Hash (cost=1.49..1.49 rows=49 width=19) (actual rows= loops=)

94. 0.000 0.000 ↓ 0.0

Seq Scan on crm_master_lead_assign_status las (cost=0.00..1.49 rows=49 width=19) (actual rows= loops=)

95. 0.000 0.000 ↓ 0.0

Materialize (cost=3,717,932.29..3,813,646.96 rows=19,142,935 width=32) (actual rows= loops=)

96. 0.000 0.000 ↓ 0.0

Sort (cost=3,717,932.29..3,765,789.62 rows=19,142,935 width=32) (actual rows= loops=)

  • Sort Key: se.user_id
97. 0.000 0.000 ↓ 0.0

Seq Scan on user_user_emails se (cost=0.00..486,544.75 rows=19,142,935 width=32) (actual rows= loops=)

  • Filter: (is_active = 1)
98. 0.000 0.000 ↓ 0.0

Index Scan using user_user_contact_numbers_user_id on user_user_contact_numbers sn (cost=0.43..2,014,729.99 rows=14,976,177 width=15) (actual rows= loops=)

  • Filter: (is_active = 1)
99. 0.000 0.000 ↓ 0.0

Hash (cost=5.58..5.58 rows=258 width=7) (actual rows= loops=)

100. 0.000 0.000 ↓ 0.0

Seq Scan on cms_country ct (cost=0.00..5.58 rows=258 width=7) (actual rows= loops=)

101. 0.000 0.000 ↓ 0.0

Hash (cost=4.10..4.10 rows=210 width=7) (actual rows= loops=)

102. 0.000 0.000 ↓ 0.0

Seq Scan on ptigercrm_country pct (cost=0.00..4.10 rows=210 width=7) (actual rows= loops=)

103. 0.000 0.000 ↓ 0.0

Hash (cost=25.40..25.40 rows=1,540 width=14) (actual rows= loops=)

104. 0.000 0.000 ↓ 0.0

Seq Scan on cms_project_status_master mps (cost=0.00..25.40 rows=1,540 width=14) (actual rows= loops=)