explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CRH9

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

Append (cost=28,823,497.85..30,608,682.13 rows=29,594,732 width=1,136) (actual rows= loops=)

2.          

CTE prem_level

3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=466,081.83..506,068.10 rows=989,074 width=372) (actual rows= loops=)

  • Hash Cond: (tphr_zsub_1.gis_id = stg_gis_zsub_1.id)
4. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=466,062.49..492,449.00 rows=989,074 width=250) (actual rows= loops=)

  • Hash Cond: (tphr_szone.high_voltage_feeder_id = tphr_hvfdr_1.high_voltage_feeder_id)
5. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=465,882.58..478,714.88 rows=989,074 width=204) (actual rows= loops=)

  • Hash Cond: ((parent_sw_map.switch_name)::text = (tphr_szone.name_sd)::text)
6. 0.000 0.000 ↓ 0.0

Seq Scan on protection_switch_mapping_mvw parent_sw_map (cost=0.00..419.78 rows=20,378 width=52) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Hash (cost=455,903.92..455,903.92 rows=798,293 width=157) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=98,047.04..455,903.92 rows=798,293 width=157) (actual rows= loops=)

  • Hash Cond: (tn_a.gis_id = tphr_sups.gis_id)
9. 0.000 0.000 ↓ 0.0

Gather (cost=1,000.43..352,877.95 rows=538,870 width=58) (actual rows= loops=)

  • Workers Planned: 5
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..297,990.95 rows=107,774 width=58) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on tphr_topology_node tn_a (cost=0.00..177,278.35 rows=107,774 width=50) (actual rows= loops=)

  • Filter: (topology_node_type_id = 4)
12. 0.000 0.000 ↓ 0.0

Index Scan using tphr_topology_node_pk on tphr_topology_node tn_b (cost=0.43..1.11 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (topology_node_id = tn_a.parent_topology_node_id)
  • Filter: (tn_a.topology_node_id <> topology_node_id)
13. 0.000 0.000 ↓ 0.0

Hash (cost=87,067.95..87,067.95 rows=798,293 width=103) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=52,664.63..87,067.95 rows=798,293 width=103) (actual rows= loops=)

  • Hash Cond: (tphr_prem.supply_point_id = tphr_sups.supply_point_id)
15. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_premise tphr_prem (cost=0.00..23,515.93 rows=798,293 width=16) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Hash (cost=45,841.66..45,841.66 rows=545,838 width=95) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=4,345.52..45,841.66 rows=545,838 width=95) (actual rows= loops=)

  • Hash Cond: (tphr_sups.low_voltage_circuit_id = tphr_lvckt.low_voltage_circuit_id)
18. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_supply_point tphr_sups (cost=0.00..34,084.38 rows=545,838 width=20) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Hash (cost=3,919.70..3,919.70 rows=34,066 width=83) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=2,555.04..3,919.70 rows=34,066 width=83) (actual rows= loops=)

  • Hash Cond: (tphr_lvckt.distribution_transformer_id = asgp_dtr.distribution_transformer_id)
21. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_low_voltage_circuit tphr_lvckt (cost=0.00..900.66 rows=34,066 width=36) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Hash (cost=2,375.77..2,375.77 rows=14,342 width=55) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,424.95..2,375.77 rows=14,342 width=55) (actual rows= loops=)

  • Hash Cond: (asgp_dtr.switch_zone_id = tphr_szone.switch_zone_id)
24. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=801.15..1,554.78 rows=14,342 width=41) (actual rows= loops=)

  • Hash Cond: (asgp_dtr.distribution_substation_id = asgp_dsub.distribution_substation_id)
25. 0.000 0.000 ↓ 0.0

