explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6T6 : listaofertas

Settings

Optimization(s) for this plan:

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

Nested Loop (cost=189.99..111,792.48 rows=1 width=972) (actual rows= loops=)

  • Join Filter: (oh.sogecodi = oca.sogecodi)
2.          

Initplan (forNested Loop)

3. 0.000 0.000 ↓ 0.0

Aggregate (cost=76.60..76.61 rows=1 width=8) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Seq Scan on tipotarifas (cost=0.00..74.86 rows=694 width=0) (actual rows= loops=)

  • Filter: (titaresi = 0)
5. 0.000 0.000 ↓ 0.0

Aggregate (cost=1.34..1.35 rows=1 width=8) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Seq Scan on mercado (cost=0.00..1.30 rows=18 width=0) (actual rows= loops=)

  • Filter: (mercficticio = '0'::numeric)
7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=111.89..3,155.11 rows=1 width=316) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=111.60..3,153.83 rows=1 width=284) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=111.31..3,048.77 rows=314 width=228) (actual rows= loops=)

  • Hash Cond: ((oh.centcodi)::text = (c.centcodi)::text)
  • Filter: ((c.centbaja <> 1) OR ((oh.centcodi)::text = '-1'::text))
10. 0.000 0.000 ↓ 0.0

Hash Join (cost=95.90..3,031.72 rows=548 width=222) (actual rows= loops=)

  • Hash Cond: ((oh.sogecodi = oc.sogecodi) AND (oh.ofcodi = oc.ofcacodi))
11. 0.000 0.000 ↓ 0.0

Seq Scan on ofertamasterhotel oh (cost=0.00..2,556.16 rows=72,316 width=101) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash (cost=71.36..71.36 rows=1,636 width=121) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Seq Scan on ofertacambio oc (cost=0.00..71.36 rows=1,636 width=121) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Hash (cost=12.96..12.96 rows=196 width=10) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Seq Scan on centros c (cost=0.00..12.96 rows=196 width=10) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Index Scan using ofertamaster_pkey on ofertamaster om (cost=0.29..0.33 rows=1 width=60) (actual rows= loops=)

  • Index Cond: ((sogecodi = oh.sogecodi) AND (ofmacodi = oh.ofmacodi))
  • Filter: ((ofmatipo)::text = 'C'::text)
17. 0.000 0.000 ↓ 0.0

Index Scan using ofertacambiodescripcion_pkey on ofertacambiodescripcion ofcd (cost=0.29..1.28 rows=1 width=40) (actual rows= loops=)

  • Index Cond: ((sogecodi = oc.sogecodi) AND (ofcacodi = oc.ofcacodi) AND (idiocodi = 1))
18. 0.000 0.000 ↓ 0.0

Index Scan using ofertacategoria_pkey on ofertacategoria oca (cost=0.14..0.23 rows=1 width=22) (actual rows= loops=)

  • Index Cond: ((sogecodi = om.sogecodi) AND (ofcacodi = om.ofcacodi))
19.          

SubPlan (forNested Loop)

20. 0.000 0.000 ↓ 0.0

Aggregate (cost=2,221.90..2,221.91 rows=1 width=8) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on ofertamasterhotel (cost=208.09..2,221.89 rows=1 width=4) (actual rows= loops=)

  • Recheck Cond: (sogecodi = om.sogecodi)
  • Filter: ((centcodi > 0) AND (ofmacodi = om.ofmacodi) AND ((ofmatipo)::text = (om.ofmatipo)::text))
22. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ofertamasterhotel_pkey (cost=0.00..208.09 rows=9,040 width=0) (actual rows= loops=)

  • Index Cond: (sogecodi = om.sogecodi)
23. 0.000 0.000 ↓ 0.0

Aggregate (cost=7,353.21..7,353.22 rows=1 width=8) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Nested Loop (cost=208.37..7,353.21 rows=1 width=4) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Nested Loop (cost=208.09..7,344.84 rows=1 width=12) (actual rows= loops=)

  • Join Filter: (omh.ofmahocodi = op.ofmahocodi)
26. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on ofertamasterhotel omh (cost=208.09..2,221.89 rows=1 width=16) (actual rows= loops=)

  • Recheck Cond: (sogecodi = om.sogecodi)
  • Filter: ((centcodi > 0) AND (ofmacodi = om.ofmacodi) AND ((ofmatipo)::text = (om.ofmatipo)::text))
27. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ofertamasterhotel_pkey (cost=0.00..208.09 rows=9,040 width=0) (actual rows= loops=)

  • Index Cond: (sogecodi = om.sogecodi)
28. 0.000 0.000 ↓ 0.0

Seq Scan on ofertaperiodos op (cost=0.00..5,095.68 rows=2,182 width=8) (actual rows= loops=)

  • Filter: ((sogecodi = om.sogecodi) AND (ofpetipo = 2) AND (now() >= ofpefechadesde) AND (now() <= ofpefechahasta))
29. 0.000 0.000 ↓ 0.0

Index Only Scan using ofertacambio_pkey on ofertacambio oc_1 (cost=0.28..8.30 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((sogecodi = om.sogecodi) AND (ofcacodi = omh.ofcodi))
30. 0.000 0.000 ↓ 0.0

Aggregate (cost=3,983.08..3,983.09 rows=1 width=8) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Seq Scan on ofertaperiodos (cost=0.00..3,983.07 rows=1 width=8) (actual rows= loops=)

  • Filter: ((ofmahocodi = oh.ofmahocodi) AND (sogecodi = om.sogecodi) AND (ofpetipo = 2))
32. 0.000 0.000 ↓ 0.0

Aggregate (cost=3,983.08..3,983.09 rows=1 width=8) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Seq Scan on ofertaperiodos ofertaperiodos_1 (cost=0.00..3,983.07 rows=1 width=8) (actual rows= loops=)

  • Filter: ((ofmahocodi = oh.ofmahocodi) AND (sogecodi = om.sogecodi) AND (ofpetipo = 2))
34. 0.000 0.000 ↓ 0.0

Aggregate (cost=3,983.08..3,983.09 rows=1 width=8) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Seq Scan on ofertaperiodos ofertaperiodos_2 (cost=0.00..3,983.07 rows=1 width=8) (actual rows= loops=)

  • Filter: ((ofmahocodi = oh.ofmahocodi) AND (sogecodi = om.sogecodi) AND (ofpetipo = 1))
36. 0.000 0.000 ↓ 0.0

Aggregate (cost=3,983.08..3,983.09 rows=1 width=8) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Seq Scan on ofertaperiodos ofertaperiodos_3 (cost=0.00..3,983.07 rows=1 width=8) (actual rows= loops=)

  • Filter: ((ofmahocodi = oh.ofmahocodi) AND (sogecodi = om.sogecodi) AND (ofpetipo = 1))
38. 0.000 0.000 ↓ 0.0

Aggregate (cost=3,983.09..3,983.17 rows=1 width=32) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Seq Scan on ofertaperiodos ofertaperiodos_4 (cost=0.00..3,983.07 rows=1 width=2) (actual rows= loops=)

  • Filter: ((ofmahocodi = oh.ofmahocodi) AND (sogecodi = om.sogecodi) AND (ofpetipo = 2))
40. 0.000 0.000 ↓ 0.0

Aggregate (cost=3,983.08..3,983.09 rows=1 width=8) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Seq Scan on ofertaperiodos ofertaperiodos_5 (cost=0.00..3,983.07 rows=1 width=8) (actual rows= loops=)

  • Filter: ((ofmahocodi = oh.ofmahocodi) AND (sogecodi = om.sogecodi) AND (ofpetipo = 2))
42. 0.000 0.000 ↓ 0.0

Aggregate (cost=3,983.08..3,983.09 rows=1 width=8) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Seq Scan on ofertaperiodos ofertaperiodos_6 (cost=0.00..3,983.07 rows=1 width=8) (actual rows= loops=)

  • Filter: ((ofmahocodi = oh.ofmahocodi) AND (sogecodi = om.sogecodi) AND (ofpetipo = 2))
44. 0.000 0.000 ↓ 0.0

Aggregate (cost=3,983.09..3,983.17 rows=1 width=32) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Seq Scan on ofertaperiodos ofertaperiodos_7 (cost=0.00..3,983.07 rows=1 width=2) (actual rows= loops=)

  • Filter: ((ofmahocodi = oh.ofmahocodi) AND (sogecodi = om.sogecodi) AND (ofpetipo = 1))
46. 0.000 0.000 ↓ 0.0

Aggregate (cost=3,983.08..3,983.09 rows=1 width=32) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Seq Scan on ofertaperiodos ofertaperiodos_8 (cost=0.00..3,983.07 rows=1 width=5) (actual rows= loops=)

  • Filter: ((ofmahocodi = oh.ofmahocodi) AND (sogecodi = om.sogecodi) AND (ofpetipo = 2))
48. 0.000 0.000 ↓ 0.0

Aggregate (cost=3,983.08..3,983.09 rows=1 width=32) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Seq Scan on ofertaperiodos ofertaperiodos_9 (cost=0.00..3,983.07 rows=1 width=5) (actual rows= loops=)

  • Filter: ((ofmahocodi = oh.ofmahocodi) AND (sogecodi = om.sogecodi) AND (ofpetipo = 2))
50. 0.000 0.000 ↓ 0.0

Aggregate (cost=3,983.08..3,983.09 rows=1 width=32) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Seq Scan on ofertaperiodos ofertaperiodos_10 (cost=0.00..3,983.07 rows=1 width=5) (actual rows= loops=)

  • Filter: ((ofmahocodi = oh.ofmahocodi) AND (sogecodi = om.sogecodi) AND (ofpetipo = 2))
52. 0.000 0.000 ↓ 0.0

Aggregate (cost=3,983.08..3,983.09 rows=1 width=32) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Seq Scan on ofertaperiodos ofertaperiodos_11 (cost=0.00..3,983.07 rows=1 width=5) (actual rows= loops=)

  • Filter: ((ofmahocodi = oh.ofmahocodi) AND (sogecodi = om.sogecodi) AND (ofpetipo = 2))
54. 0.000 0.000 ↓ 0.0

Aggregate (cost=2,199.30..2,199.31 rows=1 width=8) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on ofertamasterhotel ofertamasterhotel_1 (cost=208.09..2,199.29 rows=1 width=0) (actual rows= loops=)

  • Recheck Cond: (sogecodi = om.sogecodi)
  • Filter: ((centcodi > 0) AND (ofmacodi = om.ofmacodi))
56. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ofertamasterhotel_pkey (cost=0.00..208.09 rows=9,040 width=0) (actual rows= loops=)

  • Index Cond: (sogecodi = om.sogecodi)
57. 0.000 0.000 ↓ 0.0

Aggregate (cost=1,255.62..1,255.63 rows=1 width=8) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Index Only Scan using ofertasregimenes_pkey on ofertasregimenes (cost=0.42..1,255.62 rows=1 width=0) (actual rows= loops=)

  • Index Cond: ((sogecodi = om.sogecodi) AND (ofcodi = (oh.ofcodi)::numeric) AND (oftipo = (om.ofmatipo)::text))
59. 0.000 0.000 ↓ 0.0

Aggregate (cost=1,255.63..1,255.64 rows=1 width=32) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Index Only Scan using ofertasregimenes_pkey on ofertasregimenes ofertasregimenes_1 (cost=0.42..1,255.62 rows=1 width=4) (actual rows= loops=)

  • Index Cond: ((sogecodi = om.sogecodi) AND (ofcodi = (oh.ofcodi)::numeric) AND (oftipo = (om.ofmatipo)::text))
61. 0.000 0.000 ↓ 0.0

Aggregate (cost=900.36..900.37 rows=1 width=8) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10.51..900.36 rows=1 width=0) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on tipotarifas tt (cost=10.09..67.66 rows=99 width=8) (actual rows= loops=)

  • Recheck Cond: (sogecodi = om.sogecodi)
  • Filter: (titaresi = 0)
64. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on tipotarifas_pkey (cost=0.00..10.06 rows=238 width=0) (actual rows= loops=)

  • Index Cond: (sogecodi = om.sogecodi)
65. 0.000 0.000 ↓ 0.0

Index Only Scan using ofertastipotarifa_pkey on ofertastipotarifa oft (cost=0.43..8.33 rows=1 width=9) (actual rows= loops=)

  • Index Cond: ((sogecodi = om.sogecodi) AND (titacodi = (tt.titacodi)::numeric) AND (ofcodi = (oh.ofcodi)::numeric) AND (oftipo = (om.ofmatipo)::text))
66. 0.000 0.000 ↓ 0.0

Aggregate (cost=900.36..900.37 rows=1 width=8) (actual rows= loops=)

67. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10.51..900.36 rows=1 width=0) (actual rows= loops=)

68. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on tipotarifas tt_1 (cost=10.09..67.66 rows=99 width=8) (actual rows= loops=)

  • Recheck Cond: (sogecodi = om.sogecodi)
  • Filter: (titaresi = 0)
69. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on tipotarifas_pkey (cost=0.00..10.06 rows=238 width=0) (actual rows= loops=)

  • Index Cond: (sogecodi = om.sogecodi)
70. 0.000 0.000 ↓ 0.0

