explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8RAv

Settings
# exclusive inclusive rows x rows loops node
1. 0.014 1,980.418 ↑ 2.1 96 1

Append (cost=12,181.32..12,774.22 rows=202 width=32) (actual time=1,915.403..1,980.418 rows=96 loops=1)

2.          

CTE all_props

3. 7.658 331.092 ↓ 210.7 28,870 1

Unique (cost=1,649.87..1,650.56 rows=137 width=164) (actual time=304.489..331.092 rows=28,870 loops=1)

4. 214.853 323.434 ↓ 221.6 30,358 1

Sort (cost=1,649.87..1,650.22 rows=137 width=164) (actual time=304.486..323.434 rows=30,358 loops=1)

  • Sort Key: propiedades_busqueda_particion_pais_chile_venta.search_id
  • Sort Method: external merge Disk: 5488kB
5. 10.645 108.581 ↓ 221.6 30,358 1

Nested Loop (cost=4.50..1,645.01 rows=137 width=164) (actual time=5.791..108.581 rows=30,358 loops=1)

6. 0.009 0.009 ↑ 1.0 1 1

Function Scan on viewport (cost=0.00..0.01 rows=1 width=32) (actual time=0.007..0.009 rows=1 loops=1)

7. 5.943 97.927 ↓ 220.0 30,358 1

Append (cost=4.50..1,643.62 rows=138 width=164) (actual time=5.774..97.927 rows=30,358 loops=1)

8. 57.359 62.638 ↓ 2,074.5 20,745 1

Bitmap Heap Scan on propiedades_busqueda_particion_pais_chile_venta (cost=4.50..116.52 rows=10 width=169) (actual time=5.767..62.638 rows=20,745 loops=1)

  • Recheck Cond: (viewport.viewport ~ ubicacion)
  • Filter: _st_contains(viewport.viewport, ubicacion)
  • Heap Blocks: exact=1621
9. 5.279 5.279 ↓ 715.3 20,745 1

Bitmap Index Scan on propiedades_busqueda_particion_pais_chile_venta_ubicacion_idx (cost=0.00..4.50 rows=29 width=0) (actual time=5.279..5.279 rows=20,745 loops=1)

  • Index Cond: (viewport.viewport ~ ubicacion)
10. 26.446 28.712 ↓ 2,400.0 9,600 1

Bitmap Heap Scan on propiedades_busqueda_particion_pais_chile_arriendo (cost=4.24..50.76 rows=4 width=167) (actual time=2.491..28.712 rows=9,600 loops=1)

  • Recheck Cond: (viewport.viewport ~ ubicacion)
  • Filter: _st_contains(viewport.viewport, ubicacion)
  • Heap Blocks: exact=722
11. 2.266 2.266 ↓ 800.0 9,600 1

Bitmap Index Scan on propiedades_busqueda_particion_pais_chile_arriend_ubicacion_idx (cost=0.00..4.24 rows=12 width=0) (actual time=2.266..2.266 rows=9,600 loops=1)

  • Index Cond: (viewport.viewport ~ ubicacion)
12. 0.043 0.092 ↑ 17.0 2 1

Bitmap Heap Scan on propiedades_busqueda_particion_pais_mexico_venta (cost=5.05..394.82 rows=34 width=165) (actual time=0.077..0.092 rows=2 loops=1)

  • Recheck Cond: (viewport.viewport ~ ubicacion)
  • Filter: _st_contains(viewport.viewport, ubicacion)
  • Heap Blocks: exact=2
13. 0.049 0.049 ↑ 50.5 2 1

Bitmap Index Scan on propiedades_busqueda_particion_pais_mexico_venta_ubicacion_idx (cost=0.00..5.04 rows=101 width=0) (actual time=0.049..0.049 rows=2 loops=1)

  • Index Cond: (viewport.viewport ~ ubicacion)
14. 0.005 0.033 ↓ 0.0 0 1

Bitmap Heap Scan on propiedades_busqueda_particion_pais_mexico_arriendo (cost=4.47..101.25 rows=8 width=164) (actual time=0.033..0.033 rows=0 loops=1)

  • Recheck Cond: (viewport.viewport ~ ubicacion)
  • Filter: _st_contains(viewport.viewport, ubicacion)
15. 0.028 0.028 ↓ 0.0 0 1

Bitmap Index Scan on propiedades_busqueda_particion_pais_mexico_arrien_ubicacion_idx (cost=0.00..4.46 rows=25 width=0) (actual time=0.028..0.028 rows=0 loops=1)

  • Index Cond: (viewport.viewport ~ ubicacion)
16. 0.073 0.159 ↑ 4.6 9 1

