explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2tfy

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

Hash Left Join (cost=1,698,082.35..14,941,155.62 rows=149,361,249 width=398) (actual rows= loops=)

  • Hash Cond: (charge_lvn_p62_s.hk_h_charge = tagnr.ereignis_charge_bb_hk_h_charge)
2. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,356,422.29..12,167,825.54 rows=149,361,249 width=318) (actual rows= loops=)

  • Hash Cond: (charge_lvn_p62_s.hk_h_charge = vakanlage.hk_h_charge)
3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,003,353.74..11,422,668.87 rows=149,361,249 width=286) (actual rows= loops=)

  • Hash Cond: (charge_lvn_p62_s.hk_h_charge = y.hk_h_charge)
4. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=778,038.28..3,163,662.58 rows=149,361,249 width=273) (actual rows= loops=)

  • Merge Cond: (charge_bestellung_l.hk_h_bestellung = bestellung_lvn_p62_s.hk_h_bestellung)
5. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=728,159.72..728,929.99 rows=150,005 width=293) (actual rows= loops=)

  • Merge Cond: (charge_bestellung_l.hk_h_bestellung = bestellung_bestellungkv_lvn_p62_ms.hk_h_bestellung)
6. 0.000 0.000 ↓ 0.0

Sort (cost=49,778.88..50,153.90 rows=150,005 width=101) (actual rows= loops=)

  • Sort Key: charge_bestellung_l.hk_h_bestellung
7. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=15,258.24..28,678.47 rows=150,005 width=101) (actual rows= loops=)

  • Hash Cond: (charge_bestellung_l.hk_h_charge = charge_lvn_p62_s.hk_h_charge)
8. 0.000 0.000 ↓ 0.0

Seq Scan on charge_bestellung_l (cost=0.00..5,686.22 rows=165,322 width=82) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Hash (cost=12,896.56..12,896.56 rows=101,574 width=60) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Hash Join (cost=4,583.38..12,896.56 rows=101,574 width=60) (actual rows= loops=)

  • Hash Cond: ((charge_lvn_p62_s.hk_h_charge = charge_lvn_p62_bp.hk_h_charge) AND (charge_lvn_p62_s.dss_load_date = charge_lvn_p62_bp.dss_load_date))
11. 0.000 0.000 ↓ 0.0

Seq Scan on charge_lvn_p62_s (cost=0.00..4,326.46 rows=111,946 width=60) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash (cost=2,065.55..2,065.55 rows=101,655 width=49) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Seq Scan on charge_lvn_p62_bp (cost=0.00..2,065.55 rows=101,655 width=49) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Finalize GroupAggregate (cost=678,380.84..678,396.57 rows=112 width=521) (actual rows= loops=)

  • Group Key: bestellung_bestellungkv_lvn_p62_ms.hk_h_bestellung
15. 0.000 0.000 ↓ 0.0

Gather Merge (cost=678,380.84..678,393.81 rows=94 width=233) (actual rows= loops=)

  • Workers Planned: 2
16. 0.000 0.000 ↓ 0.0

Partial GroupAggregate (cost=677,380.82..677,382.93 rows=47 width=233) (actual rows= loops=)

  • Group Key: bestellung_bestellungkv_lvn_p62_ms.hk_h_bestellung
17. 0.000 0.000 ↓ 0.0

Sort (cost=677,380.82..677,380.93 rows=47 width=59) (actual rows= loops=)

  • Sort Key: bestellung_bestellungkv_lvn_p62_ms.hk_h_bestellung
18. 0.000 0.000 ↓ 0.0

Hash Join (cost=301,750.16..677,379.51 rows=47 width=59) (actual rows= loops=)

  • Hash Cond: ((bestellung_bestellungkv_lvn_p62_ms.hk_h_bestellung = bestellungkv_lvn_p62_bp.hk_h_bestellung) AND (bestellung_bestellungkv_lvn_p62_ms.valueid = bestellungkv_lvn_p62_bp.valueid) AND (bestellung_bestellungkv_lvn_p62_ms.dss_load_date = bestellungkv_lvn_p62_bp.dss_load_date))
19. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on bestellung_bestellungkv_lvn_p62_ms (cost=0.00..225,455.85 rows=2,654,285 width=73) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Hash (cost=128,991.15..128,991.15 rows=6,336,115 width=55) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Seq Scan on bestellungkv_lvn_p62_bp (cost=0.00..128,991.15 rows=6,336,115 width=55) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Materialize (cost=49,878.55..214,022.29 rows=8,038,605 width=62) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=49,878.55..193,925.78 rows=8,038,605 width=62) (actual rows= loops=)

  • Merge Cond: (bestellung_lvn_p62_s.hk_h_bestellung = bestellung_sequenz_l.hk_h_bestellung)
