explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eluC

Settings

Optimization(s) for this plan:

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

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

2. 0.000 0.000 ↓ 0.0

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

  • Sort Key: query.cod_linea
3. 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.cod_variante = p.cod_variante)
4. 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.cod_variante
5. 0.000 0.000 ↓ 0.0

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

6. 0.000 0.000 ↓ 0.0

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

7. 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.cod_linea, l.desc_linea, s.ordinal_sublinea, s.cod_sublinea, s.desc_sublinea, ve.cod_variante, ve.desc_variante, ve.the_geom, ve.cod_variante_maximal, ev.cod_origen, d1.desc_destino, ev.cod_destino, d2.desc_destino
8. 0.000 0.000 ↓ 0.0

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

9. 0.000 0.000 ↓ 0.0

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

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

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

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

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

  • Hash Cond: (v.cod_sublinea = s.cod_sublinea)
12. 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.cod_variante)
13. 0.000 0.000 ↓ 0.0

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

  • Hash Cond: (ev.cod_variante = ve.cod_variante)
14. 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=)

15. 0.000 0.000 ↓ 0.0

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

16. 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))
17.          

SubPlan (forSeq Scan)

18. 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=)

19. 0.000 0.000 ↓ 0.0

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

20. 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)
21. 0.000 0.000 ↓ 0.0

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

22. 0.000 0.000 ↓ 0.0

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

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

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

24. 0.000 0.000 ↓ 0.0

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

25. 0.000 0.000 ↓ 0.0

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

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

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

27. 0.000 0.000 ↓ 0.0

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

28. 0.000 0.000 ↓ 0.0

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

29. 0.000 0.000 ↓ 0.0

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

30. 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_1.cod_destino = d2_1.cod_destino)
31. 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_1.cod_origen = d1_1.cod_destino)
32. 0.000 0.000 ↓ 0.0

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

  • Hash Cond: (v_1.cod_sublinea = s_1.cod_sublinea)
33. 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_1.cod_variante)
34. 0.000 0.000 ↓ 0.0

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

  • Hash Cond: (ev_1.cod_variante = ve_1.cod_variante)
35. 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=)

36. 0.000 0.000 ↓ 0.0

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

37. 0.000 0.000 ↓ 0.0

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

  • Hash Cond: (dv.cod_variante = ve_1.cod_variante)
38. 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)
39. 0.000 0.000 ↓ 0.0

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

40. 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=)

41. 0.000 0.000 ↓ 0.0

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

42. 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)
43. 0.000 0.000 ↓ 0.0

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

44. 0.000 0.000 ↓ 0.0

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

  • Hash Cond: (s_1.cod_linea = l_1.cod_linea)
45. 0.000 0.000 ↓ 0.0

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

46. 0.000 0.000 ↓ 0.0

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

47. 0.000 0.000 ↓ 0.0

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

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

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

49. 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=)

50. 0.000 0.000 ↓ 0.0

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

51. 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=)

52. 0.000 0.000 ↓ 0.0

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

53. 0.000 0.000 ↓ 0.0

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

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

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

55. 0.000 0.000 ↓ 0.0

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

56. 0.000 0.000 ↓ 0.0

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

57. 0.000 0.000 ↓ 0.0

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

  • Hash Cond: (v_2.cod_variante = ve_2.cod_variante_maximal)
58. 0.000 0.000 ↓ 0.0

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

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

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

  • Hash Cond: (v_2.cod_sublinea = s_2.cod_sublinea)
60. 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)
61. 0.000 0.000 ↓ 0.0

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

62. 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=)

63. 0.000 0.000 ↓ 0.0

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

64. 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)
65. 0.000 0.000 ↓ 0.0

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

66. 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_1.cod_variante)
67. 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=)

68. 0.000 0.000 ↓ 0.0

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

69. 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)
70. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (cod_variante = ve_2.cod_variante)
71. 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)
72. 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)
73. 0.000 0.000 ↓ 0.0

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

74. 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=)

75. 0.000 0.000 ↓ 0.0

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

  • Sort Key: p.cod_variante
76. 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)
77. 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=)