explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ILLU

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

Unique (cost=134,259,209.08..134,481,815.31 rows=3,297,870 width=497) (actual rows= loops=)

2.          

CTE cnt_track

3. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1,383,481.23..1,536,594.82 rows=1,648,935 width=52) (actual rows= loops=)

  • Group Key: lwl.label_key, lwl.lsl_key, lwl.wea_key
4. 0.000 0.000 ↓ 0.0

Sort (cost=1,383,481.23..1,400,043.97 rows=6,625,095 width=16) (actual rows= loops=)

  • Sort Key: lwl.label_key, lwl.lsl_key, lwl.wea_key
5. 0.000 0.000 ↓ 0.0

Hash Join (cost=45,033.67..519,649.21 rows=6,625,095 width=16) (actual rows= loops=)

  • Hash Cond: (lwl.product_key = p.product_key)
6. 0.000 0.000 ↓ 0.0

Seq Scan on lkp_product_dsp_cnt_lwl lwl (cost=0.00..346,529.52 rows=16,489,352 width=16) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Hash (cost=42,916.67..42,916.67 rows=169,360 width=4) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Seq Scan on lkp_product p (cost=0.00..42,916.67 rows=169,360 width=4) (actual rows= loops=)

  • Filter: (((product_type)::text = 'Full Length Recording (Track)'::text) AND ((product_id_type)::text = 'ISRC'::text) AND ((product_category)::text = 'Audio'::text))
9.          

CTE cnt_group_track

10. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1,341,447.82..1,485,083.10 rows=1,648,935 width=52) (actual rows= loops=)

  • Group Key: lwl_1.label_key, lwl_1.lsl_key, lwl_1.wea_key
11. 0.000 0.000 ↓ 0.0

Sort (cost=1,341,447.82..1,356,825.77 rows=6,151,180 width=16) (actual rows= loops=)

  • Sort Key: lwl_1.label_key, lwl_1.lsl_key, lwl_1.wea_key
12. 0.000 0.000 ↓ 0.0

Hash Join (cost=72,825.13..542,701.48 rows=6,151,180 width=16) (actual rows= loops=)

  • Hash Cond: (lwl_1.product_key = p_1.product_key)
13. 0.000 0.000 ↓ 0.0

Seq Scan on lkp_product_dsp_cnt_lwl lwl_1 (cost=0.00..346,529.52 rows=16,489,352 width=16) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Hash (cost=70,859.57..70,859.57 rows=157,245 width=8) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Hash Join (cost=25,735.35..70,859.57 rows=157,245 width=8) (actual rows= loops=)

  • Hash Cond: (p_1.product_group_key = pg.product_group_key)
16. 0.000 0.000 ↓ 0.0

Seq Scan on lkp_product p_1 (cost=0.00..42,916.67 rows=169,360 width=8) (actual rows= loops=)

  • Filter: (((product_type)::text = 'Full Length Recording (Track)'::text) AND ((product_id_type)::text = 'ISRC'::text) AND ((product_category)::text = 'Audio'::text))
17. 0.000 0.000 ↓ 0.0

Hash (cost=22,635.83..22,635.83 rows=247,961 width=4) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Index Only Scan using lkp_product_group_product_group_key on lkp_product_group pg (cost=0.42..22,635.83 rows=247,961 width=4) (actual rows= loops=)

19.          

CTE cnt_album

20. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=504,088.75..531,361.71 rows=839,168 width=52) (actual rows= loops=)

  • Group Key: lwl_2.label_key, lwl_2.lsl_key, lwl_2.wea_key
21. 0.000 0.000 ↓ 0.0

Sort (cost=504,088.75..506,186.67 rows=839,168 width=16) (actual rows= loops=)

  • Sort Key: lwl_2.label_key, lwl_2.lsl_key, lwl_2.wea_key
22. 0.000 0.000 ↓ 0.0

Gather (cost=43,657.92..407,177.49 rows=839,168 width=16) (actual rows= loops=)

  • Workers Planned: 2
23. 0.000 0.000 ↓ 0.0

Hash Join (cost=42,657.92..322,260.69 rows=349,653 width=16) (actual rows= loops=)

  • Hash Cond: (lwl_2.product_key = p_2.product_key)
24. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on lkp_product_dsp_cnt_lwl lwl_2 (cost=0.00..250,341.63 rows=6,870,563 width=16) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Hash (cost=42,389.76..42,389.76 rows=21,452 width=4) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Seq Scan on lkp_product p_2 (cost=0.00..42,389.76 rows=21,452 width=4) (actual rows= loops=)

  • Filter: (((product_id_type)::text = ANY ('{EAN,UPC}'::text[])) AND ((product_type)::text = ANY ('{Album,Single,"Long Form Video (Album)"}'::text[])))
27.          

CTE cnt_group_album

28. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=523,693.43..552,911.18 rows=779,140 width=59) (actual rows= loops=)

  • Group Key: lwl_3.label_key, lwl_3.customer_key, lwl_3.country_code, lwl_3.lsl_key, lwl_3.wea_key
29. 0.000 0.000 ↓ 0.0

Sort (cost=523,693.43..525,641.28 rows=779,140 width=23) (actual rows= loops=)

  • Sort Key: lwl_3.label_key, lwl_3.customer_key, lwl_3.country_code, lwl_3.lsl_key, lwl_3.wea_key
30. 0.000 0.000 ↓ 0.0

Gather (cost=69,393.26..431,467.65 rows=779,140 width=23) (actual rows= loops=)

  • Workers Planned: 2
31. 0.000 0.000 ↓ 0.0

Hash Join (cost=68,393.26..352,553.65 rows=324,642 width=23) (actual rows= loops=)

  • Hash Cond: (p_3.product_group_key = pg_1.product_group_key)
32. 0.000 0.000 ↓ 0.0

Hash Join (cost=42,657.92..322,260.69 rows=349,653 width=23) (actual rows= loops=)

  • Hash Cond: (lwl_3.product_key = p_3.product_key)
33. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on lkp_product_dsp_cnt_lwl lwl_3 (cost=0.00..250,341.63 rows=6,870,563 width=23) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Hash (cost=42,389.76..42,389.76 rows=21,452 width=8) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Seq Scan on lkp_product p_3 (cost=0.00..42,389.76 rows=21,452 width=8) (actual rows= loops=)

  • Filter: (((product_id_type)::text = ANY ('{EAN,UPC}'::text[])) AND ((product_type)::text = ANY ('{Album,Single,"Long Form Video (Album)"}'::text[])))