Seq Scan on asgp_distribution_transformer asgp_dtr (cost=0.00..556.42 rows=14,342 width=24) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Hash (cost=613.29..613.29 rows=15,029 width=25) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Seq Scan on asgp_distribution_substation asgp_dsub (cost=0.00..613.29 rows=15,029 width=25) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Hash (cost=417.80..417.80 rows=16,480 width=22) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_switch_zone tphr_szone (cost=0.00..417.80 rows=16,480 width=22) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Hash (cost=170.62..170.62 rows=743 width=54) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=85.75..170.62 rows=743 width=54) (actual rows= loops=)

  • Hash Cond: (tphr_hvfdr_stnbus_1.high_voltage_feeder_id = tphr_hvfdr_1.high_voltage_feeder_id)
32. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=56.03..133.06 rows=571 width=49) (actual rows= loops=)

  • Hash Cond: (tphr_hvfdr_stnbus_1.station_busbar_id = asgp_stn_bus_1.station_busbar_id)
33. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_high_voltage_feeder_to_station_busbar tphr_hvfdr_stnbus_1 (cost=0.00..69.18 rows=571 width=16) (actual rows= loops=)

  • Filter: (is_physical_busbar_yn = 'Y'::bpchar)
34. 0.000 0.000 ↓ 0.0

Hash (cost=50.28..50.28 rows=460 width=49) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=27.42..50.28 rows=460 width=49) (actual rows= loops=)

  • Hash Cond: (asgp_stn_bus_1.station_busbar_id = asgp_stnbus_zsub_1.station_busbar_id)
36. 0.000 0.000 ↓ 0.0

Seq Scan on asgp_station_busbar asgp_stn_bus_1 (cost=0.00..16.60 rows=460 width=25) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Hash (cost=24.64..24.64 rows=223 width=32) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=16.89..24.64 rows=223 width=32) (actual rows= loops=)

  • Hash Cond: (asgp_stnbus_zsub_1.zone_substation_id = tphr_zsub_1.zone_substation_id)
39. 0.000 0.000 ↓ 0.0

Seq Scan on asgp_station_busbar_to_zone_substation asgp_stnbus_zsub_1 (cost=0.00..5.23 rows=223 width=16) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Hash (cost=15.84..15.84 rows=84 width=24) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_zone_substation tphr_zsub_1 (cost=0.00..15.84 rows=84 width=24) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Hash (cost=20.43..20.43 rows=743 width=21) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_high_voltage_feeder tphr_hvfdr_1 (cost=0.00..20.43 rows=743 width=21) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Hash (cost=18.29..18.29 rows=84 width=130) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1.29..18.29 rows=84 width=130) (actual rows= loops=)

  • Hash Cond: (stg_gis_zsub_1.terminal_station_id = tphr_tstn_1.gis_id)
46. 0.000 0.000 ↓ 0.0

Seq Scan on zone_substation stg_gis_zsub_1 (cost=0.00..15.84 rows=84 width=8) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Hash (cost=1.13..1.13 rows=13 width=130) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_terminal_station tphr_tstn_1 (cost=0.00..1.13 rows=13 width=130) (actual rows= loops=)

49.          

CTE sups_level

50. 0.000 0.000 ↓ 0.0

Append (cost=0.00..19,784,834.85 rows=28,852,046 width=405) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

CTE Scan on prem_level (cost=0.00..19,781.48 rows=989,074 width=1,354) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=17,310,023.08..19,486,423.65 rows=27,862,972 width=372) (actual rows= loops=)

  • Hash Cond: (stg_gis_zsub_2.terminal_station_id = tphr_tstn_2.gis_id)
53. 0.000 0.000 ↓ 0.0

Merge Anti Join (cost=17,310,021.79..19,103,306.50 rows=27,862,972 width=242) (actual rows= loops=)

  • Merge Cond: (tphr_sups_1.supply_point_id = prem.supply_point_id)
54. 0.000 0.000 ↓ 0.0

Sort (cost=17,191,749.71..17,331,064.57 rows=55,725,945 width=242) (actual rows= loops=)

  • Sort Key: tphr_sups_1.supply_point_id
55. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=3,647,709.87..5,396,402.58 rows=55,725,945 width=242) (actual rows= loops=)

  • Hash Cond: (tphr_szone_1.high_voltage_feeder_id = tphr_hvfdr_2.high_voltage_feeder_id)
56. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=3,647,511.92..4,632,539.81 rows=55,725,945 width=196) (actual rows= loops=)

  • Hash Cond: (tphr_lvckt_1.distribution_transformer_id = asgp_dtr_1.distribution_transformer_id)
57. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=43,234.27..407,251.02 rows=545,838 width=102) (actual rows= loops=)

  • Hash Cond: (tphr_sups_1.low_voltage_circuit_id = tphr_lvckt_1.low_voltage_circuit_id)
58. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=41,907.78..398,512.78 rows=545,838 width=74) (actual rows= loops=)

  • Hash Cond: (tn_a_1.gis_id = tphr_sups_1.gis_id)
59. 0.000 0.000 ↓ 0.0

Gather (cost=1,000.43..352,877.95 rows=538,870 width=58) (actual rows= loops=)

  • Workers Planned: 5
60. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..297,990.95 rows=107,774 width=58) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on tphr_topology_node tn_a_1 (cost=0.00..177,278.35 rows=107,774 width=50) (actual rows= loops=)

  • Filter: (topology_node_type_id = 4)
62. 0.000 0.000 ↓ 0.0

Index Scan using tphr_topology_node_pk on tphr_topology_node tn_b_1 (cost=0.43..1.11 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (topology_node_id = tn_a_1.parent_topology_node_id)
  • Filter: (tn_a_1.topology_node_id <> topology_node_id)
63. 0.000 0.000 ↓ 0.0

Hash (cost=34,084.38..34,084.38 rows=545,838 width=20) (actual rows= loops=)

64. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_supply_point tphr_sups_1 (cost=0.00..34,084.38 rows=545,838 width=20) (actual rows= loops=)

65. 0.000 0.000 ↓ 0.0

Hash (cost=900.66..900.66 rows=34,066 width=36) (actual rows= loops=)

66. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_low_voltage_circuit tphr_lvckt_1 (cost=0.00..900.66 rows=34,066 width=36) (actual rows= loops=)

67. 0.000 0.000 ↓ 0.0

Hash (cost=3,585,975.02..3,585,975.02 rows=1,464,210 width=102) (actual rows= loops=)

68. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=3,567,219.63..3,585,975.02 rows=1,464,210 width=102) (actual rows= loops=)

  • Hash Cond: ((parent_sw_map_1.switch_name)::text = (tphr_szone_1.name_sd)::text)
69. 0.000 0.000 ↓ 0.0

Seq Scan on protection_switch_mapping_mvw parent_sw_map_1 (cost=0.00..419.78 rows=20,378 width=52) (actual rows= loops=)

70. 0.000 0.000 ↓ 0.0

Hash (cost=3,552,447.37..3,552,447.37 rows=1,181,781 width=55) (actual rows= loops=)

71. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.57..3,552,447.37 rows=1,181,781 width=55) (actual rows= loops=)

  • Join Filter: (asgp_dtr_1.switch_zone_id = asgp_dtr_1.switch_zone_id)
72. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.57..6,645.97 rows=14,342 width=41) (actual rows= loops=)

73. 0.000 0.000 ↓ 0.0

Index Scan using asgp_distribution_transformer_pk on asgp_distribution_transformer asgp_dtr_1 (cost=0.29..1,096.09 rows=14,342 width=24) (actual rows= loops=)

74. 0.000 0.000 ↓ 0.0

Index Scan using asgp_distribution_substation_pk on asgp_distribution_substation asgp_dsub_1 (cost=0.29..0.38 rows=1 width=25) (actual rows= loops=)

  • Index Cond: (asgp_dtr_1.distribution_substation_id = distribution_substation_id)
75. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..500.20 rows=16,480 width=22) (actual rows= loops=)

76. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_switch_zone tphr_szone_1 (cost=0.00..417.80 rows=16,480 width=22) (actual rows= loops=)