Index Only Scan using ofertastipotarifa_pkey on ofertastipotarifa oft_1 (cost=0.43..8.33 rows=1 width=9) (actual rows= loops=)

  • Index Cond: ((sogecodi = om.sogecodi) AND (titacodi = (tt_1.titacodi)::numeric) AND (ofcodi = (oh.ofcodi)::numeric) AND (oftipo = (om.ofmatipo)::text))
71. 0.000 0.000 ↓ 0.0

Aggregate (cost=9.83..9.84 rows=1 width=8) (actual rows= loops=)

72. 0.000 0.000 ↓ 0.0

Hash Join (cost=8.46..9.82 rows=1 width=0) (actual rows= loops=)

  • Hash Cond: ((me.merccodi)::numeric = ome.merccodi)
73. 0.000 0.000 ↓ 0.0

Seq Scan on mercado me (cost=0.00..1.30 rows=18 width=4) (actual rows= loops=)

  • Filter: (mercficticio = '0'::numeric)
74. 0.000 0.000 ↓ 0.0

Hash (cost=8.45..8.45 rows=1 width=5) (actual rows= loops=)

75. 0.000 0.000 ↓ 0.0

Index Only Scan using ofertasmercado_pkey on ofertasmercado ome (cost=0.43..8.45 rows=1 width=5) (actual rows= loops=)

  • Index Cond: ((sogecodi = om.sogecodi) AND (ofcodi = (oh.ofcodi)::numeric) AND (oftipo = (om.ofmatipo)::text))
76. 0.000 0.000 ↓ 0.0

Aggregate (cost=9.83..9.84 rows=1 width=32) (actual rows= loops=)

77. 0.000 0.000 ↓ 0.0

Hash Join (cost=8.46..9.82 rows=1 width=4) (actual rows= loops=)

  • Hash Cond: ((me_1.merccodi)::numeric = ome_1.merccodi)
78. 0.000 0.000 ↓ 0.0

Seq Scan on mercado me_1 (cost=0.00..1.30 rows=18 width=8) (actual rows= loops=)

  • Filter: (mercficticio = '0'::numeric)
79. 0.000 0.000 ↓ 0.0

Hash (cost=8.45..8.45 rows=1 width=5) (actual rows= loops=)

80. 0.000 0.000 ↓ 0.0

Index Only Scan using ofertasmercado_pkey on ofertasmercado ome_1 (cost=0.43..8.45 rows=1 width=5) (actual rows= loops=)

  • Index Cond: ((sogecodi = om.sogecodi) AND (ofcodi = (oh.ofcodi)::numeric) AND (oftipo = (om.ofmatipo)::text))
81. 0.000 0.000 ↓ 0.0

Aggregate (cost=40.89..40.90 rows=1 width=8) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on partners (cost=9.74..40.60 rows=115 width=0) (actual rows= loops=)

  • Recheck Cond: (sogecodi = om.sogecodi)
  • Filter: (partactivo = 1)
83. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on partners_pkey (cost=0.00..9.71 rows=191 width=0) (actual rows= loops=)

  • Index Cond: (sogecodi = om.sogecodi)
84. 0.000 0.000 ↓ 0.0

Aggregate (cost=21.00..21.01 rows=1 width=8) (actual rows= loops=)

85. 0.000 0.000 ↓ 0.0