36. 0.000 0.000 ↓ 0.0

Hash (cost=22,635.83..22,635.83 rows=247,961 width=4) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Index Only Scan using lkp_product_group_product_group_key on lkp_product_group pg_1 (cost=0.42..22,635.83 rows=247,961 width=4) (actual rows= loops=)

38.          

CTE cnt_artist

39. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=3,129,639.06..3,562,484.54 rows=1,648,935 width=59) (actual rows= loops=)

  • Group Key: lwl_4.label_key, lwl_4.customer_key, lwl_4.country_code, lwl_4.lsl_key, lwl_4.wea_key
40. 0.000 0.000 ↓ 0.0

Sort (cost=3,129,639.06..3,170,862.44 rows=16,489,352 width=23) (actual rows= loops=)

  • Sort Key: lwl_4.label_key, lwl_4.customer_key, lwl_4.country_code, lwl_4.lsl_key, lwl_4.wea_key
41. 0.000 0.000 ↓ 0.0

Hash Join (cost=46,671.29..814,812.40 rows=16,489,352 width=23) (actual rows= loops=)

  • Hash Cond: (lwl_4.product_key = p_4.product_key)
42. 0.000 0.000 ↓ 0.0

Seq Scan on lkp_product_dsp_cnt_lwl lwl_4 (cost=0.00..346,529.52 rows=16,489,352 width=23) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Hash (cost=39,755.24..39,755.24 rows=421,524 width=8) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Seq Scan on lkp_product p_4 (cost=0.00..39,755.24 rows=421,524 width=8) (actual rows= loops=)

45.          

CTE kpi_group_track

46. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=2,579,402.73..2,720,584.29 rows=664,384 width=52) (actual rows= loops=)

  • Group Key: "*SELECT* 1".label_key, "*SELECT* 1".wea_key, "*SELECT* 1".lsl_key
47. 0.000 0.000 ↓ 0.0

Sort (cost=2,579,402.73..2,596,012.33 rows=6,643,838 width=16) (actual rows= loops=)

  • Sort Key: "*SELECT* 1".label_key, "*SELECT* 1".wea_key, "*SELECT* 1".lsl_key
48. 0.000 0.000 ↓ 0.0

Result (cost=1,257,826.38..1,712,993.28 rows=6,643,838 width=16) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Append (cost=1,257,826.38..1,646,554.90 rows=6,643,838 width=16) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1 (cost=1,257,826.38..1,497,851.39 rows=6,400,667 width=16) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1,257,826.38..1,433,844.72 rows=6,400,667 width=48) (actual rows= loops=)

  • Group Key: pg_2.product_group_key, trc.label_key, trc.wea_key, trc.lsl_key
  • Filter: (sum(COALESCE(trc.stream_count_rtd, '0'::bigint)) > '0'::numeric)
52. 0.000 0.000 ↓ 0.0

Sort (cost=1,257,826.38..1,273,828.04 rows=6,400,667 width=24) (actual rows= loops=)

  • Sort Key: pg_2.product_group_key, trc.label_key, trc.wea_key, trc.lsl_key
53. 0.000 0.000 ↓ 0.0

Hash Join (cost=64,330.19..402,973.67 rows=6,400,667 width=24) (actual rows= loops=)

  • Hash Cond: (trc.product_key = tr.product_key)
54. 0.000 0.000 ↓ 0.0

Seq Scan on track_streams_current_kpi trc (cost=0.00..166,468.04 rows=6,893,804 width=24) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Hash (cost=57,909.06..57,909.06 rows=391,371 width=8) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Hash Join (cost=25,735.77..57,909.06 rows=391,371 width=8) (actual rows= loops=)

  • Hash Cond: (tr.product_group_key = pg_2.product_group_key)
57. 0.000 0.000 ↓ 0.0

Index Only Scan using lkp_product_product_key_product_group_key_idx on lkp_product tr (cost=0.42..26,679.28 rows=421,524 width=8) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Hash (cost=22,635.83..22,635.83 rows=247,961 width=4) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Index Only Scan using lkp_product_group_product_group_key on lkp_product_group pg_2 (cost=0.42..22,635.83 rows=247,961 width=4) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2 (cost=139,584.60..148,703.51 rows=243,171 width=16) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=139,584.60..146,271.80 rows=243,171 width=48) (actual rows= loops=)

  • Group Key: pg_3.product_group_key, dnl.label_key, dnl.wea_key, dnl.lsl_key
  • Filter: (sum(COALESCE(dnl.track_count_rtd, '0'::bigint)) > '0'::numeric)
62. 0.000 0.000 ↓ 0.0

Sort (cost=139,584.60..140,192.53 rows=243,171 width=24) (actual rows= loops=)

  • Sort Key: pg_3.product_group_key, dnl.label_key, dnl.wea_key, dnl.lsl_key
63. 0.000 0.000 ↓ 0.0

Hash Join (cost=59,330.68..117,830.99 rows=243,171 width=24) (actual rows= loops=)

  • Hash Cond: (tr_1.product_group_key = pg_3.product_group_key)
64. 0.000 0.000 ↓ 0.0

Hash Join (cost=33,595.33..88,681.79 rows=261,906 width=24) (actual rows= loops=)

  • Hash Cond: (dnl.entity_id = tr_1.product_key)
65. 0.000 0.000 ↓ 0.0

Seq Scan on downloads_current_kpi dnl (cost=0.00..46,768.25 rows=261,906 width=24) (actual rows= loops=)

  • Filter: ((entity_type)::text = 'track'::text)
66. 0.000 0.000 ↓ 0.0

Hash (cost=26,679.28..26,679.28 rows=421,524 width=8) (actual rows= loops=)

67. 0.000 0.000 ↓ 0.0

Index Only Scan using lkp_product_product_key_product_group_key_idx on lkp_product tr_1 (cost=0.42..26,679.28 rows=421,524 width=8) (actual rows= loops=)

68. 0.000 0.000 ↓ 0.0

Hash (cost=22,635.83..22,635.83 rows=247,961 width=4) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

Index Only Scan using lkp_product_group_product_group_key on lkp_product_group pg_3 (cost=0.42..22,635.83 rows=247,961 width=4) (actual rows= loops=)

70.          

CTE kpi_track

71. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=884,891.91..900,644.43 rows=74,130 width=52) (actual rows= loops=)

  • Group Key: "*SELECT* 1_1".label_key, "*SELECT* 1_1".wea_key, "*SELECT* 1_1".lsl_key
72. 0.000 0.000 ↓ 0.0

Sort (cost=884,891.91..886,745.15 rows=741,295 width=16) (actual rows= loops=)

  • Sort Key: "*SELECT* 1_1".label_key, "*SELECT* 1_1".wea_key, "*SELECT* 1_1".lsl_key
73. 0.000 0.000 ↓ 0.0

Result (cost=494,284.61..799,946.80 rows=741,295 width=16) (actual rows= loops=)

74. 0.000 0.000 ↓ 0.0

Append (cost=494,284.61..792,533.85 rows=741,295 width=16) (actual rows= loops=)

75. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1_1 (cost=494,284.61..741,323.69 rows=689,380 width=16) (actual rows= loops=)

76. 0.000 0.000 ↓ 0.0

Finalize GroupAggregate (cost=494,284.61..734,429.89 rows=689,380 width=48) (actual rows= loops=)

  • Group Key: trc_1.product_key, trc_1.label_key, trc_1.wea_key, trc_1.lsl_key
  • Filter: (sum(COALESCE(trc_1.stream_count_rtd, '0'::bigint)) > '0'::numeric)
77. 0.000 0.000 ↓ 0.0

Gather Merge (cost=494,284.61..705,131.24 rows=1,378,760 width=48) (actual rows= loops=)

  • Workers Planned: 2
78. 0.000 0.000 ↓ 0.0

Partial GroupAggregate (cost=493,284.58..544,988.10 rows=689,380 width=48) (actual rows= loops=)

  • Group Key: trc_1.product_key, trc_1.label_key, trc_1.wea_key, trc_1.lsl_key
79. 0.000 0.000 ↓ 0.0

Sort (cost=493,284.58..500,465.63 rows=2,872,418 width=24) (actual rows= loops=)

  • Sort Key: trc_1.product_key, trc_1.label_key, trc_1.wea_key, trc_1.lsl_key
80. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on track_streams_current_kpi trc_1 (cost=0.00..126,254.18 rows=2,872,418 width=24) (actual rows= loops=)

81. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2_1 (cost=50,042.07..51,210.16 rows=51,915 width=16) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

HashAggregate (cost=50,042.07..50,691.01 rows=51,915 width=48) (actual rows= loops=)

  • Group Key: dnl_1.entity_id, dnl_1.label_key, dnl_1.wea_key, dnl_1.lsl_key
  • Filter: (sum(COALESCE(dnl_1.track_count_rtd, '0'::bigint)) > '0'::numeric)
83. 0.000 0.000 ↓ 0.0

Seq Scan on downloads_current_kpi dnl_1 (cost=0.00..46,768.25 rows=261,906 width=24) (actual rows= loops=)

  • Filter: ((entity_type)::text = 'track'::text)
84.          

CTE kpi_group_album

85. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=121,892.56..123,585.52 rows=7,967 width=52) (actual rows= loops=)

  • Group Key: "*SELECT* 1_2".label_key, "*SELECT* 1_2".wea_key, "*SELECT* 1_2".lsl_key
86. 0.000 0.000 ↓ 0.0

Sort (cost=121,892.56..122,091.73 rows=79,669 width=16) (actual rows= loops=)

  • Sort Key: "*SELECT* 1_2".label_key, "*SELECT* 1_2".wea_key, "*SELECT* 1_2".lsl_key
87. 0.000 0.000 ↓ 0.0

Result (cost=74,901.10..115,406.81 rows=79,669 width=16) (actual rows= loops=)

88. 0.000 0.000 ↓ 0.0

Append (cost=74,901.10..114,610.12 rows=79,669 width=16) (actual rows= loops=)

89. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1_2 (cost=74,901.10..75,855.28 rows=42,408 width=16) (actual rows= loops=)

90. 0.000 0.000 ↓ 0.0

Finalize HashAggregate (cost=74,901.10..75,431.20 rows=42,408 width=48) (actual rows= loops=)

  • Group Key: pg_4.product_group_key, dnl_2.label_key, dnl_2.wea_key, dnl_2.lsl_key
  • Filter: (sum(COALESCE(dnl_2.album_count_rtd, '0'::bigint)) > '0'::numeric)
91. 0.000 0.000 ↓ 0.0

Gather (cost=70,616.13..74,371.00 rows=35,340 width=48) (actual rows= loops=)

  • Workers Planned: 2
92. 0.000 0.000 ↓ 0.0

Partial HashAggregate (cost=69,616.13..69,837.00 rows=17,670 width=48) (actual rows= loops=)

  • Group Key: pg_4.product_group_key, dnl_2.label_key, dnl_2.wea_key, dnl_2.lsl_key
93. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.84..69,395.25 rows=17,670 width=24) (actual rows= loops=)

94. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..60,024.86 rows=19,031 width=24) (actual rows= loops=)

95. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on downloads_current_kpi dnl_2 (cost=0.00..42,979.35 rows=19,031 width=24) (actual rows= loops=)

  • Filter: ((entity_type)::text = 'album'::text)
96. 0.000 0.000 ↓ 0.0

Index Only Scan using lkp_product_product_key_product_group_key_idx on lkp_product tr_2 (cost=0.42..0.89 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (product_key = dnl_2.entity_id)
97. 0.000 0.000 ↓ 0.0

Index Only Scan using lkp_product_group_product_group_key on lkp_product_group pg_4 (cost=0.42..0.48 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (product_group_key = tr_2.product_group_key)
98. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2_2 (cost=37,916.46..38,754.84 rows=37,261 width=16) (actual rows= loops=)

99. 0.000 0.000 ↓ 0.0

Finalize HashAggregate (cost=37,916.46..38,382.23 rows=37,261 width=48) (actual rows= loops=)

  • Group Key: pg_5.product_group_key, ph.label_key, ph.wea_key, ph.lsl_key
  • Filter: (sum(COALESCE(ph.physical_count_rtd, '0'::bigint)) > '0'::numeric)
100. 0.000 0.000 ↓ 0.0

Gather (cost=34,151.65..37,450.71 rows=31,050 width=48) (actual rows= loops=)

  • Workers Planned: 2
101. 0.000 0.000 ↓ 0.0

Partial HashAggregate (cost=33,151.65..33,345.71 rows=15,525 width=48) (actual rows= loops=)

  • Group Key: pg_5.product_group_key, ph.label_key, ph.wea_key, ph.lsl_key
102. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.84..32,957.59 rows=15,525 width=24) (actual rows= loops=)

103. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..24,724.09 rows=16,722 width=24) (actual rows= loops=)

104. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on physical_current_kpi ph (cost=0.00..8,717.35 rows=16,722 width=24) (actual rows= loops=)

  • Filter: ((entity_type)::text = 'album'::text)
105. 0.000 0.000 ↓ 0.0

Index Only Scan using lkp_product_product_key_product_group_key_idx on lkp_product tr_3 (cost=0.42..0.95 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (product_key = ph.entity_id)
106. 0.000 0.000 ↓ 0.0

Index Only Scan using lkp_product_group_product_group_key on lkp_product_group pg_5 (cost=0.42..0.48 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (product_group_key = tr_3.product_group_key)
107.          

CTE kpi_album

108. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=62,324.44..63,292.76 rows=4,557 width=52) (actual rows= loops=)

  • Group Key: "*SELECT* 1_3".label_key, "*SELECT* 1_3".wea_key, "*SELECT* 1_3".lsl_key
109. 0.000 0.000 ↓ 0.0

Sort (cost=62,324.44..62,438.36 rows=45,568 width=16) (actual rows= loops=)

  • Sort Key: "*SELECT* 1_3".label_key, "*SELECT* 1_3".wea_key, "*SELECT* 1_3".lsl_key
110. 0.000 0.000 ↓ 0.0

Result (cost=47,339.19..58,798.45 rows=45,568 width=16) (actual rows= loops=)

111. 0.000 0.000 ↓ 0.0

Append (cost=47,339.19..58,342.77 rows=45,568 width=16) (actual rows= loops=)

112. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1_3 (cost=47,339.19..48,042.43 rows=31,255 width=16) (actual rows= loops=)

113. 0.000 0.000 ↓ 0.0

HashAggregate (cost=47,339.19..47,729.88 rows=31,255 width=48) (actual rows= loops=)

  • Group Key: dnl_3.entity_id, dnl_3.label_key, dnl_3.wea_key, dnl_3.lsl_key
  • Filter: (sum(COALESCE(dnl_3.album_count_rtd, '0'::bigint)) > '0'::numeric)
114. 0.000 0.000 ↓ 0.0

Seq Scan on downloads_current_kpi dnl_3 (cost=0.00..46,768.25 rows=45,675 width=24) (actual rows= loops=)

  • Filter: ((entity_type)::text = 'album'::text)
115. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2_3 (cost=9,978.30..10,300.34 rows=14,313 width=16) (actual rows= loops=)

116. 0.000 0.000 ↓ 0.0

HashAggregate (cost=9,978.30..10,157.21 rows=14,313 width=48) (actual rows= loops=)

  • Group Key: ph_1.entity_id, ph_1.label_key, ph_1.wea_key, ph_1.lsl_key
  • Filter: (sum(COALESCE(ph_1.physical_count_rtd, '0'::bigint)) > '0'::numeric)
117. 0.000 0.000 ↓ 0.0

Seq Scan on physical_current_kpi ph_1 (cost=0.00..9,476.65 rows=40,132 width=24) (actual rows= loops=)

  • Filter: ((entity_type)::text = 'album'::text)
118.          

CTE kpi_artist

119. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=116,200.72..119,676.79 rows=16,358 width=52) (actual rows= loops=)

  • Group Key: "*SELECT* 1_4".label_key, "*SELECT* 1_4".wea_key, "*SELECT* 1_4".lsl_key
120. 0.000 0.000 ↓ 0.0

Sort (cost=116,200.72..116,609.67 rows=163,580 width=16) (actual rows= loops=)

  • Sort Key: "*SELECT* 1_4".label_key, "*SELECT* 1_4".wea_key, "*SELECT* 1_4".lsl_key
121. 0.000 0.000 ↓ 0.0

Result (cost=38,939.00..102,034.99 rows=163,580 width=16) (actual rows= loops=)

122. 0.000 0.000 ↓ 0.0

Append (cost=38,939.00..100,399.18 rows=163,580 width=16) (actual rows= loops=)

123. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1_4 (cost=38,939.00..41,310.30 rows=105,391 width=16) (actual rows= loops=)

124. 0.000 0.000 ↓ 0.0

HashAggregate (cost=38,939.00..40,256.39 rows=105,391 width=48) (actual rows= loops=)

  • Group Key: kpi.artist_id, kpi.label_key, kpi.wea_key, kpi.lsl_key
  • Filter: (sum(COALESCE(kpi.stream_cnt_rtd, '0'::bigint)) > '0'::numeric)
125. 0.000 0.000 ↓ 0.0

Seq Scan on artist_streams_current_kpi kpi (cost=0.00..25,765.11 rows=1,053,911 width=24) (actual rows= loops=)

126. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2_4 (cost=47,953.41..48,966.63 rows=45,032 width=16) (actual rows= loops=)

127. 0.000 0.000 ↓ 0.0

HashAggregate (cost=47,953.41..48,516.31 rows=45,032 width=48) (actual rows= loops=)

  • Group Key: kpi_1.entity_id, kpi_1.label_key, kpi_1.wea_key, kpi_1.lsl_key
  • Filter: (sum(COALESCE(kpi_1.track_count_rtd, '0'::bigint)) > '0'::numeric)
128. 0.000 0.000 ↓ 0.0

Seq Scan on downloads_current_kpi kpi_1 (cost=0.00..46,768.25 rows=94,813 width=24) (actual rows= loops=)

  • Filter: ((entity_type)::text = 'artist'::text)
129. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 3 (cost=9,826.23..10,122.26 rows=13,157 width=16) (actual rows= loops=)

130. 0.000 0.000 ↓ 0.0

HashAggregate (cost=9,826.23..9,990.69 rows=13,157 width=48) (actual rows= loops=)

  • Group Key: kpi_2.entity_id, kpi_2.label_key, kpi_2.wea_key, kpi_2.lsl_key
  • Filter: (sum(COALESCE(kpi_2.physical_count_rtd, '0'::bigint)) > '0'::numeric)
131. 0.000 0.000 ↓ 0.0

Seq Scan on physical_current_kpi kpi_2 (cost=0.00..9,476.65 rows=27,966 width=24) (actual rows= loops=)

  • Filter: ((entity_type)::text = 'artist'::text)
132. 0.000 0.000 ↓ 0.0