Bitmap Heap Scan on propiedades_busqueda_particion_pais_argentina_venta (cost=5.21..473.34 rows=41 width=165) (actual time=0.105..0.159 rows=9 loops=1)

  • Recheck Cond: (viewport.viewport ~ ubicacion)
  • Filter: _st_contains(viewport.viewport, ubicacion)
  • Heap Blocks: exact=9
17. 0.086 0.086 ↑ 13.6 9 1

Bitmap Index Scan on propiedades_busqueda_particion_pais_argentina_ven_ubicacion_idx (cost=0.00..5.20 rows=122 width=0) (actual time=0.086..0.086 rows=9 loops=1)

  • Index Cond: (viewport.viewport ~ ubicacion)
18. 0.027 0.093 ↑ 8.0 1 1

Bitmap Heap Scan on propiedades_busqueda_particion_pais_argentina_arriendo (cost=4.45..93.68 rows=8 width=162) (actual time=0.092..0.093 rows=1 loops=1)

  • Recheck Cond: (viewport.viewport ~ ubicacion)
  • Filter: _st_contains(viewport.viewport, ubicacion)
  • Heap Blocks: exact=1
19. 0.066 0.066 ↑ 23.0 1 1

Bitmap Index Scan on propiedades_busqueda_particion_pais_argentina_arr_ubicacion_idx (cost=0.00..4.45 rows=23 width=0) (actual time=0.066..0.066 rows=1 loops=1)

  • Index Cond: (viewport.viewport ~ ubicacion)
20. 0.016 0.075 ↑ 3.0 1 1

Bitmap Heap Scan on propiedades_busqueda_particion_pais_peru_venta (cost=4.22..39.09 rows=3 width=163) (actual time=0.074..0.075 rows=1 loops=1)

  • Recheck Cond: (viewport.viewport ~ ubicacion)
  • Filter: _st_contains(viewport.viewport, ubicacion)
  • Heap Blocks: exact=1
21. 0.059 0.059 ↑ 9.0 1 1

Bitmap Index Scan on propiedades_busqueda_particion_pais_peru_venta_ubicacion_idx (cost=0.00..4.22 rows=9 width=0) (actual time=0.059..0.059 rows=1 loops=1)

  • Index Cond: (viewport.viewport ~ ubicacion)
22. 0.005 0.013 ↓ 0.0 0 1

Bitmap Heap Scan on propiedades_busqueda_particion_pais_peru_arriendo (cost=4.17..15.84 rows=1 width=167) (actual time=0.013..0.013 rows=0 loops=1)

  • Recheck Cond: (viewport.viewport ~ ubicacion)
  • Filter: _st_contains(viewport.viewport, ubicacion)
23. 0.008 0.008 ↓ 0.0 0 1

Bitmap Index Scan on propiedades_busqueda_particion_pais_peru_arriendo_ubicacion_idx (cost=0.00..4.17 rows=3 width=0) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: (viewport.viewport ~ ubicacion)
24. 0.004 0.047 ↓ 0.0 0 1

Bitmap Heap Scan on propiedades_busqueda_particion_pais_colombia_venta (cost=4.60..166.69 rows=14 width=150) (actual time=0.047..0.047 rows=0 loops=1)

  • Recheck Cond: (viewport.viewport ~ ubicacion)
  • Filter: _st_contains(viewport.viewport, ubicacion)
25. 0.043 0.043 ↓ 0.0 0 1

Bitmap Index Scan on propiedades_busqueda_particion_pais_colombia_vent_ubicacion_idx (cost=0.00..4.59 rows=42 width=0) (actual time=0.043..0.043 rows=0 loops=1)

  • Index Cond: (viewport.viewport ~ ubicacion)
26. 0.004 0.045 ↓ 0.0 0 1

Bitmap Heap Scan on propiedades_busqueda_particion_pais_colombia_arriendo (cost=4.42..77.94 rows=6 width=149) (actual time=0.045..0.045 rows=0 loops=1)

  • Recheck Cond: (viewport.viewport ~ ubicacion)
  • Filter: _st_contains(viewport.viewport, ubicacion)
27. 0.041 0.041 ↓ 0.0 0 1

Bitmap Index Scan on propiedades_busqueda_particion_pais_colombia_arri_ubicacion_idx (cost=0.00..4.42 rows=19 width=0) (actual time=0.041..0.041 rows=0 loops=1)

  • Index Cond: (viewport.viewport ~ ubicacion)
28. 0.004 0.018 ↓ 0.0 0 1