Index Only Scan using ofertacanal_pkey on ofertacanal (cost=0.43..20.99 rows=5 width=0) (actual rows= loops=)

  • Index Cond: ((sogecodi = om.sogecodi) AND (ofcodi = oh.ofcodi) AND (oftipo = (om.ofmatipo)::text) AND (ofchtipo = 'P'::text))
86. 0.000 0.000 ↓ 0.0

Aggregate (cost=21.00..21.01 rows=1 width=8) (actual rows= loops=)

87. 0.000 0.000 ↓ 0.0

Index Only Scan using ofertacanal_pkey on ofertacanal ofertacanal_1 (cost=0.43..20.99 rows=5 width=0) (actual rows= loops=)

  • Index Cond: ((sogecodi = om.sogecodi) AND (ofcodi = oh.ofcodi) AND (oftipo = (om.ofmatipo)::text) AND (ofchtipo = 'P'::text))
88. 0.000 0.000 ↓ 0.0

Aggregate (cost=22,263.49..22,263.50 rows=1 width=8) (actual rows= loops=)

89. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on agencia (cost=1,815.41..22,262.87 rows=248 width=0) (actual rows= loops=)

  • Recheck Cond: (agenestado = 1)
  • Filter: ((agenmodointegracion = 1) AND (eadvol.damesogecodiaux((sogecodi)::double precision) = (om.sogecodi)::double precision))
90. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on agencia_idx1 (cost=0.00..1,815.35 rows=52,398 width=0) (actual rows= loops=)

  • Index Cond: (agenestado = 1)
91. 0.000 0.000 ↓ 0.0

Aggregate (cost=14.73..14.74 rows=1 width=8) (actual rows= loops=)

92. 0.000 0.000 ↓ 0.0

Index Only Scan using ofertacanal_pkey on ofertacanal ofertacanal_2 (cost=0.43..14.72 rows=3 width=0) (actual rows= loops=)

  • Index Cond: ((sogecodi = om.sogecodi) AND (ofcodi = oh.ofcodi) AND (oftipo = (om.ofmatipo)::text) AND (ofchtipo = 'B'::text))
93. 0.000 0.000 ↓ 0.0

Aggregate (cost=14.73..14.74 rows=1 width=8) (actual rows= loops=)

94. 0.000 0.000 ↓ 0.0

Index Only Scan using ofertacanal_pkey on ofertacanal ofertacanal_3 (cost=0.43..14.72 rows=3 width=0) (actual rows= loops=)

  • Index Cond: ((sogecodi = om.sogecodi) AND (ofcodi = oh.ofcodi) AND (oftipo = (om.ofmatipo)::text) AND (ofchtipo = 'B'::text))
95. 0.000 0.000 ↓ 0.0

Aggregate (cost=22,262.85..22,262.86 rows=1 width=8) (actual rows= loops=)

96. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on agencia agencia_1 (cost=1,815.36..22,262.81 rows=14 width=0) (actual rows= loops=)

  • Recheck Cond: (agenestado = 1)
  • Filter: ((agenmodointegracion <> 1) AND (eadvol.damesogecodiaux((sogecodi)::double precision) = (om.sogecodi)::double precision))
97. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on agencia_idx1 (cost=0.00..1,815.35 rows=52,398 width=0) (actual rows= loops=)

  • Index Cond: (agenestado = 1)
98. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.46..8.47 rows=1 width=8) (actual rows= loops=)

99. 0.000 0.000 ↓ 0.0

Index Only Scan using ofertacanal_pkey on ofertacanal ofertacanal_4 (cost=0.43..8.46 rows=1 width=0) (actual rows= loops=)

  • Index Cond: ((sogecodi = om.sogecodi) AND (ofcodi = oh.ofcodi) AND (oftipo = (om.ofmatipo)::text) AND (ofchtipo = 'E'::text))
100. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.46..8.47 rows=1 width=8) (actual rows= loops=)

101. 0.000 0.000 ↓ 0.0

Index Only Scan using ofertacanal_pkey on ofertacanal ofertacanal_5 (cost=0.43..8.46 rows=1 width=0) (actual rows= loops=)

  • Index Cond: ((sogecodi = om.sogecodi) AND (ofcodi = oh.ofcodi) AND (oftipo = (om.ofmatipo)::text) AND (ofchtipo = 'E'::text))