explain.depesz.com

PostgreSQL's explain analyze made readable

Result: M1VW

Settings
# exclusive inclusive rows x rows loops node
1. 598.160 1,153.469 ↓ 4.0 4 1

Limit (cost=145,381.61..145,381.62 rows=1 width=1,180) (actual time=1,153.468..1,153.469 rows=4 loops=1)

  • Functions: 642
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
  • Timing: Generation 170.696 ms, Inlining 0.000 ms, Optimization 48.794 ms, Emission 1080.671 ms, Total 1300.160 ms
2. 0.138 555.309 ↓ 4.0 4 1

Sort (cost=145,381.61..145,381.62 rows=1 width=1,180) (actual time=555.309..555.309 rows=4 loops=1)

  • Sort Key: ((((CASE WHEN (v_property_publishable_site.id_tipo = property.property_type_id) THEN 3 ELSE 0 END + CASE WHEN (property.bedrooms = v_property_publishable_site.dormitorios) THEN 1 ELSE 0 END) + CASE WHEN (property.garages = v_property_publishable_site.garagens) THEN 1 ELSE 0 END) + CASE WHEN ((((string_agg(DISTINCT (property_contract.contract_id)::text, ','::text)) ~~ '%1%'::text) AND ((SubPlan 1)) AND ((((SubPlan 2)))::numeric >= ((v_property_publishable_site.valor_venda)::numeric * 0.8)) AND ((((SubPlan 2)))::numeric <= ((v_property_publishable_site.valor_venda)::numeric * 1.2))) OR (((string_agg(DISTINCT (property_contract.contract_id)::text, ','::text)) ~~ '%2%'::text) AND ((SubPlan 3)) AND ((((SubPlan 4)))::numeric >= ((v_property_publishable_site.valor_locacao)::numeric * 0.8)) AND ((((SubPlan 4)))::numeric <= ((v_property_publishable_site.valor_locacao)::numeric * 1.2))) OR (((string_agg(DISTINCT (property_contract.contract_id)::text, ','::text)) ~~ '%3%'::text) AND ((SubPlan 5)) AND (((SubPlan 6)) >= (v_property_publishable_site.valor_temporada * 0.8)) AND (((SubPlan 6)) <= (v_property_publishable_site.valor_temporada * 1.2)))) THEN 2 ELSE 0 END)) DESC
  • Sort Method: top-N heapsort Memory: 28kB
3. 0.449 555.171 ↓ 59.0 59 1

Nested Loop (cost=19,164.88..145,381.60 rows=1 width=1,180) (actual time=461.764..555.171 rows=59 loops=1)

  • Join Filter: ((v_property_publishable_site.property_id <> property.property_id) AND (v_property_publishable_site.id_estado = property.state_id) AND (v_property_publishable_site.id_cidade = property.city_id) AND (v_property_publishable_site.id_bairro = property.neighborhood_id))
  • Rows Removed by Join Filter: 2073
4. 71.134 552.590 ↑ 1.2 2,132 1

GroupAggregate (cost=19,043.69..144,745.20 rows=2,524 width=1,212) (actual time=460.212..552.590 rows=2,132 loops=1)

  • Group Key: property.property_id, (CASE property.furnished WHEN 0 THEN false ELSE true END), (CASE WHEN (property.street_id IS NOT NULL) THEN (s2.name)::text ELSE property.address_street END), property_address_visibility.visibility_id, n.name, c.name, s.name, pp.name, pt.name, ped.title, s.abbreviation
5. 68.904 466.532 ↓ 7.3 18,300 1

Sort (cost=19,043.69..19,050.00 rows=2,524 width=1,042) (actual time=460.028..466.532 rows=18,300 loops=1)

  • Sort Key: property.property_id, (CASE property.furnished WHEN 0 THEN false ELSE true END), (CASE WHEN (property.street_id IS NOT NULL) THEN (s2.name)::text ELSE property.address_street END), property_address_visibility.visibility_id, n.name, c.name, s.name, pp.name, pt.name, ped.title, s.abbreviation
  • Sort Method: external merge Disk: 11768kB
6. 89.048 397.628 ↓ 7.3 18,300 1