Bitmap Heap Scan on propiedades_busqueda_particion_pais_venezuela_venta (cost=4.24..50.20 rows=4 width=206) (actual time=0.018..0.018 rows=0 loops=1)

  • Recheck Cond: (viewport.viewport ~ ubicacion)
  • Filter: _st_contains(viewport.viewport, ubicacion)
29. 0.014 0.014 ↓ 0.0 0 1

Bitmap Index Scan on propiedades_busqueda_particion_pais_venezuela_ven_ubicacion_idx (cost=0.00..4.24 rows=12 width=0) (actual time=0.014..0.014 rows=0 loops=1)

  • Index Cond: (viewport.viewport ~ ubicacion)
30. 0.034 0.034 ↓ 0.0 0 1

Index Scan using propiedades_busqueda_particion_pais_venezuela_arr_ubicacion_idx on propiedades_busqueda_particion_pais_venezuela_arriendo (cost=0.14..8.40 rows=1 width=187) (actual time=0.034..0.034 rows=0 loops=1)

  • Index Cond: (viewport.viewport ~ ubicacion)
  • Filter: _st_contains(viewport.viewport, ubicacion)
31. 0.003 0.016 ↓ 0.0 0 1

Bitmap Heap Scan on propiedades_busqueda_particion_pais_uruguay_venta (cost=4.23..42.55 rows=3 width=161) (actual time=0.016..0.016 rows=0 loops=1)

  • Recheck Cond: (viewport.viewport ~ ubicacion)
  • Filter: _st_contains(viewport.viewport, ubicacion)
32. 0.013 0.013 ↓ 0.0 0 1

Bitmap Index Scan on propiedades_busqueda_particion_pais_uruguay_venta_ubicacion_idx (cost=0.00..4.23 rows=10 width=0) (actual time=0.013..0.013 rows=0 loops=1)

  • Index Cond: (viewport.viewport ~ ubicacion)
33. 0.003 0.009 ↓ 0.0 0 1

Bitmap Heap Scan on propiedades_busqueda_particion_pais_uruguay_arriendo (cost=4.16..11.86 rows=1 width=152) (actual time=0.009..0.009 rows=0 loops=1)

  • Recheck Cond: (viewport.viewport ~ ubicacion)
  • Filter: _st_contains(viewport.viewport, ubicacion)
34. 0.006 0.006 ↓ 0.0 0 1

Bitmap Index Scan on propiedades_busqueda_particion_pais_uruguay_arrie_ubicacion_idx (cost=0.00..4.16 rows=2 width=0) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: (viewport.viewport ~ ubicacion)
35.          

CTE props_destacadas

36. 0.008 1,365.523 ↑ 1.0 3 1

Limit (cost=191.93..191.94 rows=3 width=121) (actual time=1,365.518..1,365.523 rows=3 loops=1)

37. 0.195 1,365.515 ↑ 6.7 3 1

Sort (cost=191.93..191.98 rows=20 width=121) (actual time=1,365.515..1,365.515 rows=3 loops=1)

  • Sort Key: avisos_destacados.total_impressions_count, avisos_destacados.listing_id DESC
  • Sort Method: top-N heapsort Memory: 25kB
38. 699.973 1,365.320 ↓ 9.2 185 1

Nested Loop (cost=0.00..191.67 rows=20 width=121) (actual time=306.641..1,365.320 rows=185 loops=1)

  • Join Filter: (((all_props.id_proyecto IS NULL) AND (avisos_destacados.listing_id = all_props.id) AND ((avisos_destacados.listing_type)::text = 'Property'::text)) OR ((all_props.id_proyecto IS NOT NULL) AND (avisos_destacados.listing_id = all_props.id_proyecto) AND ((avisos_destacados.listing_type)::text = 'Project'::text)))
  • Rows Removed by Join Filter: 6120255
39. 347.777 347.777 ↓ 210.7 28,870 1

CTE Scan on all_props (cost=0.00..2.74 rows=137 width=40) (actual time=304.493..347.777 rows=28,870 loops=1)

40. 317.333 317.570 ↓ 3.7 212 28,870

Materialize (cost=0.00..10.29 rows=58 width=89) (actual time=0.000..0.011 rows=212 loops=28,870)

41. 0.041 0.237 ↓ 3.7 212 1

Append (cost=0.00..10.00 rows=58 width=89) (actual time=0.039..0.237 rows=212 loops=1)

42. 0.010 0.010 ↓ 0.0 0 1

Seq Scan on avisos_destacados (cost=0.00..0.00 rows=1 width=113) (actual time=0.010..0.010 rows=0 loops=1)

  • Filter: (disponible AND (real_time_impressions_count < impressions_limit) AND (((listing_type)::text = 'Property'::text) OR ((listing_type)::text = 'Project'::text)))