24. 0.000 0.000 ↓ 0.0

Merge Join (cost=1.08..22,460.63 rows=120,742 width=58) (actual rows= loops=)

  • Merge Cond: (bestellung_lvn_p62_bp.hk_h_bestellung = bestellung_lvn_p62_s.hk_h_bestellung)
  • Join Filter: (bestellung_lvn_p62_bp.dss_load_date = bestellung_lvn_p62_s.dss_load_date)
25. 0.000 0.000 ↓ 0.0

Index Scan using bestellung_lvn_p62_bp_unique on bestellung_lvn_p62_bp (cost=0.42..6,397.23 rows=108,794 width=49) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Index Scan using bestellung_lvn_p62_s_hk on bestellung_lvn_p62_s (cost=0.42..13,788.52 rows=133,547 width=66) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Materialize (cost=49,876.30..51,292.13 rows=283,167 width=45) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Sort (cost=49,876.30..50,584.21 rows=283,167 width=45) (actual rows= loops=)

  • Sort Key: bestellung_sequenz_l.hk_h_bestellung
29. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=5,040.04..15,522.19 rows=283,167 width=45) (actual rows= loops=)

  • Hash Cond: (bestellung_sequenz_l.hk_h_sequenz = sequenz_lvn_p62_bb.hk_h_sequenz)
30. 0.000 0.000 ↓ 0.0

Seq Scan on bestellung_sequenz_l (cost=0.00..9,738.67 rows=283,167 width=82) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Hash (cost=4,796.13..4,796.13 rows=19,513 width=45) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Seq Scan on sequenz_lvn_p62_bb (cost=0.00..4,796.13 rows=19,513 width=45) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Hash (cost=225,310.28..225,310.28 rows=414 width=54) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Subquery Scan on y (cost=222,620.71..225,310.28 rows=414 width=54) (actual rows= loops=)

  • Filter: (y.rank = 1)
35. 0.000 0.000 ↓ 0.0

WindowAgg (cost=222,620.71..224,275.83 rows=82,756 width=70) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Sort (cost=222,620.71..222,827.60 rows=82,756 width=62) (actual rows= loops=)

  • Sort Key: x.hk_h_charge, x.c
37. 0.000 0.000 ↓ 0.0

Subquery Scan on x (cost=201,410.09..212,749.46 rows=82,756 width=62) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Finalize GroupAggregate (cost=201,410.09..211,921.90 rows=82,756 width=62) (actual rows= loops=)

  • Group Key: gefaess_charge_bb.hk_h_charge, gefaessreise_lvn_p62_s.gefreise, gefaessumlauf_lvn_p62_s.gefumlnr, gefaess_lvn_p62_s.gefnr
39. 0.000 0.000 ↓ 0.0

Gather Merge (cost=201,410.09..210,232.29 rows=68,964 width=62) (actual rows= loops=)

  • Workers Planned: 2
40. 0.000 0.000 ↓ 0.0

Partial GroupAggregate (cost=200,410.06..201,272.11 rows=34,482 width=62) (actual rows= loops=)

  • Group Key: gefaess_charge_bb.hk_h_charge, gefaessreise_lvn_p62_s.gefreise, gefaessumlauf_lvn_p62_s.gefumlnr, gefaess_lvn_p62_s.gefnr
41. 0.000 0.000 ↓ 0.0

Sort (cost=200,410.06..200,496.27 rows=34,482 width=54) (actual rows= loops=)

  • Sort Key: gefaess_charge_bb.hk_h_charge, gefaessreise_lvn_p62_s.gefreise, gefaessumlauf_lvn_p62_s.gefumlnr, gefaess_lvn_p62_s.gefnr
42. 0.000 0.000 ↓ 0.0

Hash Join (cost=57,115.84..197,811.23 rows=34,482 width=54) (actual rows= loops=)

  • Hash Cond: (gefaess_charge_bb.hk_h_gefaess = gefaess_lvn_p62_s.hk_h_gefaess)
43. 0.000 0.000 ↓ 0.0

Hash Join (cost=57,100.96..197,301.91 rows=39,900 width=90) (actual rows= loops=)

  • Hash Cond: ((gefaessumlauf_lvn_p62_bp.hk_h_gefaessumlauf = gefaessumlauf_lvn_p62_s.hk_h_gefaessumlauf) AND (gefaessumlauf_lvn_p62_bp.dss_load_date = gefaessumlauf_lvn_p62_s.dss_load_date))
44. 0.000 0.000 ↓ 0.0