77. 0.000 0.000 ↓ 0.0

Hash (cost=188.67..188.67 rows=743 width=54) (actual rows= loops=)

78. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=103.79..188.67 rows=743 width=54) (actual rows= loops=)

  • Hash Cond: (tphr_hvfdr_stnbus_2.high_voltage_feeder_id = tphr_hvfdr_2.high_voltage_feeder_id)
79. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=74.07..151.10 rows=571 width=49) (actual rows= loops=)

  • Hash Cond: (tphr_hvfdr_stnbus_2.station_busbar_id = asgp_stn_bus_2.station_busbar_id)
80. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_high_voltage_feeder_to_station_busbar tphr_hvfdr_stnbus_2 (cost=0.00..69.18 rows=571 width=16) (actual rows= loops=)

  • Filter: (is_physical_busbar_yn = 'Y'::bpchar)
81. 0.000 0.000 ↓ 0.0

Hash (cost=68.32..68.32 rows=460 width=49) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=45.47..68.32 rows=460 width=49) (actual rows= loops=)

  • Hash Cond: (asgp_stn_bus_2.station_busbar_id = asgp_stnbus_zsub_2.station_busbar_id)
83. 0.000 0.000 ↓ 0.0

Seq Scan on asgp_station_busbar asgp_stn_bus_2 (cost=0.00..16.60 rows=460 width=25) (actual rows= loops=)

84. 0.000 0.000 ↓ 0.0

Hash (cost=42.68..42.68 rows=223 width=32) (actual rows= loops=)

85. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=34.94..42.68 rows=223 width=32) (actual rows= loops=)

  • Hash Cond: (asgp_stnbus_zsub_2.zone_substation_id = tphr_zsub_2.zone_substation_id)
86. 0.000 0.000 ↓ 0.0

Seq Scan on asgp_station_busbar_to_zone_substation asgp_stnbus_zsub_2 (cost=0.00..5.23 rows=223 width=16) (actual rows= loops=)

87. 0.000 0.000 ↓ 0.0

Hash (cost=33.89..33.89 rows=84 width=24) (actual rows= loops=)

88. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=16.89..33.89 rows=84 width=24) (actual rows= loops=)

  • Hash Cond: (tphr_zsub_2.gis_id = stg_gis_zsub_2.id)
89. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_zone_substation tphr_zsub_2 (cost=0.00..15.84 rows=84 width=24) (actual rows= loops=)

90. 0.000 0.000 ↓ 0.0

Hash (cost=15.84..15.84 rows=84 width=8) (actual rows= loops=)

91. 0.000 0.000 ↓ 0.0

Seq Scan on zone_substation stg_gis_zsub_2 (cost=0.00..15.84 rows=84 width=8) (actual rows= loops=)

92. 0.000 0.000 ↓ 0.0

Hash (cost=20.43..20.43 rows=743 width=21) (actual rows= loops=)

93. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_high_voltage_feeder tphr_hvfdr_2 (cost=0.00..20.43 rows=743 width=21) (actual rows= loops=)

94. 0.000 0.000 ↓ 0.0

Sort (cost=118,272.08..120,744.76 rows=989,074 width=8) (actual rows= loops=)

  • Sort Key: prem.supply_point_id
95. 0.000 0.000 ↓ 0.0

CTE Scan on prem_level prem (cost=0.00..19,781.48 rows=989,074 width=8) (actual rows= loops=)

96. 0.000 0.000 ↓ 0.0

Hash (cost=1.13..1.13 rows=13 width=130) (actual rows= loops=)

97. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_terminal_station tphr_tstn_2 (cost=0.00..1.13 rows=13 width=130) (actual rows= loops=)

98.          

CTE dtrans_level

99. 0.000 0.000 ↓ 0.0

Append (cost=0.00..6,724,378.82 rows=29,584,151 width=1,331) (actual rows= loops=)

100. 0.000 0.000 ↓ 0.0