Sort (cost=122,662,989.92..122,671,234.60 rows=3,297,870 width=497) (actual rows= loops=)

  • Sort Key: lkp.label_key, lkp.label_name, lkp.thumbnail_url, (COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.label_key, cnt_group_track.label_key)), cnt_album.label_key)), cnt_group_album.label_key)), cnt_artist.label_key)), kpi_track.label_key)), kpi_group_track.label_key)), kpi_album.label_key)), kpi_group_album.label_key)), kpi_artist.label_key)), lkp.label_key)), (COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.wea_key, cnt_group_track.wea_key)), cnt_album.wea_key)), cnt_group_album.wea_key)), cnt_artist.wea_key)), kpi_track.wea_key)), kpi_group_track.wea_key)), kpi_album.wea_key)), kpi_group_album.wea_key)), kpi_artist.wea_key)), '-999999'::integer)), (COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.lsl_key, cnt_group_track.lsl_key)), cnt_album.lsl_key)), cnt_group_album.lsl_key)), cnt_artist.lsl_key)), kpi_track.lsl_key)), kpi_group_track.lsl_key)), kpi_album.lsl_key)), kpi_group_album.lsl_key)), kpi_artist.lsl_key)), '-999999'::integer)), ((COALESCE(kpi_track.track_count, '0'::bigint))::integer), ((COALESCE(kpi_group_track.group_track_count, '0'::bigint))::integer), ((COALESCE(kpi_album.album_count, '0'::bigint))::integer), ((COALESCE(kpi_group_album.group_album_count, '0'::bigint))::integer), ((COALESCE(kpi_artist.artist_count, '0'::bigint))::integer), ((COALESCE(cnt_track.track_count, '0'::bigint))::integer), ((COALESCE(cnt_group_track.group_track_count, '0'::bigint))::integer), (COALESCE(cnt_album.album_count, '0'::bigint)), (COALESCE(cnt_group_album.group_album_count, '0'::bigint)), (COALESCE(cnt_artist.artist_count, '0'::bigint)), ((SubPlan 11)), ((SubPlan 12)), ((SubPlan 13)), ((SubPlan 14)), ((SubPlan 15)), ((SubPlan 16)), ((SubPlan 17)), ((SubPlan 18)), ((SubPlan 19)), ((SubPlan 20))
133. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=4,258,741.21..120,818,031.33 rows=3,297,870 width=497) (actual rows= loops=)

  • Hash Cond: (COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.label_key, cnt_group_track.label_key)), cnt_album.label_key)), cnt_group_album.label_key)), cnt_artist.label_key)), kpi_track.label_key)), kpi_group_track.label_key)), kpi_album.label_key)), kpi_group_album.label_key)), kpi_artist.label_key) = lkp.label_key)
134. 0.000 0.000 ↓ 0.0

Merge Full Join (cost=4,258,502.32..4,279,311.31 rows=1,648,935 width=392) (actual rows= loops=)

  • Merge Cond: (((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.label_key, cnt_group_track.label_key)), cnt_album.label_key)), cnt_group_album.label_key)), cnt_artist.label_key)), kpi_track.label_key)), kpi_group_track.label_key)), kpi_album.label_key)), kpi_group_album.label_key)) = kpi_artist.label_key) AND ((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.wea_key, cnt_group_track.wea_key)), cnt_album.wea_key)), cnt_group_album.wea_key)), cnt_artist.wea_key)), kpi_track.wea_key)), kpi_group_track.wea_key)), kpi_album.wea_key)), kpi_group_album.wea_key)) = kpi_artist.wea_key) AND ((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.lsl_key, cnt_group_track.lsl_key)), cnt_album.lsl_key)), cnt_group_album.lsl_key)), cnt_artist.lsl_key)), kpi_track.lsl_key)), kpi_group_track.lsl_key)), kpi_album.lsl_key)), kpi_group_album.lsl_key)) = kpi_artist.lsl_key))
135. 0.000 0.000 ↓ 0.0

Sort (cost=4,257,030.29..4,261,152.63 rows=1,648,935 width=372) (actual rows= loops=)

  • Sort Key: (COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.label_key, cnt_group_track.label_key)), cnt_album.label_key)), cnt_group_album.label_key)), cnt_artist.label_key)), kpi_track.label_key)), kpi_group_track.label_key)), kpi_album.label_key)), kpi_group_album.label_key)), (COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.wea_key, cnt_group_track.wea_key)), cnt_album.wea_key)), cnt_group_album.wea_key)), cnt_artist.wea_key)), kpi_track.wea_key)), kpi_group_track.wea_key)), kpi_album.wea_key)), kpi_group_album.wea_key)), (COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.lsl_key, cnt_group_track.lsl_key)), cnt_album.lsl_key)), cnt_group_album.lsl_key)), cnt_artist.lsl_key)), kpi_track.lsl_key)), kpi_group_track.lsl_key)), kpi_album.lsl_key)), kpi_group_album.lsl_key))
136. 0.000 0.000 ↓ 0.0

Merge Full Join (cost=3,784,241.89..3,804,949.67 rows=1,648,935 width=372) (actual rows= loops=)

  • Merge Cond: (((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.label_key, cnt_group_track.label_key)), cnt_album.label_key)), cnt_group_album.label_key)), cnt_artist.label_key)), kpi_track.label_key)), kpi_group_track.label_key)), kpi_album.label_key)) = kpi_group_album.label_key) AND ((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.wea_key, cnt_group_track.wea_key)), cnt_album.wea_key)), cnt_group_album.wea_key)), cnt_artist.wea_key)), kpi_track.wea_key)), kpi_group_track.wea_key)), kpi_album.wea_key)) = kpi_group_album.wea_key) AND ((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.lsl_key, cnt_group_track.lsl_key)), cnt_album.lsl_key)), cnt_group_album.lsl_key)), cnt_artist.lsl_key)), kpi_track.lsl_key)), kpi_group_track.lsl_key)), kpi_album.lsl_key)) = kpi_group_album.lsl_key))
137. 0.000 0.000 ↓ 0.0