43. 0.186 0.186 ↓ 3.7 212 1

Seq Scan on avisos_destacados_activas (cost=0.00..9.71 rows=57 width=89) (actual time=0.026..0.186 rows=212 loops=1)

  • Filter: (disponible AND (real_time_impressions_count < impressions_limit) AND (((listing_type)::text = 'Property'::text) OR ((listing_type)::text = 'Project'::text)))
44.          

CTE viewport_props

45. 4.350 39.374 ↓ 210.7 28,870 1

Nested Loop Left Join (cost=0.00..6.92 rows=137 width=656) (actual time=0.055..39.374 rows=28,870 loops=1)

  • Join Filter: (((all_props_1.id_proyecto IS NULL) AND (props_destacadas.listing_id = all_props_1.id) AND ((props_destacadas.listing_type)::text = 'Property'::text)) OR ((all_props_1.id_proyecto IS NOT NULL) AND (props_destacadas.listing_id = all_props_1.id_proyecto) AND ((props_destacadas.listing_type)::text = 'Project'::text)))
  • Rows Removed by Join Filter: 86607
46. 6.154 6.154 ↓ 210.7 28,870 1

CTE Scan on all_props all_props_1 (cost=0.00..2.74 rows=137 width=652) (actual time=0.043..6.154 rows=28,870 loops=1)

47. 28.870 28.870 ↓ 3.0 3 28,870

CTE Scan on props_destacadas (cost=0.00..0.08 rows=1 width=40) (actual time=0.000..0.001 rows=3 loops=28,870)

  • Filter: (((listing_type)::text = 'Property'::text) OR ((listing_type)::text = 'Project'::text))
48.          

CTE viewport_location_props

49. 7.009 1,701.043 ↓ 28,698.0 28,698 1

Unique (cost=10,031.39..10,031.40 rows=1 width=450) (actual time=1,664.571..1,701.043 rows=28,698 loops=1)

50. 123.198 1,694.034 ↓ 30,684.0 30,684 1

Sort (cost=10,031.39..10,031.40 rows=1 width=450) (actual time=1,664.569..1,694.034 rows=30,684 loops=1)

  • Sort Key: propiedades_busqueda_particion_pais_chile_venta_1.search_id, comuna.id
  • Sort Method: external merge Disk: 13872kB
51. 14.521 1,570.836 ↓ 30,684.0 30,684 1

Nested Loop Left Join (cost=1,000.28..10,031.38 rows=1 width=450) (actual time=1,373.612..1,570.836 rows=30,684 loops=1)

  • Join Filter: (propiedades_busqueda_particion_pais_chile_venta_1.search_id = props_destacadas_1.search_id)
  • Rows Removed by Join Filter: 92058
  • Filter: (props_destacadas_1.id IS NULL)
  • Rows Removed by Filter: 3
52. 11.808 175.400 ↓ 30,687.0 30,687 1