CTE Scan on sups_level (cost=0.00..577,040.92 rows=28,852,046 width=1,354) (actual rows= loops=)

101. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=4,618,035.12..6,140,016.85 rows=732,105 width=394) (actual rows= loops=)

  • Hash Cond: (asgp_stn_bus_3.station_busbar_id = asgp_stnbus_zsub_3.station_busbar_id)
102. 0.000 0.000 ↓ 0.0

Hash Anti Join (cost=4,617,987.20..6,130,013.89 rows=732,105 width=132) (actual rows= loops=)

  • Hash Cond: (asgp_dtr_2.distribution_transformer_id = supl.distribution_transformer_id)
103. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=3,567,591.70..3,586,347.10 rows=1,464,210 width=132) (actual rows= loops=)

  • Hash Cond: ((parent_sw_map_2.switch_name)::text = (tphr_szone_2.name_sd)::text)
104. 0.000 0.000 ↓ 0.0

Seq Scan on protection_switch_mapping_mvw parent_sw_map_2 (cost=0.00..419.78 rows=20,378 width=52) (actual rows= loops=)

105. 0.000 0.000 ↓ 0.0

Hash (cost=3,552,819.44..3,552,819.44 rows=1,181,781 width=85) (actual rows= loops=)

106. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=146.80..3,552,819.44 rows=1,181,781 width=85) (actual rows= loops=)

  • Join Filter: (asgp_dtr_2.switch_zone_id = asgp_dtr_2.switch_zone_id)
107. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.57..6,645.97 rows=14,342 width=41) (actual rows= loops=)

108. 0.000 0.000 ↓ 0.0

Index Scan using asgp_distribution_transformer_pk on asgp_distribution_transformer asgp_dtr_2 (cost=0.29..1,096.09 rows=14,342 width=24) (actual rows= loops=)

109. 0.000 0.000 ↓ 0.0

Index Scan using asgp_distribution_substation_pk on asgp_distribution_substation asgp_dsub_2 (cost=0.29..0.38 rows=1 width=25) (actual rows= loops=)

  • Index Cond: (asgp_dtr_2.distribution_substation_id = distribution_substation_id)
110. 0.000 0.000 ↓ 0.0

Materialize (cost=146.23..872.27 rows=16,480 width=52) (actual rows= loops=)

111. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=146.23..789.87 rows=16,480 width=52) (actual rows= loops=)

  • Hash Cond: (tphr_szone_2.high_voltage_feeder_id = tphr_hvfdr_3.high_voltage_feeder_id)
112. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_switch_zone tphr_szone_2 (cost=0.00..417.80 rows=16,480 width=22) (actual rows= loops=)

113. 0.000 0.000 ↓ 0.0

Hash (cost=136.94..136.94 rows=743 width=38) (actual rows= loops=)

114. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=52.07..136.94 rows=743 width=38) (actual rows= loops=)

  • Hash Cond: (tphr_hvfdr_stnbus_3.high_voltage_feeder_id = tphr_hvfdr_3.high_voltage_feeder_id)
115. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=22.35..99.38 rows=571 width=33) (actual rows= loops=)

  • Hash Cond: (tphr_hvfdr_stnbus_3.station_busbar_id = asgp_stn_bus_3.station_busbar_id)
116. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_high_voltage_feeder_to_station_busbar tphr_hvfdr_stnbus_3 (cost=0.00..69.18 rows=571 width=16) (actual rows= loops=)

  • Filter: (is_physical_busbar_yn = 'Y'::bpchar)
117. 0.000 0.000 ↓ 0.0

Hash (cost=16.60..16.60 rows=460 width=25) (actual rows= loops=)

118. 0.000 0.000 ↓ 0.0

Seq Scan on asgp_station_busbar asgp_stn_bus_3 (cost=0.00..16.60 rows=460 width=25) (actual rows= loops=)

119. 0.000 0.000 ↓ 0.0

Hash (cost=20.43..20.43 rows=743 width=21) (actual rows= loops=)

120. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_high_voltage_feeder tphr_hvfdr_3 (cost=0.00..20.43 rows=743 width=21) (actual rows= loops=)

121. 0.000 0.000 ↓ 0.0

Hash (cost=577,040.92..577,040.92 rows=28,852,046 width=8) (actual rows= loops=)

122. 0.000 0.000 ↓ 0.0

CTE Scan on sups_level supl (cost=0.00..577,040.92 rows=28,852,046 width=8) (actual rows= loops=)

123. 0.000 0.000 ↓ 0.0

Hash (cost=45.13..45.13 rows=223 width=154) (actual rows= loops=)

124. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=37.38..45.13 rows=223 width=154) (actual rows= loops=)

  • Hash Cond: (asgp_stnbus_zsub_3.zone_substation_id = tphr_zsub_3.zone_substation_id)
125. 0.000 0.000 ↓ 0.0

Seq Scan on asgp_station_busbar_to_zone_substation asgp_stnbus_zsub_3 (cost=0.00..5.23 rows=223 width=16) (actual rows= loops=)

126. 0.000 0.000 ↓ 0.0

Hash (cost=36.33..36.33 rows=84 width=146) (actual rows= loops=)

127. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=18.18..36.33 rows=84 width=146) (actual rows= loops=)

  • Hash Cond: (stg_gis_zsub_3.terminal_station_id = tphr_tstn_3.gis_id)
128. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=16.89..33.89 rows=84 width=24) (actual rows= loops=)

  • Hash Cond: (tphr_zsub_3.gis_id = stg_gis_zsub_3.id)
129. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_zone_substation tphr_zsub_3 (cost=0.00..15.84 rows=84 width=24) (actual rows= loops=)

130. 0.000 0.000 ↓ 0.0

Hash (cost=15.84..15.84 rows=84 width=8) (actual rows= loops=)

131. 0.000 0.000 ↓ 0.0

Seq Scan on zone_substation stg_gis_zsub_3 (cost=0.00..15.84 rows=84 width=8) (actual rows= loops=)

132. 0.000 0.000 ↓ 0.0

Hash (cost=1.13..1.13 rows=13 width=130) (actual rows= loops=)

133. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_terminal_station tphr_tstn_3 (cost=0.00..1.13 rows=13 width=130) (actual rows= loops=)

134.          

CTE szone_level

135. 0.000 0.000 ↓ 0.0

Append (cost=0.00..1,808,216.08 rows=29,594,360 width=1,222) (actual rows= loops=)

136. 0.000 0.000 ↓ 0.0

CTE Scan on dtrans_level (cost=0.00..591,683.02 rows=29,584,151 width=1,222) (actual rows= loops=)

137. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,078,097.80..1,216,430.97 rows=10,209 width=409) (actual rows= loops=)

  • Hash Cond: (tphr_zsub_4.gis_id = stg_gis_zsub_4.id)
138. 0.000 0.000 ↓ 0.0

Hash Anti Join (cost=1,078,078.46..1,216,271.26 rows=10,209 width=115) (actual rows= loops=)

  • Hash Cond: (tphr_szone_3.switch_zone_id = dtrans.switch_zone_id)
139. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=1,029.55..1,755.40 rows=20,418 width=115) (actual rows= loops=)

  • Hash Cond: ((parent_sw_map_3.switch_name)::text = (tphr_szone_3.name_sd)::text)
140. 0.000 0.000 ↓ 0.0

Seq Scan on protection_switch_mapping_mvw parent_sw_map_3 (cost=0.00..419.78 rows=20,378 width=52) (actual rows= loops=)

141. 0.000 0.000 ↓ 0.0

Hash (cost=823.55..823.55 rows=16,480 width=68) (actual rows= loops=)

142. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=179.91..823.55 rows=16,480 width=68) (actual rows= loops=)

  • Hash Cond: (tphr_szone_3.high_voltage_feeder_id = tphr_hvfdr_4.high_voltage_feeder_id)
143. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_switch_zone tphr_szone_3 (cost=0.00..417.80 rows=16,480 width=22) (actual rows= loops=)

144. 0.000 0.000 ↓ 0.0

Hash (cost=170.62..170.62 rows=743 width=54) (actual rows= loops=)

145. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=85.75..170.62 rows=743 width=54) (actual rows= loops=)

  • Hash Cond: (tphr_hvfdr_stnbus_4.high_voltage_feeder_id = tphr_hvfdr_4.high_voltage_feeder_id)
146. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=56.03..133.06 rows=571 width=49) (actual rows= loops=)

  • Hash Cond: (tphr_hvfdr_stnbus_4.station_busbar_id = asgp_stn_bus_4.station_busbar_id)
147. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_high_voltage_feeder_to_station_busbar tphr_hvfdr_stnbus_4 (cost=0.00..69.18 rows=571 width=16) (actual rows= loops=)

  • Filter: (is_physical_busbar_yn = 'Y'::bpchar)
148. 0.000 0.000 ↓ 0.0

Hash (cost=50.28..50.28 rows=460 width=49) (actual rows= loops=)

149. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=27.42..50.28 rows=460 width=49) (actual rows= loops=)

  • Hash Cond: (asgp_stn_bus_4.station_busbar_id = asgp_stnbus_zsub_4.station_busbar_id)
150. 0.000 0.000 ↓ 0.0

Seq Scan on asgp_station_busbar asgp_stn_bus_4 (cost=0.00..16.60 rows=460 width=25) (actual rows= loops=)

151. 0.000 0.000 ↓ 0.0

Hash (cost=24.64..24.64 rows=223 width=32) (actual rows= loops=)

152. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=16.89..24.64 rows=223 width=32) (actual rows= loops=)

  • Hash Cond: (asgp_stnbus_zsub_4.zone_substation_id = tphr_zsub_4.zone_substation_id)
153. 0.000 0.000 ↓ 0.0

Seq Scan on asgp_station_busbar_to_zone_substation asgp_stnbus_zsub_4 (cost=0.00..5.23 rows=223 width=16) (actual rows= loops=)

154. 0.000 0.000 ↓ 0.0

Hash (cost=15.84..15.84 rows=84 width=24) (actual rows= loops=)

155. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_zone_substation tphr_zsub_4 (cost=0.00..15.84 rows=84 width=24) (actual rows= loops=)

156. 0.000 0.000 ↓ 0.0

Hash (cost=20.43..20.43 rows=743 width=21) (actual rows= loops=)

157. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_high_voltage_feeder tphr_hvfdr_4 (cost=0.00..20.43 rows=743 width=21) (actual rows= loops=)

158. 0.000 0.000 ↓ 0.0

Hash (cost=591,683.02..591,683.02 rows=29,584,151 width=8) (actual rows= loops=)

159. 0.000 0.000 ↓ 0.0

CTE Scan on dtrans_level dtrans (cost=0.00..591,683.02 rows=29,584,151 width=8) (actual rows= loops=)

160. 0.000 0.000 ↓ 0.0

Hash (cost=18.29..18.29 rows=84 width=130) (actual rows= loops=)

161. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1.29..18.29 rows=84 width=130) (actual rows= loops=)

  • Hash Cond: (stg_gis_zsub_4.terminal_station_id = tphr_tstn_4.gis_id)
162. 0.000 0.000 ↓ 0.0

Seq Scan on zone_substation stg_gis_zsub_4 (cost=0.00..15.84 rows=84 width=8) (actual rows= loops=)

163. 0.000 0.000 ↓ 0.0

Hash (cost=1.13..1.13 rows=13 width=130) (actual rows= loops=)

164. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_terminal_station tphr_tstn_4 (cost=0.00..1.13 rows=13 width=130) (actual rows= loops=)

165. 0.000 0.000 ↓ 0.0

CTE Scan on szone_level (cost=0.00..591,887.20 rows=29,594,360 width=1,136) (actual rows= loops=)