Sort (cost=3,783,566.30..3,787,688.63 rows=1,648,935 width=336) (actual rows= loops=)

  • Sort Key: (COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.label_key, cnt_group_track.label_key)), cnt_album.label_key)), cnt_group_album.label_key)), cnt_artist.label_key)), kpi_track.label_key)), kpi_group_track.label_key)), kpi_album.label_key)), (COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.wea_key, cnt_group_track.wea_key)), cnt_album.wea_key)), cnt_group_album.wea_key)), cnt_artist.wea_key)), kpi_track.wea_key)), kpi_group_track.wea_key)), kpi_album.wea_key)), (COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.lsl_key, cnt_group_track.lsl_key)), cnt_album.lsl_key)), cnt_group_album.lsl_key)), cnt_artist.lsl_key)), kpi_track.lsl_key)), kpi_group_track.lsl_key)), kpi_album.lsl_key))
138. 0.000 0.000 ↓ 0.0

Merge Full Join (cost=3,339,001.03..3,359,667.67 rows=1,648,935 width=336) (actual rows= loops=)

  • Merge Cond: (((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.label_key, cnt_group_track.label_key)), cnt_album.label_key)), cnt_group_album.label_key)), cnt_artist.label_key)), kpi_track.label_key)), kpi_group_track.label_key)) = kpi_album.label_key) AND ((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.wea_key, cnt_group_track.wea_key)), cnt_album.wea_key)), cnt_group_album.wea_key)), cnt_artist.wea_key)), kpi_track.wea_key)), kpi_group_track.wea_key)) = kpi_album.wea_key) AND ((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.lsl_key, cnt_group_track.lsl_key)), cnt_album.lsl_key)), cnt_group_album.lsl_key)), cnt_artist.lsl_key)), kpi_track.lsl_key)), kpi_group_track.lsl_key)) = kpi_album.lsl_key))
139. 0.000 0.000 ↓ 0.0

Sort (cost=3,338,632.96..3,342,755.30 rows=1,648,935 width=300) (actual rows= loops=)

  • Sort Key: (COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.label_key, cnt_group_track.label_key)), cnt_album.label_key)), cnt_group_album.label_key)), cnt_artist.label_key)), kpi_track.label_key)), kpi_group_track.label_key)), (COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.wea_key, cnt_group_track.wea_key)), cnt_album.wea_key)), cnt_group_album.wea_key)), cnt_artist.wea_key)), kpi_track.wea_key)), kpi_group_track.wea_key)), (COALESCE((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.lsl_key, cnt_group_track.lsl_key)), cnt_album.lsl_key)), cnt_group_album.lsl_key)), cnt_artist.lsl_key)), kpi_track.lsl_key)), kpi_group_track.lsl_key))
140. 0.000 0.000 ↓ 0.0

Merge Full Join (cost=2,906,991.94..2,937,277.84 rows=1,648,935 width=300) (actual rows= loops=)

  • Merge Cond: (((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.label_key, cnt_group_track.label_key)), cnt_album.label_key)), cnt_group_album.label_key)), cnt_artist.label_key)), kpi_track.label_key)) = kpi_group_track.label_key) AND ((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.wea_key, cnt_group_track.wea_key)), cnt_album.wea_key)), cnt_group_album.wea_key)), cnt_artist.wea_key)), kpi_track.wea_key)) = kpi_group_track.wea_key) AND ((COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.lsl_key, cnt_group_track.lsl_key)), cnt_album.lsl_key)), cnt_group_album.lsl_key)), cnt_artist.lsl_key)), kpi_track.lsl_key)) = kpi_group_track.lsl_key))
141. 0.000 0.000 ↓ 0.0

Sort (cost=2,806,741.32..2,810,863.66 rows=1,648,935 width=264) (actual rows= loops=)

  • Sort Key: (COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.label_key, cnt_group_track.label_key)), cnt_album.label_key)), cnt_group_album.label_key)), cnt_artist.label_key)), kpi_track.label_key)), (COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.wea_key, cnt_group_track.wea_key)), cnt_album.wea_key)), cnt_group_album.wea_key)), cnt_artist.wea_key)), kpi_track.wea_key)), (COALESCE((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.lsl_key, cnt_group_track.lsl_key)), cnt_album.lsl_key)), cnt_group_album.lsl_key)), cnt_artist.lsl_key)), kpi_track.lsl_key))
142. 0.000 0.000 ↓ 0.0

Merge Full Join (cost=2,412,058.92..2,433,564.70 rows=1,648,935 width=264) (actual rows= loops=)

  • Merge Cond: (((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.label_key, cnt_group_track.label_key)), cnt_album.label_key)), cnt_group_album.label_key)), cnt_artist.label_key)) = kpi_track.label_key) AND ((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.wea_key, cnt_group_track.wea_key)), cnt_album.wea_key)), cnt_group_album.wea_key)), cnt_artist.wea_key)) = kpi_track.wea_key) AND ((COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.lsl_key, cnt_group_track.lsl_key)), cnt_album.lsl_key)), cnt_group_album.lsl_key)), cnt_artist.lsl_key)) = kpi_track.lsl_key))
143. 0.000 0.000 ↓ 0.0

Sort (cost=2,404,580.03..2,408,702.37 rows=1,648,935 width=228) (actual rows= loops=)

  • Sort Key: (COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.label_key, cnt_group_track.label_key)), cnt_album.label_key)), cnt_group_album.label_key)), cnt_artist.label_key)), (COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.wea_key, cnt_group_track.wea_key)), cnt_album.wea_key)), cnt_group_album.wea_key)), cnt_artist.wea_key)), (COALESCE((COALESCE((COALESCE((COALESCE(cnt_track.lsl_key, cnt_group_track.lsl_key)), cnt_album.lsl_key)), cnt_group_album.lsl_key)), cnt_artist.lsl_key))
144. 0.000 0.000 ↓ 0.0

Merge Full Join (cost=2,013,447.14..2,053,946.91 rows=1,648,935 width=228) (actual rows= loops=)

  • Merge Cond: (((COALESCE((COALESCE((COALESCE(cnt_track.label_key, cnt_group_track.label_key)), cnt_album.label_key)), cnt_group_album.label_key)) = cnt_artist.label_key) AND ((COALESCE((COALESCE((COALESCE(cnt_track.wea_key, cnt_group_track.wea_key)), cnt_album.wea_key)), cnt_group_album.wea_key)) = cnt_artist.wea_key) AND ((COALESCE((COALESCE((COALESCE(cnt_track.lsl_key, cnt_group_track.lsl_key)), cnt_album.lsl_key)), cnt_group_album.lsl_key)) = cnt_artist.lsl_key))
145. 0.000 0.000 ↓ 0.0

