explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1yso : Optimization for: plan #nnwQ

Settings

Optimization path:

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

HashAggregate (cost=9,326.85..9,327.26 rows=41 width=4) (actual rows= loops=)

  • Group Key: l_1.cod_linea
2. 0.000 0.000 ↓ 0.0

Append (cost=999.81..9,326.75 rows=41 width=4) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Unique (cost=999.81..999.84 rows=6 width=4) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Sort (cost=999.81..999.83 rows=6 width=4) (actual rows= loops=)

  • Sort Key: l_1.cod_linea
5. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=531.99..999.74 rows=6 width=4) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=531.71..997.31 rows=8 width=16) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=531.57..995.69 rows=8 width=16) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=531.42..994.04 rows=8 width=16) (actual rows= loops=)

  • Hash Cond: (uptu_parada.cod_variante = v.cod_variante)
9. 0.000 0.000 ↓ 0.0

Hash Join (cost=22.40..484.91 rows=8 width=12) (actual rows= loops=)

  • Hash Cond: (v_1.cod_variante = uptu_parada.cod_variante)
10. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_variante v_1 (cost=0.00..460.02 rows=642 width=8) (actual rows= loops=)

  • Filter: (cod_variante < 9000)
11. 0.000 0.000 ↓ 0.0

Hash (cost=22.30..22.30 rows=8 width=4) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.63..22.30 rows=8 width=4) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Index Scan using uptu_ubic_parada_cod_ubic_parada_key on uptu_ubic_parada (cost=0.28..4.30 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (cod_ubic_parada = 1376)
14. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on uptu_parada (cost=2.35..17.92 rows=8 width=12) (actual rows= loops=)

  • Recheck Cond: (gid_ubic_parada = uptu_ubic_parada.gid)
15. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on uptu_parada_gid_ubic_parada (cost=0.00..2.35 rows=8 width=0) (actual rows= loops=)

  • Index Cond: (gid_ubic_parada = uptu_ubic_parada.gid)
16. 0.000 0.000 ↓ 0.0

Hash (cost=501.00..501.00 rows=642 width=4) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Hash Join (cost=23.32..501.00 rows=642 width=4) (actual rows= loops=)

  • Hash Cond: (s.cod_linea = l.cod_linea)
18. 0.000 0.000 ↓ 0.0

Hash Join (cost=16.19..485.04 rows=642 width=8) (actual rows= loops=)

  • Hash Cond: (v.cod_sublinea = s.cod_sublinea)
19. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_variante v (cost=0.00..460.02 rows=642 width=8) (actual rows= loops=)

  • Filter: (cod_variante < 9000)
20. 0.000 0.000 ↓ 0.0

Hash (cost=11.64..11.64 rows=364 width=8) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_sublinea s (cost=0.00..11.64 rows=364 width=8) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Hash (cost=5.06..5.06 rows=165 width=4) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_linea l (cost=0.00..5.06 rows=165 width=4) (actual rows= loops=)

  • Filter: ((desc_linea)::text !~~ 'PRU%'::text)
24. 0.000 0.000 ↓ 0.0

Index Scan using uptu_sublinea_pkey on uptu_sublinea s_1 (cost=0.15..0.20 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (cod_sublinea = v_1.cod_sublinea)
25. 0.000 0.000 ↓ 0.0

Index Scan using uptu_linea_pkey on uptu_linea l_1 (cost=0.14..0.19 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (cod_linea = s_1.cod_linea)
  • Filter: ((desc_linea)::text !~~ 'PRU%'::text)
26. 0.000 0.000 ↓ 0.0

Index Scan using uptu_tipo_variante_pkey on uptu_tipo_variante (cost=0.28..0.30 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (cod_variante = uptu_parada.cod_variante)
  • Filter: (es_especial = 'N'::bpchar)
27. 0.000 0.000 ↓ 0.0

Unique (cost=5,118.21..5,118.32 rows=22 width=4) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Sort (cost=5,118.21..5,118.27 rows=22 width=4) (actual rows= loops=)

  • Sort Key: query.cod_linea
29. 0.000 0.000 ↓ 0.0

Merge Join (cost=5,088.29..5,117.72 rows=22 width=4) (actual rows= loops=)

  • Merge Cond: (query.cod_variante = p.cod_variante)
30. 0.000 0.000 ↓ 0.0

Sort (cost=5,055.75..5,060.60 rows=1,940 width=748) (actual rows= loops=)

  • Sort Key: query.cod_variante
31. 0.000 0.000 ↓ 0.0

Subquery Scan on query (cost=4,857.65..4,949.80 rows=1,940 width=748) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Unique (cost=4,857.65..4,930.40 rows=1,940 width=562) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Sort (cost=4,857.65..4,862.50 rows=1,940 width=562) (actual rows= loops=)

  • Sort Key: nm.gid, l_2.cod_linea, l_2.desc_linea, s_2.ordinal_sublinea, s_2.cod_sublinea, s_2.desc_sublinea, nm.cod_variante, nm.desc_variante, nm.the_geom, nm.cod_variante_maximal, ev.cod_origen, d1.desc_destino, ev.cod_destino, d2.desc_destino
34. 0.000 0.000 ↓ 0.0

Append (cost=482.23..4,751.71 rows=1,940 width=562) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Hash Join (cost=482.23..974.68 rows=326 width=4,028) (actual rows= loops=)

  • Hash Cond: (ev.cod_destino = d2.cod_destino)
36. 0.000 0.000 ↓ 0.0

Hash Join (cost=473.18..961.15 rows=326 width=4,009) (actual rows= loops=)

  • Hash Cond: (ev.cod_origen = d1.cod_destino)
37. 0.000 0.000 ↓ 0.0

Hash Join (cost=464.13..947.62 rows=326 width=3,990) (actual rows= loops=)

  • Hash Cond: (s_2.cod_linea = l_2.cod_linea)
38. 0.000 0.000 ↓ 0.0

Hash Join (cost=457.01..936.01 rows=326 width=3,987) (actual rows= loops=)

  • Hash Cond: (v_2.cod_sublinea = s_2.cod_sublinea)
39. 0.000 0.000 ↓ 0.0

Hash Join (cost=440.82..915.34 rows=326 width=3,949) (actual rows= loops=)

  • Hash Cond: (v_2.cod_variante = nm.cod_variante_maximal)
40. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_variante v_2 (cost=0.00..460.02 rows=642 width=8) (actual rows= loops=)

  • Filter: (cod_variante < 9000)
41. 0.000 0.000 ↓ 0.0

Hash (cost=436.74..436.74 rows=326 width=3,945) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Hash Join (cost=395.02..436.74 rows=326 width=3,945) (actual rows= loops=)

  • Hash Cond: (ev.cod_variante = nm.cod_variante)
43. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_extremo_variante ev (cost=0.00..30.97 rows=1,997 width=12) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Hash (cost=390.95..390.95 rows=326 width=3,937) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_variante_no_maximal nm (cost=34.81..390.95 rows=326 width=3,937) (actual rows= loops=)

  • Filter: (NOT (hashed SubPlan 3))
46.          

SubPlan (forSeq Scan)

47. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_desvio_variante uptu_desvio_variante_2 (cost=0.00..29.85 rows=1,985 width=4) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Hash (cost=11.64..11.64 rows=364 width=42) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_sublinea s_2 (cost=0.00..11.64 rows=364 width=42) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Hash (cost=5.06..5.06 rows=165 width=7) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_linea l_2 (cost=0.00..5.06 rows=165 width=7) (actual rows= loops=)

  • Filter: ((desc_linea)::text !~~ 'PRU%'::text)
52. 0.000 0.000 ↓ 0.0

Hash (cost=6.80..6.80 rows=180 width=23) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_destino d1 (cost=0.00..6.80 rows=180 width=23) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Hash (cost=6.80..6.80 rows=180 width=23) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_destino d2 (cost=0.00..6.80 rows=180 width=23) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Hash Join (cost=516.09..1,017.19 rows=598 width=4,028) (actual rows= loops=)

  • Hash Cond: (ev_1.cod_destino = d2_1.cod_destino)
57. 0.000 0.000 ↓ 0.0

Hash Join (cost=507.04..999.92 rows=598 width=4,009) (actual rows= loops=)

  • Hash Cond: (v_3.cod_sublinea = s_3.cod_sublinea)
58. 0.000 0.000 ↓ 0.0

Hash Join (cost=478.72..963.38 rows=598 width=3,968) (actual rows= loops=)

  • Hash Cond: (ev_1.cod_origen = d1_1.cod_destino)
59. 0.000 0.000 ↓ 0.0

Hash Join (cost=469.67..946.11 rows=598 width=3,949) (actual rows= loops=)

  • Hash Cond: (v_3.cod_variante = nm_1.cod_variante_maximal)
60. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_variante v_3 (cost=0.00..460.02 rows=642 width=8) (actual rows= loops=)

  • Filter: (cod_variante < 9000)
61. 0.000 0.000 ↓ 0.0

Hash (cost=462.19..462.19 rows=598 width=3,945) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Hash Join (cost=417.75..462.19 rows=598 width=3,945) (actual rows= loops=)

  • Hash Cond: (ev_1.cod_variante = nm_1.cod_variante)
63. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_extremo_variante ev_1 (cost=0.00..30.97 rows=1,997 width=12) (actual rows= loops=)

64. 0.000 0.000 ↓ 0.0

Hash (cost=410.28..410.28 rows=598 width=3,941) (actual rows= loops=)

65. 0.000 0.000 ↓ 0.0

Hash Join (cost=362.65..410.28 rows=598 width=3,941) (actual rows= loops=)

  • Hash Cond: (dv.cod_variante = nm_1.cod_variante)
66. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_desvio_variante dv (cost=0.00..34.81 rows=1,824 width=4) (actual rows= loops=)

  • Filter: (desvia = 'N'::bpchar)
67. 0.000 0.000 ↓ 0.0

Hash (cost=354.51..354.51 rows=651 width=3,937) (actual rows= loops=)

68. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_variante_no_maximal nm_1 (cost=0.00..354.51 rows=651 width=3,937) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

Hash (cost=6.80..6.80 rows=180 width=23) (actual rows= loops=)

70. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_destino d1_1 (cost=0.00..6.80 rows=180 width=23) (actual rows= loops=)

71. 0.000 0.000 ↓ 0.0

Hash (cost=23.77..23.77 rows=364 width=45) (actual rows= loops=)

72. 0.000 0.000 ↓ 0.0

Hash Join (cost=7.12..23.77 rows=364 width=45) (actual rows= loops=)

  • Hash Cond: (s_3.cod_linea = l_3.cod_linea)
73. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_sublinea s_3 (cost=0.00..11.64 rows=364 width=42) (actual rows= loops=)

74. 0.000 0.000 ↓ 0.0

Hash (cost=5.06..5.06 rows=165 width=7) (actual rows= loops=)

75. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_linea l_3 (cost=0.00..5.06 rows=165 width=7) (actual rows= loops=)

  • Filter: ((desc_linea)::text !~~ 'PRU%'::text)
76. 0.000 0.000 ↓ 0.0

Hash (cost=6.80..6.80 rows=180 width=23) (actual rows= loops=)

77. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_destino d2_1 (cost=0.00..6.80 rows=180 width=23) (actual rows= loops=)

78. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 3 (cost=420.55..940.39 rows=53 width=4,041) (actual rows= loops=)

79. 0.000 0.000 ↓ 0.0

Hash Join (cost=420.55..939.86 rows=53 width=4,041) (actual rows= loops=)

  • Hash Cond: (dv_1.cod_lugar_desvio = ld.codigo)
80. 0.000 0.000 ↓ 0.0

Nested Loop (cost=418.85..937.51 rows=53 width=4,032) (actual rows= loops=)

81. 0.000 0.000 ↓ 0.0

Nested Loop (cost=418.71..928.00 rows=53 width=4,013) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

Nested Loop (cost=418.56..918.49 rows=53 width=3,994) (actual rows= loops=)

83. 0.000 0.000 ↓ 0.0

Hash Join (cost=418.28..898.90 rows=53 width=3,990) (actual rows= loops=)

  • Hash Cond: (v_4.cod_variante = nm_2.cod_variante_maximal)
84. 0.000 0.000 ↓ 0.0

Hash Join (cost=23.32..501.00 rows=642 width=49) (actual rows= loops=)

  • Hash Cond: (s_4.cod_linea = l_4.cod_linea)
85. 0.000 0.000 ↓ 0.0

Hash Join (cost=16.19..485.04 rows=642 width=46) (actual rows= loops=)

  • Hash Cond: (v_4.cod_sublinea = s_4.cod_sublinea)
86. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_variante v_4 (cost=0.00..460.02 rows=642 width=8) (actual rows= loops=)

  • Filter: (cod_variante < 9000)
87. 0.000 0.000 ↓ 0.0

Hash (cost=11.64..11.64 rows=364 width=42) (actual rows= loops=)

88. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_sublinea s_4 (cost=0.00..11.64 rows=364 width=42) (actual rows= loops=)

89. 0.000 0.000 ↓ 0.0

Hash (cost=5.06..5.06 rows=165 width=7) (actual rows= loops=)

90. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_linea l_4 (cost=0.00..5.06 rows=165 width=7) (actual rows= loops=)

  • Filter: ((desc_linea)::text !~~ 'PRU%'::text)
91. 0.000 0.000 ↓ 0.0

Hash (cost=394.31..394.31 rows=53 width=3,945) (actual rows= loops=)

92. 0.000 0.000 ↓ 0.0

Hash Join (cost=36.83..394.31 rows=53 width=3,945) (actual rows= loops=)

  • Hash Cond: (nm_2.cod_variante = dv_1.cod_variante)
93. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_variante_no_maximal nm_2 (cost=0.00..354.51 rows=651 width=3,937) (actual rows= loops=)

94. 0.000 0.000 ↓ 0.0

Hash (cost=34.81..34.81 rows=161 width=8) (actual rows= loops=)

95. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_desvio_variante dv_1 (cost=0.00..34.81 rows=161 width=8) (actual rows= loops=)

  • Filter: (desvia = 'S'::bpchar)
96. 0.000 0.000 ↓ 0.0

Index Scan using uptu_extremo_variante_pkey on uptu_extremo_variante ev_2 (cost=0.28..0.36 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (cod_variante = nm_2.cod_variante)
97. 0.000 0.000 ↓ 0.0

Index Scan using uptu_destino_cod_destino on uptu_destino d1_2 (cost=0.14..0.17 rows=1 width=23) (actual rows= loops=)

  • Index Cond: (cod_destino = ev_2.cod_origen)
98. 0.000 0.000 ↓ 0.0

Index Scan using uptu_destino_cod_destino on uptu_destino d2_2 (cost=0.14..0.17 rows=1 width=23) (actual rows= loops=)

  • Index Cond: (cod_destino = ev_2.cod_destino)
99. 0.000 0.000 ↓ 0.0

Hash (cost=1.31..1.31 rows=31 width=18) (actual rows= loops=)

100. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_lugar_desvio ld (cost=0.00..1.31 rows=31 width=18) (actual rows= loops=)

101. 0.000 0.000 ↓ 0.0

Hash Join (cost=541.87..601.19 rows=321 width=4,925) (actual rows= loops=)

  • Hash Cond: (ev_3.cod_destino = d2_3.cod_destino)
102. 0.000 0.000 ↓ 0.0

Hash Join (cost=532.82..587.73 rows=321 width=4,902) (actual rows= loops=)

  • Hash Cond: (ev_3.cod_origen = d1_3.cod_destino)
103. 0.000 0.000 ↓ 0.0

Hash Join (cost=523.77..574.27 rows=321 width=4,883) (actual rows= loops=)

  • Hash Cond: (s_5.cod_linea = l_5.cod_linea)
104. 0.000 0.000 ↓ 0.0

Hash Join (cost=516.64..562.73 rows=321 width=4,880) (actual rows= loops=)

  • Hash Cond: (v_5.cod_sublinea = s_5.cod_sublinea)
105. 0.000 0.000 ↓ 0.0

Hash Join (cost=500.45..542.12 rows=321 width=4,842) (actual rows= loops=)

  • Hash Cond: (ev_3.cod_variante = v_5.cod_variante)
106. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_extremo_variante ev_3 (cost=0.00..30.97 rows=1,997 width=12) (actual rows= loops=)

107. 0.000 0.000 ↓ 0.0

Hash (cost=496.44..496.44 rows=321 width=4,834) (actual rows= loops=)

108. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_variante v_5 (cost=34.81..496.44 rows=321 width=4,834) (actual rows= loops=)

  • Filter: ((cod_variante < 9000) AND (NOT (hashed SubPlan 2)))
109.          

SubPlan (forSeq Scan)

110. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_desvio_variante uptu_desvio_variante_1 (cost=0.00..29.85 rows=1,985 width=4) (actual rows= loops=)

111. 0.000 0.000 ↓ 0.0

Hash (cost=11.64..11.64 rows=364 width=42) (actual rows= loops=)

112. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_sublinea s_5 (cost=0.00..11.64 rows=364 width=42) (actual rows= loops=)

113. 0.000 0.000 ↓ 0.0

Hash (cost=5.06..5.06 rows=165 width=7) (actual rows= loops=)

114. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_linea l_5 (cost=0.00..5.06 rows=165 width=7) (actual rows= loops=)

  • Filter: ((desc_linea)::text !~~ 'PRU%'::text)
115. 0.000 0.000 ↓ 0.0

Hash (cost=6.80..6.80 rows=180 width=23) (actual rows= loops=)

116. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_destino d1_3 (cost=0.00..6.80 rows=180 width=23) (actual rows= loops=)

117. 0.000 0.000 ↓ 0.0

Hash (cost=6.80..6.80 rows=180 width=23) (actual rows= loops=)

118. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_destino d2_3 (cost=0.00..6.80 rows=180 width=23) (actual rows= loops=)

119. 0.000 0.000 ↓ 0.0

Hash Join (cost=569.40..638.09 rows=590 width=4,925) (actual rows= loops=)

  • Hash Cond: (ev_4.cod_destino = d2_4.cod_destino)
120. 0.000 0.000 ↓ 0.0

Hash Join (cost=560.35..620.93 rows=590 width=4,902) (actual rows= loops=)

  • Hash Cond: (ev_4.cod_origen = d1_4.cod_destino)
121. 0.000 0.000 ↓ 0.0

Hash Join (cost=551.30..603.77 rows=590 width=4,883) (actual rows= loops=)

  • Hash Cond: (v_6.cod_sublinea = s_6.cod_sublinea)
122. 0.000 0.000 ↓ 0.0

Hash Join (cost=522.98..567.34 rows=590 width=4,842) (actual rows= loops=)

  • Hash Cond: (ev_4.cod_variante = v_6.cod_variante)
123. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_extremo_variante ev_4 (cost=0.00..30.97 rows=1,997 width=12) (actual rows= loops=)

124. 0.000 0.000 ↓ 0.0

Hash (cost=515.60..515.60 rows=590 width=4,838) (actual rows= loops=)

125. 0.000 0.000 ↓ 0.0

Hash Join (cost=468.05..515.60 rows=590 width=4,838) (actual rows= loops=)

  • Hash Cond: (dv_2.cod_variante = v_6.cod_variante)
126. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_desvio_variante dv_2 (cost=0.00..34.81 rows=1,824 width=4) (actual rows= loops=)

  • Filter: (desvia = 'N'::bpchar)
127. 0.000 0.000 ↓ 0.0

Hash (cost=460.02..460.02 rows=642 width=4,834) (actual rows= loops=)

128. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_variante v_6 (cost=0.00..460.02 rows=642 width=4,834) (actual rows= loops=)

  • Filter: (cod_variante < 9000)
129. 0.000 0.000 ↓ 0.0

Hash (cost=23.77..23.77 rows=364 width=45) (actual rows= loops=)

130. 0.000 0.000 ↓ 0.0

Hash Join (cost=7.12..23.77 rows=364 width=45) (actual rows= loops=)

  • Hash Cond: (s_6.cod_linea = l_6.cod_linea)
131. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_sublinea s_6 (cost=0.00..11.64 rows=364 width=42) (actual rows= loops=)

132. 0.000 0.000 ↓ 0.0

Hash (cost=5.06..5.06 rows=165 width=7) (actual rows= loops=)

133. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_linea l_6 (cost=0.00..5.06 rows=165 width=7) (actual rows= loops=)

  • Filter: ((desc_linea)::text !~~ 'PRU%'::text)
134. 0.000 0.000 ↓ 0.0

Hash (cost=6.80..6.80 rows=180 width=23) (actual rows= loops=)

135. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_destino d1_4 (cost=0.00..6.80 rows=180 width=23) (actual rows= loops=)

136. 0.000 0.000 ↓ 0.0

Hash (cost=6.80..6.80 rows=180 width=23) (actual rows= loops=)

137. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_destino d2_4 (cost=0.00..6.80 rows=180 width=23) (actual rows= loops=)

138. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 6 (cost=39.38..561.81 rows=52 width=4,938) (actual rows= loops=)

139. 0.000 0.000 ↓ 0.0

Hash Join (cost=39.38..561.29 rows=52 width=4,938) (actual rows= loops=)

  • Hash Cond: (dv_3.cod_lugar_desvio = ld_1.codigo)
140. 0.000 0.000 ↓ 0.0

Nested Loop (cost=37.69..558.96 rows=52 width=4,925) (actual rows= loops=)

141. 0.000 0.000 ↓ 0.0

Nested Loop (cost=37.54..549.62 rows=52 width=4,906) (actual rows= loops=)

142. 0.000 0.000 ↓ 0.0

Nested Loop (cost=37.40..540.29 rows=52 width=4,887) (actual rows= loops=)

143. 0.000 0.000 ↓ 0.0

Nested Loop (cost=37.12..521.03 rows=52 width=4,883) (actual rows= loops=)

144. 0.000 0.000 ↓ 0.0

Nested Loop (cost=36.97..510.50 rows=52 width=4,880) (actual rows= loops=)

145. 0.000 0.000 ↓ 0.0

Hash Join (cost=36.83..499.78 rows=52 width=4,842) (actual rows= loops=)

  • Hash Cond: (v_7.cod_variante = dv_3.cod_variante)
146. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_variante v_7 (cost=0.00..460.02 rows=642 width=4,834) (actual rows= loops=)

  • Filter: (cod_variante < 9000)
147. 0.000 0.000 ↓ 0.0

Hash (cost=34.81..34.81 rows=161 width=8) (actual rows= loops=)

148. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_desvio_variante dv_3 (cost=0.00..34.81 rows=161 width=8) (actual rows= loops=)

  • Filter: (desvia = 'S'::bpchar)
149. 0.000 0.000 ↓ 0.0

Index Scan using uptu_sublinea_pkey on uptu_sublinea s_7 (cost=0.15..0.20 rows=1 width=42) (actual rows= loops=)

  • Index Cond: (cod_sublinea = v_7.cod_sublinea)
150. 0.000 0.000 ↓ 0.0

Index Scan using uptu_linea_pkey on uptu_linea l_7 (cost=0.14..0.19 rows=1 width=7) (actual rows= loops=)

  • Index Cond: (cod_linea = s_7.cod_linea)
  • Filter: ((desc_linea)::text !~~ 'PRU%'::text)
151. 0.000 0.000 ↓ 0.0

Index Scan using uptu_extremo_variante_pkey on uptu_extremo_variante ev_5 (cost=0.28..0.36 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (cod_variante = v_7.cod_variante)
152. 0.000 0.000 ↓ 0.0

Index Scan using uptu_destino_cod_destino on uptu_destino d1_5 (cost=0.14..0.17 rows=1 width=23) (actual rows= loops=)

  • Index Cond: (cod_destino = ev_5.cod_origen)
153. 0.000 0.000 ↓ 0.0

Index Scan using uptu_destino_cod_destino on uptu_destino d2_5 (cost=0.14..0.17 rows=1 width=23) (actual rows= loops=)

  • Index Cond: (cod_destino = ev_5.cod_destino)
154. 0.000 0.000 ↓ 0.0

Hash (cost=1.31..1.31 rows=31 width=18) (actual rows= loops=)

155. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_lugar_desvio ld_1 (cost=0.00..1.31 rows=31 width=18) (actual rows= loops=)

156. 0.000 0.000 ↓ 0.0

Sort (cost=32.55..32.59 rows=16 width=4) (actual rows= loops=)

  • Sort Key: p.cod_variante
157. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on uptu_parada_no_maximal p (cost=2.42..32.23 rows=16 width=4) (actual rows= loops=)

  • Recheck Cond: (cod_ubic_parada = 1376)
158. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on uptu_parada_no_maximal_cod_ubic_parada (cost=0.00..2.41 rows=16 width=0) (actual rows= loops=)

  • Index Cond: (cod_ubic_parada = 1376)
159. 0.000 0.000 ↓ 0.0

Unique (cost=3,208.10..3,208.17 rows=13 width=4) (actual rows= loops=)

160. 0.000 0.000 ↓ 0.0

Sort (cost=3,208.10..3,208.14 rows=13 width=4) (actual rows= loops=)

  • Sort Key: query_1.cod_linea
161. 0.000 0.000 ↓ 0.0

Merge Join (cost=3,190.64..3,207.86 rows=13 width=4) (actual rows= loops=)

  • Merge Cond: (query_1.cod_variante = p_1.cod_variante)
162. 0.000 0.000 ↓ 0.0

Sort (cost=3,158.10..3,160.93 rows=1,134 width=562) (actual rows= loops=)

  • Sort Key: query_1.cod_variante
163. 0.000 0.000 ↓ 0.0

Subquery Scan on query_1 (cost=3,046.70..3,100.56 rows=1,134 width=562) (actual rows= loops=)

164. 0.000 0.000 ↓ 0.0

Unique (cost=3,046.70..3,089.22 rows=1,134 width=562) (actual rows= loops=)

165. 0.000 0.000 ↓ 0.0

Sort (cost=3,046.70..3,049.53 rows=1,134 width=562) (actual rows= loops=)

  • Sort Key: ve.gid, l_8.cod_linea, l_8.desc_linea, s_8.ordinal_sublinea, s_8.cod_sublinea, s_8.desc_sublinea, ve.cod_variante, ve.desc_variante, ve.the_geom, ve.cod_variante_maximal, ev_6.cod_origen, d1_6.desc_destino, ev_6.cod_destino, d2_6.desc_destino
166. 0.000 0.000 ↓ 0.0

Append (cost=923.46..2,989.16 rows=1,134 width=562) (actual rows= loops=)

167. 0.000 0.000 ↓ 0.0

Hash Join (cost=923.46..986.49 rows=378 width=3,752) (actual rows= loops=)

  • Hash Cond: (ev_6.cod_destino = d2_6.cod_destino)
168. 0.000 0.000 ↓ 0.0

Hash Join (cost=914.41..972.24 rows=378 width=3,733) (actual rows= loops=)

  • Hash Cond: (ev_6.cod_origen = d1_6.cod_destino)
169. 0.000 0.000 ↓ 0.0

Hash Join (cost=905.36..957.99 rows=378 width=3,714) (actual rows= loops=)

  • Hash Cond: (v_8.cod_sublinea = s_8.cod_sublinea)
170. 0.000 0.000 ↓ 0.0

Hash Join (cost=877.04..924.47 rows=378 width=3,673) (actual rows= loops=)

  • Hash Cond: (ve.cod_variante_maximal = v_8.cod_variante)
171. 0.000 0.000 ↓ 0.0

Hash Join (cost=408.99..451.23 rows=378 width=3,669) (actual rows= loops=)

  • Hash Cond: (ev_6.cod_variante = ve.cod_variante)
172. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_extremo_variante ev_6 (cost=0.00..30.97 rows=1,997 width=12) (actual rows= loops=)

173. 0.000 0.000 ↓ 0.0

Hash (cost=404.26..404.26 rows=378 width=3,661) (actual rows= loops=)

174. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_variante_especial ve (cost=34.81..404.26 rows=378 width=3,661) (actual rows= loops=)

  • Filter: (NOT (hashed SubPlan 1))
175.          

SubPlan (forSeq Scan)

176. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_desvio_variante (cost=0.00..29.85 rows=1,985 width=4) (actual rows= loops=)

177. 0.000 0.000 ↓ 0.0

Hash (cost=460.02..460.02 rows=642 width=8) (actual rows= loops=)

178. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_variante v_8 (cost=0.00..460.02 rows=642 width=8) (actual rows= loops=)

  • Filter: (cod_variante < 9000)
179. 0.000 0.000 ↓ 0.0

Hash (cost=23.77..23.77 rows=364 width=45) (actual rows= loops=)

180. 0.000 0.000 ↓ 0.0

Hash Join (cost=7.12..23.77 rows=364 width=45) (actual rows= loops=)

  • Hash Cond: (s_8.cod_linea = l_8.cod_linea)
181. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_sublinea s_8 (cost=0.00..11.64 rows=364 width=42) (actual rows= loops=)

182. 0.000 0.000 ↓ 0.0

Hash (cost=5.06..5.06 rows=165 width=7) (actual rows= loops=)

183. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_linea l_8 (cost=0.00..5.06 rows=165 width=7) (actual rows= loops=)

  • Filter: ((desc_linea)::text !~~ 'PRU%'::text)
184. 0.000 0.000 ↓ 0.0

Hash (cost=6.80..6.80 rows=180 width=23) (actual rows= loops=)

185. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_destino d1_6 (cost=0.00..6.80 rows=180 width=23) (actual rows= loops=)

186. 0.000 0.000 ↓ 0.0

Hash (cost=6.80..6.80 rows=180 width=23) (actual rows= loops=)

187. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_destino d2_6 (cost=0.00..6.80 rows=180 width=23) (actual rows= loops=)

188. 0.000 0.000 ↓ 0.0

Hash Join (cost=948.77..1,032.40 rows=695 width=3,752) (actual rows= loops=)

  • Hash Cond: (ev_7.cod_destino = d2_7.cod_destino)
189. 0.000 0.000 ↓ 0.0

Hash Join (cost=939.72..1,013.80 rows=695 width=3,733) (actual rows= loops=)

  • Hash Cond: (ev_7.cod_origen = d1_7.cod_destino)
190. 0.000 0.000 ↓ 0.0

Hash Join (cost=930.67..995.19 rows=695 width=3,714) (actual rows= loops=)

  • Hash Cond: (v_9.cod_sublinea = s_9.cod_sublinea)
191. 0.000 0.000 ↓ 0.0

Hash Join (cost=902.35..957.32 rows=695 width=3,673) (actual rows= loops=)

  • Hash Cond: (ve_1.cod_variante_maximal = v_9.cod_variante)
192. 0.000 0.000 ↓ 0.0

Hash Join (cost=434.30..479.71 rows=695 width=3,669) (actual rows= loops=)

  • Hash Cond: (ev_7.cod_variante = ve_1.cod_variante)
193. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_extremo_variante ev_7 (cost=0.00..30.97 rows=1,997 width=12) (actual rows= loops=)

194. 0.000 0.000 ↓ 0.0

Hash (cost=425.61..425.61 rows=695 width=3,665) (actual rows= loops=)

195. 0.000 0.000 ↓ 0.0

Hash Join (cost=377.01..425.61 rows=695 width=3,665) (actual rows= loops=)

  • Hash Cond: (dv_4.cod_variante = ve_1.cod_variante)
196. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_desvio_variante dv_4 (cost=0.00..34.81 rows=1,824 width=4) (actual rows= loops=)

  • Filter: (desvia = 'N'::bpchar)
197. 0.000 0.000 ↓ 0.0

Hash (cost=367.56..367.56 rows=756 width=3,661) (actual rows= loops=)

198. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_variante_especial ve_1 (cost=0.00..367.56 rows=756 width=3,661) (actual rows= loops=)

199. 0.000 0.000 ↓ 0.0

Hash (cost=460.02..460.02 rows=642 width=8) (actual rows= loops=)

200. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_variante v_9 (cost=0.00..460.02 rows=642 width=8) (actual rows= loops=)

  • Filter: (cod_variante < 9000)
201. 0.000 0.000 ↓ 0.0

Hash (cost=23.77..23.77 rows=364 width=45) (actual rows= loops=)

202. 0.000 0.000 ↓ 0.0

Hash Join (cost=7.12..23.77 rows=364 width=45) (actual rows= loops=)

  • Hash Cond: (s_9.cod_linea = l_9.cod_linea)
203. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_sublinea s_9 (cost=0.00..11.64 rows=364 width=42) (actual rows= loops=)

204. 0.000 0.000 ↓ 0.0

Hash (cost=5.06..5.06 rows=165 width=7) (actual rows= loops=)

205. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_linea l_9 (cost=0.00..5.06 rows=165 width=7) (actual rows= loops=)

  • Filter: ((desc_linea)::text !~~ 'PRU%'::text)
206. 0.000 0.000 ↓ 0.0

Hash (cost=6.80..6.80 rows=180 width=23) (actual rows= loops=)

207. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_destino d1_7 (cost=0.00..6.80 rows=180 width=23) (actual rows= loops=)

208. 0.000 0.000 ↓ 0.0

Hash (cost=6.80..6.80 rows=180 width=23) (actual rows= loops=)

209. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_destino d2_7 (cost=0.00..6.80 rows=180 width=23) (actual rows= loops=)

210. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 3_1 (cost=434.17..959.54 rows=61 width=3,765) (actual rows= loops=)

211. 0.000 0.000 ↓ 0.0

Hash Join (cost=434.17..958.93 rows=61 width=3,765) (actual rows= loops=)

  • Hash Cond: (dv_5.cod_lugar_desvio = ld_2.codigo)
212. 0.000 0.000 ↓ 0.0

Nested Loop (cost=432.47..956.50 rows=61 width=3,756) (actual rows= loops=)

213. 0.000 0.000 ↓ 0.0

Nested Loop (cost=432.33..945.55 rows=61 width=3,737) (actual rows= loops=)

214. 0.000 0.000 ↓ 0.0

Nested Loop (cost=432.18..934.60 rows=61 width=3,718) (actual rows= loops=)

215. 0.000 0.000 ↓ 0.0

Hash Join (cost=431.91..912.61 rows=61 width=3,714) (actual rows= loops=)

  • Hash Cond: (v_10.cod_variante = ve_2.cod_variante_maximal)
216. 0.000 0.000 ↓ 0.0

Hash Join (cost=23.32..501.00 rows=642 width=49) (actual rows= loops=)

  • Hash Cond: (s_10.cod_linea = l_10.cod_linea)
217. 0.000 0.000 ↓ 0.0

Hash Join (cost=16.19..485.04 rows=642 width=46) (actual rows= loops=)

  • Hash Cond: (v_10.cod_sublinea = s_10.cod_sublinea)
218. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_variante v_10 (cost=0.00..460.02 rows=642 width=8) (actual rows= loops=)

  • Filter: (cod_variante < 9000)
219. 0.000 0.000 ↓ 0.0

Hash (cost=11.64..11.64 rows=364 width=42) (actual rows= loops=)

220. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_sublinea s_10 (cost=0.00..11.64 rows=364 width=42) (actual rows= loops=)

221. 0.000 0.000 ↓ 0.0

Hash (cost=5.06..5.06 rows=165 width=7) (actual rows= loops=)

222. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_linea l_10 (cost=0.00..5.06 rows=165 width=7) (actual rows= loops=)

  • Filter: ((desc_linea)::text !~~ 'PRU%'::text)
223. 0.000 0.000 ↓ 0.0

Hash (cost=407.83..407.83 rows=61 width=3,669) (actual rows= loops=)

224. 0.000 0.000 ↓ 0.0

Hash Join (cost=36.83..407.83 rows=61 width=3,669) (actual rows= loops=)

  • Hash Cond: (ve_2.cod_variante = dv_5.cod_variante)
225. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_variante_especial ve_2 (cost=0.00..367.56 rows=756 width=3,661) (actual rows= loops=)

226. 0.000 0.000 ↓ 0.0

Hash (cost=34.81..34.81 rows=161 width=8) (actual rows= loops=)

227. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_desvio_variante dv_5 (cost=0.00..34.81 rows=161 width=8) (actual rows= loops=)

  • Filter: (desvia = 'S'::bpchar)
228. 0.000 0.000 ↓ 0.0

Index Scan using uptu_extremo_variante_pkey on uptu_extremo_variante ev_8 (cost=0.28..0.35 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (cod_variante = ve_2.cod_variante)
229. 0.000 0.000 ↓ 0.0

Index Scan using uptu_destino_cod_destino on uptu_destino d1_8 (cost=0.14..0.17 rows=1 width=23) (actual rows= loops=)

  • Index Cond: (cod_destino = ev_8.cod_origen)
230. 0.000 0.000 ↓ 0.0

Index Scan using uptu_destino_cod_destino on uptu_destino d2_8 (cost=0.14..0.17 rows=1 width=23) (actual rows= loops=)

  • Index Cond: (cod_destino = ev_8.cod_destino)
231. 0.000 0.000 ↓ 0.0

Hash (cost=1.31..1.31 rows=31 width=18) (actual rows= loops=)

232. 0.000 0.000 ↓ 0.0

Seq Scan on uptu_lugar_desvio ld_2 (cost=0.00..1.31 rows=31 width=18) (actual rows= loops=)

233. 0.000 0.000 ↓ 0.0

Sort (cost=32.55..32.59 rows=16 width=4) (actual rows= loops=)

  • Sort Key: p_1.cod_variante
234. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on uptu_parada_no_maximal p_1 (cost=2.42..32.23 rows=16 width=4) (actual rows= loops=)

  • Recheck Cond: (cod_ubic_parada = 1376)
235. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on uptu_parada_no_maximal_cod_ubic_parada (cost=0.00..2.41 rows=16 width=0) (actual rows= loops=)

  • Index Cond: (cod_ubic_parada = 1376)