Gather (cost=17,710.61..18,901.06 rows=2,524 width=1,042) (actual time=256.431..397.628 rows=18,300 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
7. 4.682 308.580 ↓ 5.8 6,100 3 / 3

Hash Left Join (cost=16,710.61..17,648.66 rows=1,052 width=1,042) (actual time=262.841..308.580 rows=6,100 loops=3)

  • Hash Cond: (pft.type_id = ft.type_id)
8. 4.135 303.894 ↓ 5.8 6,100 3 / 3

Hash Left Join (cost=16,709.34..17,641.02 rows=1,052 width=1,005) (actual time=262.833..303.894 rows=6,100 loops=3)

  • Hash Cond: (pso.orientation_id = so.orientation_id)
9. 4.346 299.757 ↓ 5.8 6,100 3 / 3

Hash Left Join (cost=16,708.25..17,634.25 rows=1,052 width=975) (actual time=262.827..299.757 rows=6,100 loops=3)

  • Hash Cond: (property.position_id = pp.position_id)
10. 4.401 295.406 ↓ 5.8 6,100 3 / 3

Hash Left Join (cost=16,707.18..17,628.11 rows=1,052 width=943) (actual time=262.815..295.406 rows=6,100 loops=3)

  • Hash Cond: (property.property_id = pra.property_id)
11. 7.396 290.942 ↓ 5.8 6,053 3 / 3

Nested Loop Left Join (cost=16,697.12..17,610.08 rows=1,052 width=911) (actual time=262.745..290.942 rows=6,053 loops=3)

12. 2.255 278.837 ↓ 4.5 4,709 3 / 3

Nested Loop Left Join (cost=16,696.84..17,147.00 rows=1,052 width=907) (actual time=262.740..278.837 rows=4,709 loops=3)

13. 5.088 269.323 ↓ 3.4 3,629 3 / 3

Merge Left Join (cost=16,696.55..16,710.36 rows=1,052 width=905) (actual time=262.734..269.323 rows=3,629 loops=3)

  • Merge Cond: (property.property_id = psc.property_id)
14. 10.681 264.231 ↓ 3.4 3,629 3 / 3

Sort (cost=16,696.41..16,699.04 rows=1,052 width=905) (actual time=262.723..264.231 rows=3,629 loops=3)

  • Sort Key: property.property_id
  • Sort Method: external merge Disk: 6608kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
  • Worker 1: Sort Method: quicksort Memory: 25kB
15. 2.860 253.550 ↓ 3.4 3,629 3 / 3

Hash Join (cost=945.09..16,643.60 rows=1,052 width=905) (actual time=183.432..253.550 rows=3,629 loops=3)

  • Hash Cond: (property.address_visibility_id = property_address_visibility.visibility_id)
16. 4.642 71.039 ↓ 3.4 3,629 3 / 3

Nested Loop (cost=943.94..16,638.01 rows=1,052 width=869) (actual time=3.713..71.039 rows=3,629 loops=3)

17. 2.728 62.768 ↓ 3.4 3,629 3 / 3

Hash Join (cost=943.65..16,287.30 rows=1,052 width=863) (actual time=3.709..62.768 rows=3,629 loops=3)

  • Hash Cond: (property.property_type_id = pt.property_type_id)
18. 2.740 59.997 ↓ 3.4 3,629 3 / 3

Hash Join (cost=941.93..16,282.46 rows=1,052 width=785) (actual time=3.630..59.997 rows=3,629 loops=3)

  • Hash Cond: (c.state_id = s.state_id)
19. 4.455 57.234 ↓ 3.4 3,629 3 / 3

Nested Loop (cost=940.30..16,277.64 rows=1,052 width=533) (actual time=3.601..57.234 rows=3,629 loops=3)

20. 2.807 49.150 ↓ 3.4 3,629 3 / 3

Nested Loop (cost=940.01..15,946.98 rows=1,052 width=521) (actual time=3.598..49.150 rows=3,629 loops=3)

21. 2.556 39.098 ↓ 1.5 3,622 3 / 3

Hash Join (cost=939.72..15,100.91 rows=2,478 width=513) (actual time=3.595..39.098 rows=3,622 loops=3)

  • Hash Cond: (pp_1.portal_id = p.portal_id)
22. 2.562 36.480 ↓ 1.5 3,622 3 / 3

Nested Loop (cost=935.97..15,090.30 rows=2,478 width=517) (actual time=3.528..36.480 rows=3,622 loops=3)

  • Join Filter: (property.property_id = pp_1.property_id)
23. 0.564 30.273 ↑ 1.1 729 3 / 3

Nested Loop (cost=935.55..13,815.53 rows=817 width=509) (actual time=3.524..30.273 rows=729 loops=3)

24. 1.352 28.251 ↑ 1.1 729 3 / 3

Nested Loop (cost=935.26..13,340.28 rows=817 width=489) (actual time=3.519..28.251 rows=729 loops=3)

25. 0.891 25.441 ↑ 1.1 729 3 / 3

Nested Loop Left Join (cost=935.26..12,300.65 rows=817 width=493) (actual time=3.516..25.441 rows=729 loops=3)

26. 1.621 23.092 ↑ 1.1 729 3 / 3

Nested Loop (cost=934.84..8,430.11 rows=817 width=478) (actual time=3.508..23.092 rows=729 loops=3)

  • Join Filter: CASE WHEN (ss.property_update_enabled AND (NOT ss.property_update_show_expired)) THEN ((date(property.refreshed_at) + ((ss.property_validity_expired_days)::double precision * '1 day'::interval)) >= date(now())) ELSE true END
27. 1.604 17.826 ↑ 2.2 729 3 / 3

Hash Semi Join (cost=934.84..6,323.54 rows=1,633 width=482) (actual time=3.499..17.826 rows=729 loops=3)

  • Hash Cond: (property.property_id = pc.property_id)
28. 13.061 13.061 ↑ 1.3 3,068 3 / 3

Parallel Seq Scan on property (cost=0.00..5,356.36 rows=3,848 width=478) (actual time=0.027..13.061 rows=3,068 loops=3)

  • Filter: (approved AND (deleted_at IS NULL) AND (system_id = 3))
  • Rows Removed by Filter: 8155
29. 0.873 3.161 ↑ 1.0 14,251 1 / 3

Hash (cost=756.21..756.21 rows=14,290 width=4) (actual time=9.484..9.484 rows=14,251 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 630kB
30. 2.288 2.288 ↑ 1.0 14,251 1 / 3

Seq Scan on property_contract pc (cost=0.00..756.21 rows=14,290 width=4) (actual time=0.024..6.864 rows=14,251 loops=1)

  • Filter: ((deleted_at IS NULL) AND available)
  • Rows Removed by Filter: 20370
31. 3.645 3.645 ↑ 1.0 1 2,187 / 3

Seq Scan on system_setting ss (cost=0.00..1.26 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=2,187)

  • Filter: ((deleted_at IS NULL) AND (system_id = 3))
  • Rows Removed by Filter: 20
32. 1.458 1.458 ↑ 1.0 1 2,187 / 3

Index Scan using street_street_id_pk on street s2 (cost=0.42..4.74 rows=1 width=23) (actual time=0.002..0.002 rows=1 loops=2,187)

  • Index Cond: (street_id = property.street_id)
33. 1.458 1.458 ↑ 1.0 1 2,187 / 3

Seq Scan on system s_1 (cost=0.00..1.26 rows=1 width=4) (actual time=0.001..0.002 rows=1 loops=2,187)

  • Filter: (system_id = 3)
  • Rows Removed by Filter: 20
34. 1.458 1.458 ↑ 1.0 1 2,187 / 3

Index Scan using neighborhood_neighborhood_id_uindex on neighborhood n (cost=0.29..0.58 rows=1 width=28) (actual time=0.002..0.002 rows=1 loops=2,187)

  • Index Cond: (neighborhood_id = property.neighborhood_id)
35. 3.645 3.645 ↑ 1.2 5 2,187 / 3

Index Scan using portal_property_property_id_deleted_at_idx on portal_property pp_1 (cost=0.42..1.49 rows=6 width=8) (actual time=0.002..0.005 rows=5 loops=2,187)

  • Index Cond: ((property_id = pc.property_id) AND (deleted_at IS NULL))
36. 0.018 0.062 ↑ 1.0 78 3 / 3

Hash (cost=2.78..2.78 rows=78 width=4) (actual time=0.062..0.062 rows=78 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
37. 0.044 0.044 ↑ 1.0 78 3 / 3

Seq Scan on portal p (cost=0.00..2.78 rows=78 width=4) (actual time=0.015..0.044 rows=78 loops=3)

  • Filter: (deleted_at IS NULL)
38. 7.245 7.245 ↑ 1.0 1 10,867 / 3

Index Scan using property_contract_property_id_deleted_at_idx on property_contract (cost=0.29..0.33 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=10,867)

  • Index Cond: ((property_id = pp_1.property_id) AND (deleted_at IS NULL))
  • Filter: available
39. 3.629 3.629 ↑ 1.0 1 10,888 / 3

Index Scan using city_city_id_uindex on city c (cost=0.29..0.31 rows=1 width=20) (actual time=0.001..0.001 rows=1 loops=10,888)

  • Index Cond: (city_id = n.city_id)
40. 0.009 0.023 ↑ 1.0 28 3 / 3

Hash (cost=1.28..1.28 rows=28 width=260) (actual time=0.023..0.023 rows=28 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
41. 0.014 0.014 ↑ 1.0 28 3 / 3

Seq Scan on state s (cost=0.00..1.28 rows=28 width=260) (actual time=0.010..0.014 rows=28 loops=3)

42. 0.014 0.043 ↑ 1.0 32 3 / 3

Hash (cost=1.32..1.32 rows=32 width=80) (actual time=0.043..0.043 rows=32 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
43. 0.029 0.029 ↑ 1.0 32 3 / 3

Seq Scan on property_type pt (cost=0.00..1.32 rows=32 width=80) (actual time=0.024..0.029 rows=32 loops=3)

44. 3.629 3.629 ↑ 1.0 1 10,888 / 3

Index Scan using property_things_pk on property_extra_data ped (cost=0.29..0.33 rows=1 width=22) (actual time=0.001..0.001 rows=1 loops=10,888)

  • Index Cond: (property_id = pp_1.property_id)
45. 0.009 179.651 ↑ 1.0 7 3 / 3

Hash (cost=1.07..1.07 rows=7 width=36) (actual time=179.650..179.651 rows=7 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
46. 179.642 179.642 ↑ 1.0 7 3 / 3

Seq Scan on property_address_visibility (cost=0.00..1.07 rows=7 width=36) (actual time=179.638..179.642 rows=7 loops=3)

47. 0.004 0.004 ↓ 0.0 0 1 / 3

Index Only Scan using property_season_calendar_property_id_deleted_at_index on property_season_calendar psc (cost=0.14..8.68 rows=1 width=4) (actual time=0.011..0.011 rows=0 loops=1)

  • Index Cond: (deleted_at IS NULL)
  • Heap Fetches: 0
48. 7.259 7.259 ↑ 1.0 1 10,888 / 3

Index Only Scan using property_solar_orientation_property_id_orientation_id_index on property_solar_orientation pso (cost=0.29..0.41 rows=1 width=6) (actual time=0.001..0.002 rows=1 loops=10,888)

  • Index Cond: (property_id = property.property_id)
  • Heap Fetches: 9130
49. 4.709 4.709 ↑ 1.0 1 14,126 / 3

Index Only Scan using property_floor_type_property_id_type_id_uindex on property_floor_type pft (cost=0.29..0.43 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=14,126)

  • Index Cond: (property_id = property.property_id)
  • Heap Fetches: 14530
50. 0.017 0.063 ↑ 1.0 250 1 / 3

Hash (cost=6.94..6.94 rows=250 width=36) (actual time=0.188..0.188 rows=250 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 20kB
51. 0.025 0.045 ↑ 1.0 250 1 / 3

Hash Left Join (cost=1.09..6.94 rows=250 width=36) (actual time=0.029..0.136 rows=250 loops=1)

  • Hash Cond: (pra.activity_id = ra.activity_id)
52. 0.018 0.018 ↑ 1.0 250 1 / 3

Seq Scan on property_rural_activity pra (cost=0.00..4.50 rows=250 width=6) (actual time=0.012..0.053 rows=250 loops=1)

  • Filter: (deleted_at IS NULL)
53. 0.001 0.003 ↑ 1.0 4 1 / 3

Hash (cost=1.04..1.04 rows=4 width=34) (actual time=0.009..0.009 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
54. 0.002 0.002 ↑ 1.0 4 1 / 3

Seq Scan on rural_activity ra (cost=0.00..1.04 rows=4 width=34) (actual time=0.004..0.005 rows=4 loops=1)

55. 0.001 0.005 ↑ 1.0 3 1 / 3

Hash (cost=1.03..1.03 rows=3 width=34) (actual time=0.014..0.014 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
56. 0.004 0.004 ↑ 1.0 3 1 / 3

Seq Scan on property_position pp (cost=0.00..1.03 rows=3 width=34) (actual time=0.010..0.011 rows=3 loops=1)

57. 0.001 0.002 ↑ 1.0 4 1 / 3

Hash (cost=1.04..1.04 rows=4 width=34) (actual time=0.007..0.007 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
58. 0.002 0.002 ↑ 1.0 4 1 / 3

Seq Scan on solar_orientation so (cost=0.00..1.04 rows=4 width=34) (actual time=0.004..0.005 rows=4 loops=1)

59. 0.001 0.004 ↑ 1.0 12 1 / 3

Hash (cost=1.12..1.12 rows=12 width=36) (actual time=0.013..0.013 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
60. 0.003 0.003 ↑ 1.0 12 1 / 3

Seq Scan on floor_type ft (cost=0.00..1.12 rows=12 width=36) (actual time=0.007..0.009 rows=12 loops=1)

61.          

SubPlan (for GroupAggregate)

62. 4.264 4.264 ↑ 1.0 1 2,132

Index Scan using property_contract_contract_id_property_id_uindex on property_contract pc_2 (cost=0.29..8.31 rows=1 width=1) (actual time=0.002..0.002 rows=1 loops=2,132)

  • Index Cond: ((contract_id = 1) AND (property_id = property.property_id))
  • Filter: available
63. 2.132 2.132 ↑ 1.0 1 2,132

Index Scan using property_contract_contract_id_property_id_uindex on property_contract pc_3 (cost=0.29..8.31 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=2,132)

  • Index Cond: ((contract_id = 1) AND (property_id = property.property_id))
  • Filter: available
64. 2.132 2.132 ↓ 0.0 0 2,132

Index Scan using property_contract_contract_id_property_id_uindex on property_contract pc_4 (cost=0.29..8.31 rows=1 width=1) (actual time=0.001..0.001 rows=0 loops=2,132)

  • Index Cond: ((contract_id = 2) AND (property_id = property.property_id))
  • Filter: available
65. 2.132 2.132 ↓ 0.0 0 2,132

Index Scan using property_contract_contract_id_property_id_uindex on property_contract pc_5 (cost=0.29..8.31 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=2,132)

  • Index Cond: ((contract_id = 2) AND (property_id = property.property_id))
  • Filter: available
66. 2.132 2.132 ↓ 0.0 0 2,132

Index Scan using property_contract_contract_id_property_id_uindex on property_contract pc_6 (cost=0.29..8.31 rows=1 width=1) (actual time=0.001..0.001 rows=0 loops=2,132)

  • Index Cond: ((contract_id = 3) AND (property_id = property.property_id))
  • Filter: available
67. 0.000 2.132 ↑ 1.0 1 2,132

Aggregate (cost=8.17..8.18 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=2,132)

68. 2.132 2.132 ↓ 0.0 0 2,132

Index Scan using property_season_calendar_property_id_deleted_at_index on property_season_calendar psc_1_1 (cost=0.14..8.17 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=2,132)

  • Index Cond: ((property_id = property.property_id) AND (deleted_at IS NULL) AND (deleted_at IS NULL))
  • Filter: (date(end_at) >= now())
69. 0.909 2.132 ↑ 6.0 1 2,132

Materialize (cost=121.19..270.36 rows=6 width=74) (actual time=0.001..0.001 rows=1 loops=2,132)

70. 0.002 1.223 ↑ 6.0 1 1

Subquery Scan on v_property_publishable_site (cost=121.19..270.33 rows=6 width=74) (actual time=1.223..1.223 rows=1 loops=1)

71. 0.031 1.221 ↑ 6.0 1 1

GroupAggregate (cost=121.19..270.27 rows=6 width=1,212) (actual time=1.221..1.221 rows=1 loops=1)

  • Group Key: property_1.property_id, (CASE property_1.furnished WHEN 0 THEN false ELSE true END), (CASE WHEN (property_1.street_id IS NOT NULL) THEN (s2_1.name)::text ELSE property_1.address_street END), property_address_visibility_1.visibility_id, n_1.name, c_1.name, s_2.name, pp_2.name, pt_1.name, ped_1.title, s_2.abbreviation
72. 0.028 1.175 ↓ 1.7 10 1

Sort (cost=121.19..121.20 rows=6 width=910) (actual time=1.174..1.175 rows=10 loops=1)

  • Sort Key: (CASE property_1.furnished WHEN 0 THEN false ELSE true END), (CASE WHEN (property_1.street_id IS NOT NULL) THEN (s2_1.name)::text ELSE property_1.address_street END), property_address_visibility_1.visibility_id, n_1.name, c_1.name, s_2.name, pp_2.name, pt_1.name, ped_1.title, s_2.abbreviation
  • Sort Method: quicksort Memory: 35kB
73. 0.008 1.147 ↓ 1.7 10 1

Nested Loop Left Join (cost=8.91..121.11 rows=6 width=910) (actual time=1.078..1.147 rows=10 loops=1)

  • Join Filter: (property_1.property_id = pra_1.property_id)
74. 0.008 1.109 ↓ 1.7 10 1

Nested Loop Left Join (cost=8.91..115.88 rows=6 width=901) (actual time=1.047..1.109 rows=10 loops=1)

  • Join Filter: (property_1.property_id = pft_1.property_id)
75. 0.008 1.091 ↑ 1.2 5 1

Nested Loop Left Join (cost=8.62..107.48 rows=6 width=901) (actual time=1.036..1.091 rows=5 loops=1)

  • Join Filter: (property_1.property_id = pso_1.property_id)
76. 0.010 1.073 ↑ 1.2 5 1

Nested Loop Left Join (cost=8.33..99.08 rows=6 width=901) (actual time=1.022..1.073 rows=5 loops=1)

  • Join Filter: (property_1.position_id = pp_2.position_id)
  • Rows Removed by Join Filter: 15
77. 0.004 1.058 ↑ 1.2 5 1

Nested Loop Left Join (cost=8.33..97.80 rows=6 width=869) (actual time=1.012..1.058 rows=5 loops=1)

  • Join Filter: (psc_1.property_id = property_1.property_id)
78. 0.010 1.049 ↑ 1.2 5 1

Nested Loop (cost=8.19..89.54 rows=6 width=869) (actual time=1.006..1.049 rows=5 loops=1)

  • Join Filter: (property_1.address_visibility_id = property_address_visibility_1.visibility_id)
  • Rows Removed by Join Filter: 15
79. 0.013 1.029 ↑ 1.2 5 1

Hash Join (cost=8.19..87.91 rows=6 width=865) (actual time=0.991..1.029 rows=5 loops=1)

  • Hash Cond: (property_1.property_type_id = pt_1.property_type_id)
80. 0.006 0.994 ↑ 1.2 5 1

Nested Loop (cost=6.47..86.17 rows=6 width=787) (actual time=0.959..0.994 rows=5 loops=1)

81. 0.010 0.978 ↑ 1.2 5 1

Nested Loop (cost=6.33..85.23 rows=6 width=535) (actual time=0.951..0.978 rows=5 loops=1)

82. 0.006 0.958 ↑ 1.2 5 1

Nested Loop (cost=6.05..83.35 rows=6 width=523) (actual time=0.942..0.958 rows=5 loops=1)

83. 0.003 0.017 ↑ 1.0 1 1

Nested Loop (cost=0.58..16.63 rows=1 width=26) (actual time=0.015..0.017 rows=1 loops=1)

84. 0.008 0.008 ↑ 1.0 1 1

Index Scan using property_contract_property_id_deleted_at_idx on property_contract property_contract_1 (cost=0.29..8.31 rows=1 width=4) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: ((property_id = 11019) AND (deleted_at IS NULL))
  • Filter: available
85. 0.006 0.006 ↑ 1.0 1 1

Index Scan using property_things_pk on property_extra_data ped_1 (cost=0.29..8.31 rows=1 width=22) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: (property_id = 11019)
86. 0.030 0.935 ↑ 1.2 5 1

Nested Loop (cost=5.47..66.66 rows=6 width=505) (actual time=0.923..0.935 rows=5 loops=1)

  • Join Filter: ((property_1.system_id = ss_1.system_id) AND CASE WHEN (ss_1.property_update_enabled AND (NOT ss_1.property_update_show_expired)) THEN ((date(property_1.refreshed_at) + ((ss_1.property_validity_expired_days)::double precision * '1 day'::interval)) >= date(now())) ELSE true END)
  • Rows Removed by Join Filter: 100
87. 0.023 0.023 ↓ 21.0 21 1

Seq Scan on system_setting ss_1 (cost=0.00..1.21 rows=1 width=8) (actual time=0.007..0.023 rows=21 loops=1)

  • Filter: (deleted_at IS NULL)
88. 0.103 0.882 ↑ 1.2 5 21

Hash Join (cost=5.47..65.27 rows=6 width=517) (actual time=0.032..0.042 rows=5 loops=21)

  • Hash Cond: (pp_3.portal_id = p_1.portal_id)
89. 0.084 0.735 ↑ 1.2 5 21

Nested Loop (cost=1.71..61.50 rows=6 width=521) (actual time=0.028..0.035 rows=5 loops=21)

90. 0.021 0.525 ↑ 1.0 1 21

Nested Loop (cost=1.29..34.85 rows=1 width=517) (actual time=0.024..0.025 rows=1 loops=21)

91. 0.063 0.441 ↑ 1.0 1 21

Nested Loop (cost=1.00..26.54 rows=1 width=497) (actual time=0.020..0.021 rows=1 loops=21)

  • Join Filter: (property_1.system_id = s_3.system_id)
  • Rows Removed by Join Filter: 2
92. 0.021 0.336 ↑ 1.0 1 21

Nested Loop Semi Join (cost=1.00..25.07 rows=1 width=493) (actual time=0.015..0.016 rows=1 loops=21)

93. 0.063 0.252 ↑ 1.0 1 21

Nested Loop Left Join (cost=0.71..16.75 rows=1 width=493) (actual time=0.011..0.012 rows=1 loops=21)

94. 0.126 0.126 ↑ 1.0 1 21

Index Scan using property_pkey on property property_1 (cost=0.29..8.31 rows=1 width=478) (actual time=0.006..0.006 rows=1 loops=21)

  • Index Cond: (property_id = 11019)
  • Filter: (approved AND (deleted_at IS NULL))
95. 0.063 0.063 ↑ 1.0 1 21

Index Scan using street_street_id_pk on street s2_1 (cost=0.42..8.44 rows=1 width=23) (actual time=0.003..0.003 rows=1 loops=21)

  • Index Cond: (street_id = property_1.street_id)
96. 0.063 0.063 ↑ 1.0 1 21

Index Scan using property_contract_property_id_deleted_at_idx on property_contract pc_1 (cost=0.29..8.31 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=21)

  • Index Cond: ((property_id = 11019) AND (deleted_at IS NULL))
  • Filter: available
97. 0.042 0.042 ↑ 7.0 3 21

Seq Scan on system s_3 (cost=0.00..1.21 rows=21 width=4) (actual time=0.001..0.002 rows=3 loops=21)

98. 0.063 0.063 ↑ 1.0 1 21

Index Scan using neighborhood_neighborhood_id_uindex on neighborhood n_1 (cost=0.29..8.31 rows=1 width=28) (actual time=0.003..0.003 rows=1 loops=21)

  • Index Cond: (neighborhood_id = property_1.neighborhood_id)
99. 0.126 0.126 ↑ 1.2 5 21

Index Scan using portal_property_property_id_deleted_at_idx on portal_property pp_3 (cost=0.42..26.59 rows=6 width=8) (actual time=0.003..0.006 rows=5 loops=21)

  • Index Cond: ((property_id = 11019) AND (deleted_at IS NULL))
100. 0.015 0.044 ↑ 1.0 78 1

Hash (cost=2.78..2.78 rows=78 width=4) (actual time=0.044..0.044 rows=78 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
101. 0.029 0.029 ↑ 1.0 78 1

Seq Scan on portal p_1 (cost=0.00..2.78 rows=78 width=4) (actual time=0.008..0.029 rows=78 loops=1)

  • Filter: (deleted_at IS NULL)
102. 0.010 0.010 ↑ 1.0 1 5

Index Scan using city_city_id_uindex on city c_1 (cost=0.29..0.31 rows=1 width=20) (actual time=0.002..0.002 rows=1 loops=5)

  • Index Cond: (city_id = n_1.city_id)
103. 0.010 0.010 ↑ 1.0 1 5

Index Scan using state_state_id_uindex on state s_2 (cost=0.14..0.16 rows=1 width=260) (actual time=0.002..0.002 rows=1 loops=5)

  • Index Cond: (state_id = c_1.state_id)
104. 0.008 0.022 ↑ 1.0 32 1

Hash (cost=1.32..1.32 rows=32 width=80) (actual time=0.022..0.022 rows=32 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
105. 0.014 0.014 ↑ 1.0 32 1

Seq Scan on property_type pt_1 (cost=0.00..1.32 rows=32 width=80) (actual time=0.009..0.014 rows=32 loops=1)

106. 0.004 0.010 ↑ 1.8 4 5

Materialize (cost=0.00..1.10 rows=7 width=4) (actual time=0.001..0.002 rows=4 loops=5)

107. 0.006 0.006 ↑ 1.8 4 1

Seq Scan on property_address_visibility property_address_visibility_1 (cost=0.00..1.07 rows=7 width=4) (actual time=0.005..0.006 rows=4 loops=1)

108. 0.002 0.005 ↓ 0.0 0 5

Materialize (cost=0.14..8.17 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=5)

109. 0.003 0.003 ↓ 0.0 0 1

Index Only Scan using property_season_calendar_property_id_deleted_at_index on property_season_calendar psc_1 (cost=0.14..8.16 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: ((property_id = 11019) AND (deleted_at IS NULL))
  • Heap Fetches: 0
110. 0.000 0.005 ↑ 1.0 3 5

Materialize (cost=0.00..1.04 rows=3 width=34) (actual time=0.001..0.001 rows=3 loops=5)

111. 0.005 0.005 ↑ 1.0 3 1

Seq Scan on property_position pp_2 (cost=0.00..1.03 rows=3 width=34) (actual time=0.004..0.005 rows=3 loops=1)

112. 0.000 0.010 ↑ 1.0 1 5

Materialize (cost=0.29..8.31 rows=1 width=6) (actual time=0.002..0.002 rows=1 loops=5)

113. 0.010 0.010 ↑ 1.0 1 1

Index Only Scan using property_solar_orientation_property_id_orientation_id_index on property_solar_orientation pso_1 (cost=0.29..8.30 rows=1 width=6) (actual time=0.010..0.010 rows=1 loops=1)

  • Index Cond: (property_id = 11019)
  • Heap Fetches: 1
114. 0.003 0.010 ↓ 2.0 2 5

Materialize (cost=0.29..8.31 rows=1 width=8) (actual time=0.001..0.002 rows=2 loops=5)

115. 0.007 0.007 ↓ 2.0 2 1

Index Only Scan using property_floor_type_property_id_type_id_uindex on property_floor_type pft_1 (cost=0.29..8.30 rows=1 width=8) (actual time=0.006..0.007 rows=2 loops=1)

  • Index Cond: (property_id = 11019)
  • Heap Fetches: 2
116. 0.002 0.030 ↓ 0.0 0 10

Materialize (cost=0.00..5.13 rows=1 width=6) (actual time=0.003..0.003 rows=0 loops=10)

117. 0.028 0.028 ↓ 0.0 0 1

Seq Scan on property_rural_activity pra_1 (cost=0.00..5.12 rows=1 width=6) (actual time=0.028..0.028 rows=0 loops=1)

  • Filter: ((deleted_at IS NULL) AND (property_id = 11019))
  • Rows Removed by Filter: 250
118.          

SubPlan (for GroupAggregate)

119. 0.008 0.008 ↑ 1.0 1 1

Index Scan using property_contract_contract_id_property_id_uindex on property_contract pc_7 (cost=0.29..8.31 rows=1 width=8) (actual time=0.007..0.008 rows=1 loops=1)

  • Index Cond: ((contract_id = 1) AND (property_id = property_1.property_id))
  • Filter: available
120. 0.003 0.003 ↓ 0.0 0 1

Index Scan using property_contract_contract_id_property_id_uindex on property_contract pc_8 (cost=0.29..8.31 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: ((contract_id = 2) AND (property_id = property_1.property_id))
  • Filter: available
121. 0.002 0.004 ↑ 1.0 1 1

Aggregate (cost=8.17..8.18 rows=1 width=32) (actual time=0.004..0.004 rows=1 loops=1)

122. 0.002 0.002 ↓ 0.0 0 1

Index Scan using property_season_calendar_property_id_deleted_at_index on property_season_calendar psc_1_2 (cost=0.14..8.17 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: ((property_id = property_1.property_id) AND (deleted_at IS NULL) AND (deleted_at IS NULL))
  • Filter: (date(end_at) >= now())
Execution time : 1,242.770 ms