Sort (cost=1,753,829.82..1,757,952.15 rows=1,648,935 width=188) (actual rows= loops=)

  • Sort Key: (COALESCE((COALESCE((COALESCE(cnt_track.label_key, cnt_group_track.label_key)), cnt_album.label_key)), cnt_group_album.label_key)), (COALESCE((COALESCE((COALESCE(cnt_track.wea_key, cnt_group_track.wea_key)), cnt_album.wea_key)), cnt_group_album.wea_key)), (COALESCE((COALESCE((COALESCE(cnt_track.lsl_key, cnt_group_track.lsl_key)), cnt_album.lsl_key)), cnt_group_album.lsl_key))
146. 0.000 0.000 ↓ 0.0

Merge Full Join (cost=1,403,544.15..1,431,378.69 rows=1,648,935 width=188) (actual rows= loops=)

  • Merge Cond: (((COALESCE((COALESCE(cnt_track.label_key, cnt_group_track.label_key)), cnt_album.label_key)) = cnt_group_album.label_key) AND ((COALESCE((COALESCE(cnt_track.wea_key, cnt_group_track.wea_key)), cnt_album.wea_key)) = cnt_group_album.wea_key) AND ((COALESCE((COALESCE(cnt_track.lsl_key, cnt_group_track.lsl_key)), cnt_album.lsl_key)) = cnt_group_album.lsl_key))
147. 0.000 0.000 ↓ 0.0

Sort (cost=1,285,085.07..1,289,207.41 rows=1,648,935 width=148) (actual rows= loops=)

  • Sort Key: (COALESCE((COALESCE(cnt_track.label_key, cnt_group_track.label_key)), cnt_album.label_key)), (COALESCE((COALESCE(cnt_track.wea_key, cnt_group_track.wea_key)), cnt_album.wea_key)), (COALESCE((COALESCE(cnt_track.lsl_key, cnt_group_track.lsl_key)), cnt_album.lsl_key))
148. 0.000 0.000 ↓ 0.0

Merge Full Join (cost=962,103.83..990,812.45 rows=1,648,935 width=148) (actual rows= loops=)

  • Merge Cond: (((COALESCE(cnt_track.label_key, cnt_group_track.label_key)) = cnt_album.label_key) AND ((COALESCE(cnt_track.wea_key, cnt_group_track.wea_key)) = cnt_album.wea_key) AND ((COALESCE(cnt_track.lsl_key, cnt_group_track.lsl_key)) = cnt_album.lsl_key))
149. 0.000 0.000 ↓ 0.0

Sort (cost=834,069.71..838,192.05 rows=1,648,935 width=108) (actual rows= loops=)

  • Sort Key: (COALESCE(cnt_track.label_key, cnt_group_track.label_key)), (COALESCE(cnt_track.wea_key, cnt_group_track.wea_key)), (COALESCE(cnt_track.lsl_key, cnt_group_track.lsl_key))
150. 0.000 0.000 ↓ 0.0

Merge Full Join (cost=519,234.65..567,979.09 rows=1,648,935 width=108) (actual rows= loops=)

  • Merge Cond: ((cnt_track.label_key = cnt_group_track.label_key) AND (cnt_track.wea_key = cnt_group_track.wea_key) AND (cnt_track.lsl_key = cnt_group_track.lsl_key))
151. 0.000 0.000 ↓ 0.0

Sort (cost=259,617.32..263,739.66 rows=1,648,935 width=52) (actual rows= loops=)

  • Sort Key: cnt_track.label_key, cnt_track.wea_key, cnt_track.lsl_key
152. 0.000 0.000 ↓ 0.0

CTE Scan on cnt_track (cost=0.00..32,978.70 rows=1,648,935 width=52) (actual rows= loops=)

153. 0.000 0.000 ↓ 0.0

Materialize (cost=259,617.32..267,862.00 rows=1,648,935 width=52) (actual rows= loops=)

154. 0.000 0.000 ↓ 0.0

Sort (cost=259,617.32..263,739.66 rows=1,648,935 width=52) (actual rows= loops=)

  • Sort Key: cnt_group_track.label_key, cnt_group_track.wea_key, cnt_group_track.lsl_key
155. 0.000 0.000 ↓ 0.0

CTE Scan on cnt_group_track (cost=0.00..32,978.70 rows=1,648,935 width=52) (actual rows= loops=)

156. 0.000 0.000 ↓ 0.0

Materialize (cost=128,034.12..132,229.96 rows=839,168 width=52) (actual rows= loops=)

157. 0.000 0.000 ↓ 0.0

Sort (cost=128,034.12..130,132.04 rows=839,168 width=52) (actual rows= loops=)

  • Sort Key: cnt_album.label_key, cnt_album.wea_key, cnt_album.lsl_key
158. 0.000 0.000 ↓ 0.0

CTE Scan on cnt_album (cost=0.00..16,783.36 rows=839,168 width=52) (actual rows= loops=)

159. 0.000 0.000 ↓ 0.0

Materialize (cost=118,459.08..122,354.78 rows=779,140 width=52) (actual rows= loops=)

160. 0.000 0.000 ↓ 0.0

Sort (cost=118,459.08..120,406.93 rows=779,140 width=52) (actual rows= loops=)

  • Sort Key: cnt_group_album.label_key, cnt_group_album.wea_key, cnt_group_album.lsl_key
161. 0.000 0.000 ↓ 0.0

CTE Scan on cnt_group_album (cost=0.00..15,582.80 rows=779,140 width=52) (actual rows= loops=)

162. 0.000 0.000 ↓ 0.0

Materialize (cost=259,617.32..267,862.00 rows=1,648,935 width=52) (actual rows= loops=)

163. 0.000 0.000 ↓ 0.0

Sort (cost=259,617.32..263,739.66 rows=1,648,935 width=52) (actual rows= loops=)

  • Sort Key: cnt_artist.label_key, cnt_artist.wea_key, cnt_artist.lsl_key
164. 0.000 0.000 ↓ 0.0

CTE Scan on cnt_artist (cost=0.00..32,978.70 rows=1,648,935 width=52) (actual rows= loops=)

165. 0.000 0.000 ↓ 0.0

Sort (cost=7,478.89..7,664.22 rows=74,130 width=52) (actual rows= loops=)

  • Sort Key: kpi_track.label_key, kpi_track.wea_key, kpi_track.lsl_key
166. 0.000 0.000 ↓ 0.0

CTE Scan on kpi_track (cost=0.00..1,482.60 rows=74,130 width=52) (actual rows= loops=)