Hash Join (cost=46,919.11..182,918.66 rows=39,922 width=176) (actual rows= loops=)

  • Hash Cond: (gefaess_charge_bb.hk_h_gefaessumlauf = gefaessumlauf_lvn_p62_bp.hk_h_gefaessumlauf)
45. 0.000 0.000 ↓ 0.0

Nested Loop (cost=40,177.65..173,044.41 rows=39,922 width=127) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Hash Join (cost=40,177.10..143,270.41 rows=39,960 width=217) (actual rows= loops=)

  • Hash Cond: (stationzustand_lvn_p62_bp.hk_h_stationzustand = gefaess_charge_bb.hk_h_stationzustand)
47. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on stationzustand_lvn_p62_bp (cost=0.00..60,149.15 rows=1,730,815 width=49) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Hash (cost=36,730.30..36,730.30 rows=95,904 width=168) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Hash Join (cost=159.50..36,730.30 rows=95,904 width=168) (actual rows= loops=)

  • Hash Cond: (gefaess_charge_bb.hk_h_gefaessreise = gefaessreise_lvn_p62_s.hk_h_gefaessreise)
50. 0.000 0.000 ↓ 0.0

Seq Scan on gefaess_charge_bb (cost=0.00..35,253.70 rows=96,070 width=205) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Hash (cost=137.87..137.87 rows=1,731 width=86) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Hash Join (cost=61.35..137.87 rows=1,731 width=86) (actual rows= loops=)

  • Hash Cond: ((gefaessreise_lvn_p62_s.hk_h_gefaessreise = gefaessreise_lvn_p62_bp.hk_h_gefaessreise) AND (gefaessreise_lvn_p62_s.dss_load_date = gefaessreise_lvn_p62_bp.dss_load_date))
53. 0.000 0.000 ↓ 0.0

Seq Scan on gefaessreise_lvn_p62_s (cost=0.00..67.38 rows=1,738 width=53) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Hash (cost=35.34..35.34 rows=1,734 width=49) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Seq Scan on gefaessreise_lvn_p62_bp (cost=0.00..35.34 rows=1,734 width=49) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Index Scan using stationzustand_lvn_p62_s_hk on stationzustand_lvn_p62_s (cost=0.56..0.74 rows=1 width=49) (actual rows= loops=)

  • Index Cond: (hk_h_stationzustand = stationzustand_lvn_p62_bp.hk_h_stationzustand)
  • Filter: (stationzustand_lvn_p62_bp.dss_load_date = dss_load_date)
57. 0.000 0.000 ↓ 0.0

Hash (cost=3,216.87..3,216.87 rows=158,287 width=49) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Seq Scan on gefaessumlauf_lvn_p62_bp (cost=0.00..3,216.87 rows=158,287 width=49) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Hash (cost=6,244.54..6,244.54 rows=158,954 width=53) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Seq Scan on gefaessumlauf_lvn_p62_s (cost=0.00..6,244.54 rows=158,954 width=53) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

Hash (cost=13.13..13.13 rows=140 width=87) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Hash Join (cost=5.65..13.13 rows=140 width=87) (actual rows= loops=)

  • Hash Cond: ((gefaess_lvn_p62_s.hk_h_gefaess = gefaess_lvn_p62_bp.hk_h_gefaess) AND (gefaess_lvn_p62_s.dss_load_date = gefaess_lvn_p62_bp.dss_load_date))
63. 0.000 0.000 ↓ 0.0

Seq Scan on gefaess_lvn_p62_s (cost=0.00..6.62 rows=162 width=54) (actual rows= loops=)

64. 0.000 0.000 ↓ 0.0

Hash (cost=3.46..3.46 rows=146 width=49) (actual rows= loops=)

65. 0.000 0.000 ↓ 0.0

Seq Scan on gefaess_lvn_p62_bp (cost=0.00..3.46 rows=146 width=49) (actual rows= loops=)

66. 0.000 0.000 ↓ 0.0

Hash (cost=352,716.88..352,716.88 rows=28,134 width=73) (actual rows= loops=)

67. 0.000 0.000 ↓ 0.0

Subquery Scan on vakanlage (cost=351,543.22..352,716.88 rows=28,134 width=73) (actual rows= loops=)

68. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=351,543.22..352,435.54 rows=28,134 width=73) (actual rows= loops=)

  • Group Key: ereignis_charge_bb.hk_h_charge
69. 0.000 0.000 ↓ 0.0

Sort (cost=351,543.22..351,723.44 rows=72,085 width=55) (actual rows= loops=)

  • Sort Key: ereignis_charge_bb.hk_h_charge
70. 0.000 0.000 ↓ 0.0

Gather (cost=2,506.32..343,262.90 rows=72,085 width=55) (actual rows= loops=)

  • Workers Planned: 2
71. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,506.32..335,054.40 rows=30,035 width=55) (actual rows= loops=)

72. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,505.76..312,697.11 rows=30,149 width=131) (actual rows= loops=)

73. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on ereignis_charge_bb (cost=1,505.20..122,476.30 rows=30,149 width=82) (actual rows= loops=)

  • Recheck Cond: ((erbez)::text = 'VAKUBEHB'::text)
74. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ereignis_charge_bb_erbez (cost=0.00..1,487.11 rows=72,357 width=0) (actual rows= loops=)

  • Index Cond: ((erbez)::text = 'VAKUBEHB'::text)
75. 0.000 0.000 ↓ 0.0

Index Scan using ereignis_lvn_p62_bp_unique on ereignis_lvn_p62_bp (cost=0.56..6.31 rows=1 width=49) (actual rows= loops=)

  • Index Cond: (hk_h_ereignis = ereignis_charge_bb.hk_h_ereignis)
76. 0.000 0.000 ↓ 0.0

Index Scan using ereignis_lvn_p62_s_hk on ereignis_lvn_p62_s (cost=0.56..0.73 rows=1 width=63) (actual rows= loops=)

  • Index Cond: (hk_h_ereignis = ereignis_lvn_p62_bp.hk_h_ereignis)
  • Filter: (ereignis_lvn_p62_bp.dss_load_date = dss_load_date)
77. 0.000 0.000 ↓ 0.0

Hash (cost=341,655.80..341,655.80 rows=341 width=93) (actual rows= loops=)

78. 0.000 0.000 ↓ 0.0

Subquery Scan on tagnr (cost=341,633.64..341,655.80 rows=341 width=93) (actual rows= loops=)

79. 0.000 0.000 ↓ 0.0

WindowAgg (cost=341,633.64..341,652.39 rows=341 width=287) (actual rows= loops=)

80. 0.000 0.000 ↓ 0.0

Sort (cost=341,633.64..341,634.49 rows=341 width=67) (actual rows= loops=)

  • Sort Key: (((to_timestamp((CASE WHEN ((foo.ereignis_lvn_p62_s_cur_erbez)::text = 'ABSTIB'::text) THEN foo.ereignis_lvn_p62_s_cur_erzeitutc ELSE NULL::numeric END)::double precision) - '06:45:00'::interval))::date), foo.ereignis_lvn_p62_s_cur_erzeitutc
81. 0.000 0.000 ↓ 0.0

Subquery Scan on foo (cost=339,398.60..341,619.29 rows=341 width=67) (actual rows= loops=)

  • Filter: (foo.rank_abstichanfang = 1)
82. 0.000 0.000 ↓ 0.0

WindowAgg (cost=339,398.60..340,762.56 rows=68,198 width=248) (actual rows= loops=)

83. 0.000 0.000 ↓ 0.0

Sort (cost=339,398.60..339,569.09 rows=68,198 width=76) (actual rows= loops=)

  • Sort Key: ereignis_charge_bb_1.hk_h_charge, ereignis_lvn_p62_s_1.erzeitutc DESC
84. 0.000 0.000 ↓ 0.0

Gather (cost=2,424.08..330,892.17 rows=68,198 width=76) (actual rows= loops=)

  • Workers Planned: 2
85. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,424.08..323,072.37 rows=28,416 width=76) (actual rows= loops=)

86. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,423.52..301,920.86 rows=28,523 width=131) (actual rows= loops=)

87. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on ereignis_charge_bb ereignis_charge_bb_1 (cost=1,422.96..119,446.67 rows=28,523 width=82) (actual rows= loops=)

  • Recheck Cond: ((erbez)::text = 'ABSTIB'::text)
88. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ereignis_charge_bb_erbez (cost=0.00..1,405.84 rows=68,455 width=0) (actual rows= loops=)

  • Index Cond: ((erbez)::text = 'ABSTIB'::text)
89. 0.000 0.000 ↓ 0.0

Index Scan using ereignis_lvn_p62_bp_unique on ereignis_lvn_p62_bp ereignis_lvn_p62_bp_1 (cost=0.56..6.40 rows=1 width=49) (actual rows= loops=)

  • Index Cond: (hk_h_ereignis = ereignis_charge_bb_1.hk_h_ereignis)
90. 0.000 0.000 ↓ 0.0

Index Scan using ereignis_lvn_p62_s_hk on ereignis_lvn_p62_s ereignis_lvn_p62_s_1 (cost=0.56..0.73 rows=1 width=84) (actual rows= loops=)

  • Index Cond: (hk_h_ereignis = ereignis_lvn_p62_bp_1.hk_h_ereignis)
  • Filter: (ereignis_lvn_p62_bp_1.dss_load_date = dss_load_date)