166. 0.000 0.000 ↓ 0.0

Hash Anti Join (cost=1,077,519.68..1,193,293.35 rows=372 width=492) (actual rows= loops=)

  • Hash Cond: (tphr_hvfdr.high_voltage_feeder_id = szlevel.high_voltage_feeder_id)
167. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=99.98..192.63 rows=743 width=176) (actual rows= loops=)

  • Hash Cond: (tphr_hvfdr_stnbus.high_voltage_feeder_id = tphr_hvfdr.high_voltage_feeder_id)
168. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=70.27..155.06 rows=571 width=171) (actual rows= loops=)

  • Hash Cond: (asgp_stn_bus.station_busbar_id = asgp_stnbus_zsub.station_busbar_id)
169. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=22.35..99.38 rows=571 width=33) (actual rows= loops=)

  • Hash Cond: (tphr_hvfdr_stnbus.station_busbar_id = asgp_stn_bus.station_busbar_id)
170. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_high_voltage_feeder_to_station_busbar tphr_hvfdr_stnbus (cost=0.00..69.18 rows=571 width=16) (actual rows= loops=)

  • Filter: (is_physical_busbar_yn = 'Y'::bpchar)
171. 0.000 0.000 ↓ 0.0

Hash (cost=16.60..16.60 rows=460 width=25) (actual rows= loops=)

172. 0.000 0.000 ↓ 0.0

Seq Scan on asgp_station_busbar asgp_stn_bus (cost=0.00..16.60 rows=460 width=25) (actual rows= loops=)

173. 0.000 0.000 ↓ 0.0

Hash (cost=45.13..45.13 rows=223 width=154) (actual rows= loops=)

174. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=37.38..45.13 rows=223 width=154) (actual rows= loops=)

  • Hash Cond: (asgp_stnbus_zsub.zone_substation_id = tphr_zsub.zone_substation_id)
175. 0.000 0.000 ↓ 0.0

Seq Scan on asgp_station_busbar_to_zone_substation asgp_stnbus_zsub (cost=0.00..5.23 rows=223 width=16) (actual rows= loops=)

176. 0.000 0.000 ↓ 0.0

Hash (cost=36.33..36.33 rows=84 width=146) (actual rows= loops=)

177. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=18.18..36.33 rows=84 width=146) (actual rows= loops=)

  • Hash Cond: (stg_gis_zsub.terminal_station_id = tphr_tstn.gis_id)
178. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=16.89..33.89 rows=84 width=24) (actual rows= loops=)

  • Hash Cond: (tphr_zsub.gis_id = stg_gis_zsub.id)
179. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_zone_substation tphr_zsub (cost=0.00..15.84 rows=84 width=24) (actual rows= loops=)

180. 0.000 0.000 ↓ 0.0

Hash (cost=15.84..15.84 rows=84 width=8) (actual rows= loops=)

181. 0.000 0.000 ↓ 0.0

Seq Scan on zone_substation stg_gis_zsub (cost=0.00..15.84 rows=84 width=8) (actual rows= loops=)

182. 0.000 0.000 ↓ 0.0

Hash (cost=1.13..1.13 rows=13 width=130) (actual rows= loops=)

183. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_terminal_station tphr_tstn (cost=0.00..1.13 rows=13 width=130) (actual rows= loops=)

184. 0.000 0.000 ↓ 0.0

Hash (cost=20.43..20.43 rows=743 width=21) (actual rows= loops=)

185. 0.000 0.000 ↓ 0.0

Seq Scan on tphr_high_voltage_feeder tphr_hvfdr (cost=0.00..20.43 rows=743 width=21) (actual rows= loops=)

186. 0.000 0.000 ↓ 0.0

Hash (cost=591,887.20..591,887.20 rows=29,594,360 width=8) (actual rows= loops=)

187. 0.000 0.000 ↓ 0.0

CTE Scan on szone_level szlevel (cost=0.00..591,887.20 rows=29,594,360 width=8) (actual rows= loops=)