167. 0.000 0.000 ↓ 0.0

Materialize (cost=100,250.62..103,572.54 rows=664,384 width=52) (actual rows= loops=)

168. 0.000 0.000 ↓ 0.0

Sort (cost=100,250.62..101,911.58 rows=664,384 width=52) (actual rows= loops=)

  • Sort Key: kpi_group_track.label_key, kpi_group_track.wea_key, kpi_group_track.lsl_key
169. 0.000 0.000 ↓ 0.0

CTE Scan on kpi_group_track (cost=0.00..13,287.68 rows=664,384 width=52) (actual rows= loops=)

170. 0.000 0.000 ↓ 0.0

Sort (cost=368.07..379.46 rows=4,557 width=52) (actual rows= loops=)

  • Sort Key: kpi_album.label_key, kpi_album.wea_key, kpi_album.lsl_key
171. 0.000 0.000 ↓ 0.0

CTE Scan on kpi_album (cost=0.00..91.14 rows=4,557 width=52) (actual rows= loops=)

172. 0.000 0.000 ↓ 0.0

Sort (cost=675.59..695.51 rows=7,967 width=52) (actual rows= loops=)

  • Sort Key: kpi_group_album.label_key, kpi_group_album.wea_key, kpi_group_album.lsl_key
173. 0.000 0.000 ↓ 0.0

CTE Scan on kpi_group_album (cost=0.00..159.34 rows=7,967 width=52) (actual rows= loops=)

174. 0.000 0.000 ↓ 0.0

Sort (cost=1,472.03..1,512.93 rows=16,358 width=52) (actual rows= loops=)

  • Sort Key: kpi_artist.label_key, kpi_artist.wea_key, kpi_artist.lsl_key
175. 0.000 0.000 ↓ 0.0

CTE Scan on kpi_artist (cost=0.00..327.16 rows=16,358 width=52) (actual rows= loops=)

176. 0.000 0.000 ↓ 0.0

Hash (cost=147.84..147.84 rows=7,284 width=113) (actual rows= loops=)

177. 0.000 0.000 ↓ 0.0

Seq Scan on lkp_label lkp (cost=0.00..147.84 rows=7,284 width=113) (actual rows= loops=)

178.          

SubPlan (forHash Right Join)

179. 0.000 0.000 ↓ 0.0

Aggregate (cost=3.52..3.53 rows=1 width=32) (actual rows= loops=)

180. 0.000 0.000 ↓ 0.0

HashAggregate (cost=0.77..2.27 rows=100 width=32) (actual rows= loops=)

  • Group Key: unnest(ARRAY[string_to_array(kpi_track.track_agg, ','::text)])
181. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

182. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

183. 0.000 0.000 ↓ 0.0

Aggregate (cost=3.52..3.53 rows=1 width=32) (actual rows= loops=)

184. 0.000 0.000 ↓ 0.0

HashAggregate (cost=0.77..2.27 rows=100 width=32) (actual rows= loops=)

  • Group Key: unnest(ARRAY[string_to_array(kpi_group_track.group_track_agg, ','::text)])
185. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

186. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

187. 0.000 0.000 ↓ 0.0

Aggregate (cost=3.52..3.53 rows=1 width=32) (actual rows= loops=)

188. 0.000 0.000 ↓ 0.0

HashAggregate (cost=0.77..2.27 rows=100 width=32) (actual rows= loops=)

  • Group Key: unnest(ARRAY[string_to_array(kpi_album.album_agg, ','::text)])
189. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

190. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

191. 0.000 0.000 ↓ 0.0

Aggregate (cost=3.52..3.53 rows=1 width=32) (actual rows= loops=)

192. 0.000 0.000 ↓ 0.0

HashAggregate (cost=0.77..2.27 rows=100 width=32) (actual rows= loops=)

  • Group Key: unnest(ARRAY[string_to_array(kpi_group_album.group_album_agg, ','::text)])
193. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

194. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

195. 0.000 0.000 ↓ 0.0

Aggregate (cost=3.52..3.53 rows=1 width=32) (actual rows= loops=)

196. 0.000 0.000 ↓ 0.0

HashAggregate (cost=0.77..2.27 rows=100 width=32) (actual rows= loops=)

  • Group Key: unnest(ARRAY[string_to_array(kpi_artist.artist_agg, ','::text)])
197. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

198. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

199. 0.000 0.000 ↓ 0.0

Aggregate (cost=3.52..3.53 rows=1 width=32) (actual rows= loops=)

200. 0.000 0.000 ↓ 0.0

HashAggregate (cost=0.77..2.27 rows=100 width=32) (actual rows= loops=)

  • Group Key: unnest(ARRAY[string_to_array(cnt_track.track_agg, ','::text)])
201. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

202. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

203. 0.000 0.000 ↓ 0.0

Aggregate (cost=3.52..3.53 rows=1 width=32) (actual rows= loops=)

204. 0.000 0.000 ↓ 0.0

HashAggregate (cost=0.77..2.27 rows=100 width=32) (actual rows= loops=)

  • Group Key: unnest(ARRAY[string_to_array(cnt_group_track.group_track_agg, ','::text)])
205. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

206. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

207. 0.000 0.000 ↓ 0.0

Aggregate (cost=3.52..3.53 rows=1 width=32) (actual rows= loops=)

208. 0.000 0.000 ↓ 0.0

HashAggregate (cost=0.77..2.27 rows=100 width=32) (actual rows= loops=)

  • Group Key: unnest(ARRAY[string_to_array(cnt_album.album_agg, ','::text)])
209. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

210. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

211. 0.000 0.000 ↓ 0.0

Aggregate (cost=3.52..3.53 rows=1 width=32) (actual rows= loops=)

212. 0.000 0.000 ↓ 0.0

HashAggregate (cost=0.77..2.27 rows=100 width=32) (actual rows= loops=)

  • Group Key: unnest(ARRAY[string_to_array(cnt_group_album.group_album_agg, ','::text)])
213. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

214. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

215. 0.000 0.000 ↓ 0.0

Aggregate (cost=3.52..3.53 rows=1 width=32) (actual rows= loops=)

216. 0.000 0.000 ↓ 0.0

HashAggregate (cost=0.77..2.27 rows=100 width=32) (actual rows= loops=)

  • Group Key: unnest(ARRAY[string_to_array(cnt_artist.artist_agg, ','::text)])
217. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

218. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)