Gather (cost=1,000.28..10,031.29 rows=1 width=450) (actual time=8.076..175.400 rows=30,687 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
53. 117.897 163.592 ↓ 10,229.0 10,229 3

Nested Loop (cost=0.28..9,031.19 rows=1 width=450) (actual time=2.435..163.592 rows=10,229 loops=3)

54. 3.081 37.474 ↓ 15.0 15 3

Nested Loop (cost=0.00..8,897.08 rows=1 width=443) (actual time=0.958..37.474 rows=15 loops=3)

  • Join Filter: ((viewport_1.viewport && comuna.limites_simples) AND _st_intersects(viewport_1.viewport, comuna.limites_simples))
  • Rows Removed by Join Filter: 1979
55. 34.393 34.393 ↑ 1.1 1,994 3

Parallel Seq Scan on comuna (cost=0.00..8,298.13 rows=2,198 width=411) (actual time=0.039..34.393 rows=1,994 loops=3)

  • Filter: ((limites_simples IS NOT NULL) AND (ubicacion IS NOT NULL))
  • Rows Removed by Filter: 102416
56. 0.000 0.000 ↑ 1.0 1 5,982

Function Scan on viewport_1 (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=5,982)

57. 0.153 8.221 ↓ 48.7 682 45

Append (cost=0.28..133.96 rows=14 width=39) (actual time=0.227..8.221 rows=682 loops=45)

58. 5.306 5.306 ↓ 465.0 465 45

Index Scan using propiedades_busqueda_particion_pais_chile_venta_ubicacion_idx on propiedades_busqueda_particion_pais_chile_venta propiedades_busqueda_particion_pais_chile_venta_1 (cost=0.28..8.80 rows=1 width=39) (actual time=0.176..5.306 rows=465 loops=45)

  • Index Cond: ((viewport_1.viewport ~ ubicacion) AND (comuna.limites_simples ~ ubicacion))
  • Filter: (_st_contains(viewport_1.viewport, ubicacion) AND _st_contains(comuna.limites_simples, ubicacion))
  • Rows Removed by Filter: 566
59. 2.426 2.426 ↓ 217.0 217 45

Index Scan using propiedades_busqueda_particion_pais_chile_arriend_ubicacion_idx on propiedades_busqueda_particion_pais_chile_arriendo propiedades_busqueda_particion_pais_chile_arriendo_1 (cost=0.15..8.67 rows=1 width=39) (actual time=0.164..2.426 rows=217 loops=45)

  • Index Cond: ((viewport_1.viewport ~ ubicacion) AND (comuna.limites_simples ~ ubicacion))
  • Filter: (_st_contains(viewport_1.viewport, ubicacion) AND _st_contains(comuna.limites_simples, ubicacion))
  • Rows Removed by Filter: 266
60. 0.030 0.030 ↓ 0.0 0 45

Index Scan using propiedades_busqueda_particion_pais_mexico_venta_ubicacion_idx on propiedades_busqueda_particion_pais_mexico_venta propiedades_busqueda_particion_pais_mexico_venta_1 (cost=0.28..8.80 rows=1 width=39) (actual time=0.030..0.030 rows=0 loops=45)

  • Index Cond: ((viewport_1.viewport ~ ubicacion) AND (comuna.limites_simples ~ ubicacion))
  • Filter: (_st_contains(viewport_1.viewport, ubicacion) AND _st_contains(comuna.limites_simples, ubicacion))
  • Rows Removed by Filter: 0
61. 0.022 0.022 ↓ 0.0 0 45

Index Scan using propiedades_busqueda_particion_pais_mexico_arrien_ubicacion_idx on propiedades_busqueda_particion_pais_mexico_arriendo propiedades_busqueda_particion_pais_mexico_arriendo_1 (cost=0.28..8.80 rows=1 width=39) (actual time=0.022..0.022 rows=0 loops=45)

  • Index Cond: ((viewport_1.viewport ~ ubicacion) AND (comuna.limites_simples ~ ubicacion))
  • Filter: (_st_contains(viewport_1.viewport, ubicacion) AND _st_contains(comuna.limites_simples, ubicacion))
62. 0.062 0.062 ↓ 0.0 0 45

Index Scan using propiedades_busqueda_particion_pais_argentina_ven_ubicacion_idx on propiedades_busqueda_particion_pais_argentina_venta propiedades_busqueda_particion_pais_argentina_venta_1 (cost=0.28..8.80 rows=1 width=39) (actual time=0.062..0.062 rows=0 loops=45)

  • Index Cond: ((viewport_1.viewport ~ ubicacion) AND (comuna.limites_simples ~ ubicacion))
  • Filter: (_st_contains(viewport_1.viewport, ubicacion) AND _st_contains(comuna.limites_simples, ubicacion))
  • Rows Removed by Filter: 0
63. 0.052 0.052 ↓ 0.0 0 45

Index Scan using propiedades_busqueda_particion_pais_argentina_arr_ubicacion_idx on propiedades_busqueda_particion_pais_argentina_arriendo propiedades_busqueda_particion_pais_argentina_arriendo_1 (cost=0.28..8.80 rows=1 width=39) (actual time=0.051..0.052 rows=0 loops=45)

  • Index Cond: ((viewport_1.viewport ~ ubicacion) AND (comuna.limites_simples ~ ubicacion))
  • Filter: (_st_contains(viewport_1.viewport, ubicacion) AND _st_contains(comuna.limites_simples, ubicacion))
  • Rows Removed by Filter: 0
64. 0.045 0.045 ↓ 0.0 0 45

Index Scan using propiedades_busqueda_particion_pais_peru_venta_ubicacion_idx on propiedades_busqueda_particion_pais_peru_venta propiedades_busqueda_particion_pais_peru_venta_1 (cost=0.15..8.67 rows=1 width=39) (actual time=0.045..0.045 rows=0 loops=45)

  • Index Cond: ((viewport_1.viewport ~ ubicacion) AND (comuna.limites_simples ~ ubicacion))
  • Filter: (_st_contains(viewport_1.viewport, ubicacion) AND _st_contains(comuna.limites_simples, ubicacion))
  • Rows Removed by Filter: 0
65. 0.003 0.008 ↓ 0.0 0 45

Bitmap Heap Scan on propiedades_busqueda_particion_pais_peru_arriendo propiedades_busqueda_particion_pais_peru_arriendo_1 (cost=4.17..16.60 rows=1 width=39) (actual time=0.008..0.008 rows=0 loops=45)

  • Recheck Cond: (viewport_1.viewport ~ ubicacion)
  • Filter: ((comuna.limites_simples ~ ubicacion) AND _st_contains(viewport_1.viewport, ubicacion) AND _st_contains(comuna.limites_simples, ubicacion))
66. 0.005 0.005 ↓ 0.0 0 45

Bitmap Index Scan on propiedades_busqueda_particion_pais_peru_arriendo_ubicacion_idx (cost=0.00..4.17 rows=3 width=0) (actual time=0.005..0.005 rows=0 loops=45)

  • Index Cond: (viewport_1.viewport ~ ubicacion)
67. 0.034 0.034 ↓ 0.0 0 45

Index Scan using propiedades_busqueda_particion_pais_colombia_vent_ubicacion_idx on propiedades_busqueda_particion_pais_colombia_venta propiedades_busqueda_particion_pais_colombia_venta_1 (cost=0.28..8.80 rows=1 width=39) (actual time=0.034..0.034 rows=0 loops=45)

  • Index Cond: ((viewport_1.viewport ~ ubicacion) AND (comuna.limites_simples ~ ubicacion))
  • Filter: (_st_contains(viewport_1.viewport, ubicacion) AND _st_contains(comuna.limites_simples, ubicacion))
68. 0.036 0.036 ↓ 0.0 0 45

Index Scan using propiedades_busqueda_particion_pais_colombia_arri_ubicacion_idx on propiedades_busqueda_particion_pais_colombia_arriendo propiedades_busqueda_particion_pais_colombia_arriendo_1 (cost=0.28..8.79 rows=1 width=39) (actual time=0.036..0.036 rows=0 loops=45)

  • Index Cond: ((viewport_1.viewport ~ ubicacion) AND (comuna.limites_simples ~ ubicacion))
  • Filter: (_st_contains(viewport_1.viewport, ubicacion) AND _st_contains(comuna.limites_simples, ubicacion))
69. 0.013 0.013 ↓ 0.0 0 45

Index Scan using propiedades_busqueda_particion_pais_venezuela_ven_ubicacion_idx on propiedades_busqueda_particion_pais_venezuela_venta propiedades_busqueda_particion_pais_venezuela_venta_1 (cost=0.15..8.67 rows=1 width=39) (actual time=0.013..0.013 rows=0 loops=45)

  • Index Cond: ((viewport_1.viewport ~ ubicacion) AND (comuna.limites_simples ~ ubicacion))
  • Filter: (_st_contains(viewport_1.viewport, ubicacion) AND _st_contains(comuna.limites_simples, ubicacion))
70. 0.017 0.017 ↓ 0.0 0 45

Index Scan using propiedades_busqueda_particion_pais_venezuela_arr_ubicacion_idx on propiedades_busqueda_particion_pais_venezuela_arriendo propiedades_busqueda_particion_pais_venezuela_arriendo_1 (cost=0.14..8.66 rows=1 width=39) (actual time=0.017..0.017 rows=0 loops=45)

  • Index Cond: (comuna.limites_simples ~ ubicacion)
  • Filter: ((viewport_1.viewport ~ ubicacion) AND _st_contains(viewport_1.viewport, ubicacion) AND _st_contains(comuna.limites_simples, ubicacion))
71. 0.011 0.011 ↓ 0.0 0 45

Index Scan using propiedades_busqueda_particion_pais_uruguay_venta_ubicacion_idx on propiedades_busqueda_particion_pais_uruguay_venta propiedades_busqueda_particion_pais_uruguay_venta_1 (cost=0.15..8.67 rows=1 width=39) (actual time=0.011..0.011 rows=0 loops=45)

  • Index Cond: ((viewport_1.viewport ~ ubicacion) AND (comuna.limites_simples ~ ubicacion))
  • Filter: (_st_contains(viewport_1.viewport, ubicacion) AND _st_contains(comuna.limites_simples, ubicacion))
72. 0.003 0.006 ↓ 0.0 0 45

Bitmap Heap Scan on propiedades_busqueda_particion_pais_uruguay_arriendo propiedades_busqueda_particion_pais_uruguay_arriendo_1 (cost=4.16..12.37 rows=1 width=39) (actual time=0.006..0.006 rows=0 loops=45)

  • Recheck Cond: (viewport_1.viewport ~ ubicacion)
  • Filter: ((comuna.limites_simples ~ ubicacion) AND _st_contains(viewport_1.viewport, ubicacion) AND _st_contains(comuna.limites_simples, ubicacion))
73. 0.003 0.003 ↓ 0.0 0 45

Bitmap Index Scan on propiedades_busqueda_particion_pais_uruguay_arrie_ubicacion_idx (cost=0.00..4.16 rows=2 width=0) (actual time=0.003..0.003 rows=0 loops=45)

  • Index Cond: (viewport_1.viewport ~ ubicacion)
74. 1,380.915 1,380.915 ↑ 1.0 3 30,687

CTE Scan on props_destacadas props_destacadas_1 (cost=0.00..0.06 rows=3 width=36) (actual time=0.045..0.045 rows=3 loops=30,687)

75.          

CTE grouped_props

76. 0.015 1,913.948 ↑ 2.1 65 1

Append (cost=0.03..266.24 rows=134 width=160) (actual time=1,769.055..1,913.948 rows=65 loops=1)

77. 0.031 1,819.746 ↓ 42.0 42 1

Subquery Scan on "*SELECT* 1_1" (cost=0.03..1.96 rows=1 width=640) (actual time=1,769.054..1,819.746 rows=42 loops=1)

78. 40.566 1,819.715 ↓ 42.0 42 1

GroupAggregate (cost=0.03..1.95 rows=1 width=672) (actual time=1,769.052..1,819.715 rows=42 loops=1)

  • Group Key: viewport_location_props.location_id, viewport_location_props.location_name, viewport_location_props.limites_simples
79. 51.774 1,779.149 ↓ 28,698.0 28,698 1

Sort (cost=0.03..0.04 rows=1 width=616) (actual time=1,764.269..1,779.149 rows=28,698 loops=1)

  • Sort Key: viewport_location_props.location_id, viewport_location_props.location_name, viewport_location_props.limites_simples
  • Sort Method: external merge Disk: 13056kB
80. 1,727.375 1,727.375 ↓ 28,698.0 28,698 1

CTE Scan on viewport_location_props (cost=0.00..0.02 rows=1 width=616) (actual time=1,664.576..1,727.375 rows=28,698 loops=1)

81. 0.008 94.187 ↑ 5.8 23 1

Subquery Scan on "*SELECT* 2" (cost=8.25..263.61 rows=133 width=156) (actual time=93.486..94.187 rows=23 loops=1)

82. 1.141 94.179 ↑ 5.8 23 1

HashAggregate (cost=8.25..262.28 rows=133 width=188) (actual time=93.484..94.179 rows=23 loops=1)

  • Group Key: st_snaptogrid(viewport_props_1.ubicacion, '0'::double precision, '0'::double precision, '0.035'::double precision, '0.035'::double precision)
83. 8.714 93.038 ↓ 1.3 169 1

Hash Anti Join (cost=0.13..6.59 rows=133 width=96) (actual time=13.229..93.038 rows=169 loops=1)

  • Hash Cond: (viewport_props_1.search_id = viewport_location_props_1.search_id)
84. 6.418 71.338 ↓ 215.4 28,867 1

Hash Anti Join (cost=0.10..4.54 rows=134 width=64) (actual time=0.079..71.338 rows=28,867 loops=1)

  • Hash Cond: (viewport_props_1.search_id = props_destacadas_2.search_id)
85. 64.915 64.915 ↓ 210.7 28,870 1

CTE Scan on viewport_props viewport_props_1 (cost=0.00..2.74 rows=137 width=64) (actual time=0.058..64.915 rows=28,870 loops=1)

86. 0.003 0.005 ↑ 1.0 3 1

Hash (cost=0.06..0.06 rows=3 width=32) (actual time=0.005..0.005 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
87. 0.002 0.002 ↑ 1.0 3 1

CTE Scan on props_destacadas props_destacadas_2 (cost=0.00..0.06 rows=3 width=32) (actual time=0.001..0.002 rows=3 loops=1)

88. 4.394 12.986 ↓ 28,698.0 28,698 1

Hash (cost=0.02..0.02 rows=1 width=32) (actual time=12.986..12.986 rows=28,698 loops=1)

  • Buckets: 32768 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1376kB
89. 8.592 8.592 ↓ 28,698.0 28,698 1

CTE Scan on viewport_location_props viewport_location_props_1 (cost=0.00..0.02 rows=1 width=32) (actual time=0.017..8.592 rows=28,698 loops=1)

90.          

CTE search_ids

91. 2.949 3.077 ↓ 6.4 28,837 1

ProjectSet (cost=0.00..25.85 rows=4,500 width=32) (actual time=0.017..3.077 rows=28,837 loops=1)

92. 0.128 0.128 ↓ 1.1 48 1

CTE Scan on grouped_props grouped_props_1 (cost=0.00..3.01 rows=45 width=32) (actual time=0.012..0.128 rows=48 loops=1)

  • Filter: (count >= 5)
  • Rows Removed by Filter: 17
93. 0.010 1,915.416 ↑ 2.1 65 1

Subquery Scan on "*SELECT* 1" (cost=8.42..10.09 rows=134 width=32) (actual time=1,915.401..1,915.416 rows=65 loops=1)

94. 0.127 1,915.406 ↑ 2.1 65 1

Sort (cost=8.42..8.75 rows=134 width=64) (actual time=1,915.399..1,915.406 rows=65 loops=1)

  • Sort Key: grouped_props.nombre
  • Sort Method: quicksort Memory: 57kB
95. 1,915.279 1,915.279 ↑ 2.1 65 1

CTE Scan on grouped_props (cost=0.00..3.69 rows=134 width=64) (actual time=1,769.099..1,915.279 rows=65 loops=1)

96. 0.484 64.988 ↑ 2.2 31 1

Subquery Scan on t2 (cost=580.86..590.21 rows=68 width=32) (actual time=63.518..64.988 rows=31 loops=1)

97. 1.193 64.504 ↑ 2.2 31 1

GroupAggregate (cost=580.86..589.36 rows=68 width=424) (actual time=63.479..64.504 rows=31 loops=1)

  • Group Key: (st_snaptogrid(viewport_props.ubicacion, '0'::double precision, '0'::double precision, '0.0006'::double precision, '0.0006'::double precision))
98. 0.111 63.311 ↑ 2.1 33 1

Sort (cost=580.86..581.03 rows=68 width=690) (actual time=63.304..63.311 rows=33 loops=1)

  • Sort Key: (st_snaptogrid(viewport_props.ubicacion, '0'::double precision, '0'::double precision, '0.0006'::double precision, '0.0006'::double precision))
  • Sort Method: quicksort Memory: 34kB
99. 0.084 63.200 ↑ 2.1 33 1

Hash Left Join (cost=152.34..578.79 rows=68 width=690) (actual time=38.954..63.200 rows=33 loops=1)

  • Hash Cond: (viewport_props.id_moneda = monedas2.id)
100. 8.279 63.098 ↑ 2.1 33 1

Hash Anti Join (cost=151.14..577.24 rows=68 width=628) (actual time=38.910..63.098 rows=33 loops=1)

  • Hash Cond: (viewport_props.search_id = search_ids.search_id)
101. 16.259 39.949 ↓ 210.7 28,870 1

Hash Right Join (cost=4.89..428.25 rows=137 width=660) (actual time=23.450..39.949 rows=28,870 loops=1)

  • Hash Cond: ((resumen_propiedades_usuarios.search_id)::text = viewport_props.search_id)
102. 0.369 0.369 ↓ 2.3 262 1

Index Scan using resumen_propiedades_usuarios_busqueda_idx on resumen_propiedades_usuarios (cost=0.43..423.37 rows=112 width=11) (actual time=0.029..0.369 rows=262 loops=1)

  • Index Cond: (id_usuario = 5)
103. 13.667 23.321 ↓ 210.7 28,870 1

Hash (cost=2.74..2.74 rows=137 width=656) (actual time=23.321..23.321 rows=28,870 loops=1)

  • Buckets: 32768 (originally 1024) Batches: 2 (originally 1) Memory Usage: 3939kB
104. 9.654 9.654 ↓ 210.7 28,870 1

CTE Scan on viewport_props (cost=0.00..2.74 rows=137 width=656) (actual time=0.026..9.654 rows=28,870 loops=1)

105. 4.089 14.870 ↓ 6.4 28,837 1

Hash (cost=90.00..90.00 rows=4,500 width=32) (actual time=14.870..14.870 rows=28,837 loops=1)

  • Buckets: 32768 (originally 8192) Batches: 1 (originally 1) Memory Usage: 1382kB
106. 10.781 10.781 ↓ 6.4 28,837 1

CTE Scan on search_ids (cost=0.00..90.00 rows=4,500 width=32) (actual time=0.020..10.781 rows=28,837 loops=1)

107. 0.004 0.018 ↑ 1.0 9 1

Hash (cost=1.09..1.09 rows=9 width=38) (actual time=0.018..0.018 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
108. 0.014 0.014 ↑ 1.0 9 1

Seq Scan on monedas monedas2 (cost=0.00..1.09 rows=9 width=38) (actual time=0.012..0.014 rows=9 loops=1)

Planning time : 17.954 ms
Execution time : 1,982.727 ms