blob: 4caa0ed70a308edf94aaa59d3654ac16c8dfa4ff [file] [log] [blame]
# TPCDS-Q98
select
i_item_desc,
i_category,
i_class,
i_current_price,
sum(ss_ext_sales_price) as itemrevenue,
sum(ss_ext_sales_price)*100/sum(sum(ss_ext_sales_price)) over (partition by i_class) as revenueratio
from
store_sales,
item,
date_dim
where
ss_item_sk = i_item_sk
and i_category in ('Jewelry', 'Sports', 'Books')
and ss_sold_date_sk = d_date_sk
and cast(d_date as timestamp) between cast('1999-02-22' as timestamp)
and (cast('1999-02-22' as timestamp) + interval 30 days)
group by
i_item_id,
i_item_desc,
i_category,
i_class,
i_current_price
order by
i_category,
i_class,
i_item_id,
i_item_desc,
revenueratio
limit 1000
---- PLAN
Max Per-Host Resource Reservation: Memory=52.00MB Threads=4
Per-Host Resource Estimates: Memory=221MB
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=221.46MB mem-reservation=52.00MB thread-reservation=4 runtime-filters-memory=2.00MB
PLAN-ROOT SINK
| output exprs: i_item_desc, i_category, i_class, i_current_price, sum(ss_ext_sales_price), sum(ss_ext_sales_price) * CAST(100 AS DECIMAL(3,0)) / sum(sum(ss_ext_sales_price))
| mem-estimate=0B mem-reservation=0B thread-reservation=0
|
08:TOP-N [LIMIT=1000]
| order by: i_category ASC, i_class ASC, i_item_id ASC, i_item_desc ASC, sum(ss_ext_sales_price) * 100 / sum(sum(ss_ext_sales_price)) ASC
| mem-estimate=209.09KB mem-reservation=0B thread-reservation=0
| tuple-ids=5 row-size=214B cardinality=1.00K
| in pipelines: 08(GETNEXT), 06(OPEN)
|
07:ANALYTIC
| functions: sum(sum(ss_ext_sales_price))
| partition by: i_class
| mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0
| tuple-ids=10,9 row-size=214B cardinality=864.12K
| in pipelines: 06(GETNEXT)
|
06:SORT
| order by: i_class ASC NULLS LAST
| mem-estimate=14.00MB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
| tuple-ids=10 row-size=198B cardinality=864.12K
| in pipelines: 06(GETNEXT), 05(OPEN)
|
05:AGGREGATE [FINALIZE]
| output: sum(ss_ext_sales_price)
| group by: i_item_id, i_item_desc, i_category, i_class, i_current_price
| mem-estimate=179.58MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
| tuple-ids=3 row-size=198B cardinality=864.12K
| in pipelines: 05(GETNEXT), 00(OPEN)
|
04:HASH JOIN [INNER JOIN]
| hash predicates: ss_sold_date_sk = d_date_sk
| fk/pk conjuncts: ss_sold_date_sk = d_date_sk
| runtime filters: RF000[bloom] <- d_date_sk
| mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0
| tuple-ids=0,1,2 row-size=232B cardinality=864.12K
| in pipelines: 00(GETNEXT), 02(OPEN)
|
|--02:SCAN HDFS [tpcds_parquet.date_dim]
| HDFS partitions=1/1 files=1 size=2.15MB
| predicates: CAST(d_date AS TIMESTAMP) <= TIMESTAMP '1999-03-24 00:00:00', CAST(d_date AS TIMESTAMP) >= TIMESTAMP '1999-02-22 00:00:00'
| stored statistics:
| table: rows=73.05K size=2.15MB
| columns: all
| extrapolated-rows=disabled max-scan-range-rows=73.05K
| parquet dictionary predicates: CAST(d_date AS TIMESTAMP) <= TIMESTAMP '1999-03-24 00:00:00', CAST(d_date AS TIMESTAMP) >= TIMESTAMP '1999-02-22 00:00:00'
| mem-estimate=32.00MB mem-reservation=1.00MB thread-reservation=1
| tuple-ids=2 row-size=26B cardinality=7.30K
| in pipelines: 02(GETNEXT)
|
03:HASH JOIN [INNER JOIN]
| hash predicates: ss_item_sk = i_item_sk
| fk/pk conjuncts: ss_item_sk = i_item_sk
| runtime filters: RF002[bloom] <- i_item_sk
| mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0
| tuple-ids=0,1 row-size=206B cardinality=864.12K
| in pipelines: 00(GETNEXT), 01(OPEN)
|
|--01:SCAN HDFS [tpcds_parquet.item]
| HDFS partitions=1/1 files=1 size=1.73MB
| predicates: i_category IN ('Jewelry', 'Sports', 'Books')
| stored statistics:
| table: rows=18.00K size=1.73MB
| columns: all
| extrapolated-rows=disabled max-scan-range-rows=18.00K
| parquet statistics predicates: i_category IN ('Jewelry', 'Sports', 'Books')
| parquet dictionary predicates: i_category IN ('Jewelry', 'Sports', 'Books')
| mem-estimate=96.00MB mem-reservation=2.00MB thread-reservation=1
| tuple-ids=1 row-size=190B cardinality=5.40K
| in pipelines: 01(GETNEXT)
|
00:SCAN HDFS [tpcds_parquet.store_sales]
HDFS partitions=1824/1824 files=1824 size=201.02MB
runtime filters: RF000[bloom] -> ss_sold_date_sk, RF002[bloom] -> ss_item_sk
stored statistics:
table: rows=2.88M size=201.02MB
partitions: 1824/1824 rows=2.88M
columns: all
extrapolated-rows=disabled max-scan-range-rows=130.09K
mem-estimate=32.00MB mem-reservation=1.00MB thread-reservation=1
tuple-ids=0 row-size=16B cardinality=2.88M
in pipelines: 00(GETNEXT)
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=93.88MB Threads=8
Per-Host Resource Estimates: Memory=366MB
F04:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=708.68KB mem-reservation=0B thread-reservation=1
PLAN-ROOT SINK
| output exprs: i_item_desc, i_category, i_class, i_current_price, sum(ss_ext_sales_price), sum(ss_ext_sales_price) * CAST(100 AS DECIMAL(3,0)) / sum(sum(ss_ext_sales_price))
| mem-estimate=0B mem-reservation=0B thread-reservation=0
|
13:MERGING-EXCHANGE [UNPARTITIONED]
| order by: i_category ASC, i_class ASC, i_item_id ASC, i_item_desc ASC, sum(ss_ext_sales_price) * 100 / sum(sum(ss_ext_sales_price)) ASC
| limit: 1000
| mem-estimate=708.68KB mem-reservation=0B thread-reservation=0
| tuple-ids=5 row-size=214B cardinality=1.00K
| in pipelines: 08(GETNEXT)
|
F03:PLAN FRAGMENT [HASH(i_class)] hosts=3 instances=3
Per-Host Resources: mem-estimate=107.79MB mem-reservation=50.00MB thread-reservation=1
08:TOP-N [LIMIT=1000]
| order by: i_category ASC, i_class ASC, i_item_id ASC, i_item_desc ASC, sum(ss_ext_sales_price) * 100 / sum(sum(ss_ext_sales_price)) ASC
| mem-estimate=209.09KB mem-reservation=0B thread-reservation=0
| tuple-ids=5 row-size=214B cardinality=1.00K
| in pipelines: 08(GETNEXT), 06(OPEN)
|
07:ANALYTIC
| functions: sum(sum(ss_ext_sales_price))
| partition by: i_class
| mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0
| tuple-ids=10,9 row-size=214B cardinality=864.12K
| in pipelines: 06(GETNEXT)
|
06:SORT
| order by: i_class ASC NULLS LAST
| mem-estimate=14.00MB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
| tuple-ids=10 row-size=198B cardinality=864.12K
| in pipelines: 06(GETNEXT), 12(OPEN)
|
12:AGGREGATE [FINALIZE]
| output: sum:merge(ss_ext_sales_price)
| group by: i_item_id, i_item_desc, i_category, i_class, i_current_price
| mem-estimate=89.79MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
| tuple-ids=3 row-size=198B cardinality=864.12K
| in pipelines: 12(GETNEXT), 00(OPEN)
|
11:EXCHANGE [HASH(i_class)]
| mem-estimate=10.59MB mem-reservation=0B thread-reservation=0
| tuple-ids=3 row-size=198B cardinality=864.12K
| in pipelines: 00(GETNEXT)
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
Per-Host Resources: mem-estimate=129.05MB mem-reservation=40.88MB thread-reservation=2 runtime-filters-memory=2.00MB
05:AGGREGATE [STREAMING]
| output: sum(ss_ext_sales_price)
| group by: i_item_id, i_item_desc, i_category, i_class, i_current_price
| mem-estimate=89.79MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
| tuple-ids=3 row-size=198B cardinality=864.12K
| in pipelines: 00(GETNEXT)
|
04:HASH JOIN [INNER JOIN, BROADCAST]
| hash predicates: ss_sold_date_sk = d_date_sk
| fk/pk conjuncts: ss_sold_date_sk = d_date_sk
| runtime filters: RF000[bloom] <- d_date_sk
| mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0
| tuple-ids=0,1,2 row-size=232B cardinality=864.12K
| in pipelines: 00(GETNEXT), 02(OPEN)
|
|--10:EXCHANGE [BROADCAST]
| | mem-estimate=215.48KB mem-reservation=0B thread-reservation=0
| | tuple-ids=2 row-size=26B cardinality=7.30K
| | in pipelines: 02(GETNEXT)
| |
| F02:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
| Per-Host Resources: mem-estimate=32.00MB mem-reservation=1.00MB thread-reservation=2
| 02:SCAN HDFS [tpcds_parquet.date_dim, RANDOM]
| HDFS partitions=1/1 files=1 size=2.15MB
| predicates: CAST(d_date AS TIMESTAMP) <= TIMESTAMP '1999-03-24 00:00:00', CAST(d_date AS TIMESTAMP) >= TIMESTAMP '1999-02-22 00:00:00'
| stored statistics:
| table: rows=73.05K size=2.15MB
| columns: all
| extrapolated-rows=disabled max-scan-range-rows=73.05K
| parquet dictionary predicates: CAST(d_date AS TIMESTAMP) <= TIMESTAMP '1999-03-24 00:00:00', CAST(d_date AS TIMESTAMP) >= TIMESTAMP '1999-02-22 00:00:00'
| mem-estimate=32.00MB mem-reservation=1.00MB thread-reservation=1
| tuple-ids=2 row-size=26B cardinality=7.30K
| in pipelines: 02(GETNEXT)
|
03:HASH JOIN [INNER JOIN, BROADCAST]
| hash predicates: ss_item_sk = i_item_sk
| fk/pk conjuncts: ss_item_sk = i_item_sk
| runtime filters: RF002[bloom] <- i_item_sk
| mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0
| tuple-ids=0,1 row-size=206B cardinality=864.12K
| in pipelines: 00(GETNEXT), 01(OPEN)
|
|--09:EXCHANGE [BROADCAST]
| | mem-estimate=1.17MB mem-reservation=0B thread-reservation=0
| | tuple-ids=1 row-size=190B cardinality=5.40K
| | in pipelines: 01(GETNEXT)
| |
| F01:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
| Per-Host Resources: mem-estimate=96.00MB mem-reservation=2.00MB thread-reservation=2
| 01:SCAN HDFS [tpcds_parquet.item, RANDOM]
| HDFS partitions=1/1 files=1 size=1.73MB
| predicates: i_category IN ('Jewelry', 'Sports', 'Books')
| stored statistics:
| table: rows=18.00K size=1.73MB
| columns: all
| extrapolated-rows=disabled max-scan-range-rows=18.00K
| parquet statistics predicates: i_category IN ('Jewelry', 'Sports', 'Books')
| parquet dictionary predicates: i_category IN ('Jewelry', 'Sports', 'Books')
| mem-estimate=96.00MB mem-reservation=2.00MB thread-reservation=1
| tuple-ids=1 row-size=190B cardinality=5.40K
| in pipelines: 01(GETNEXT)
|
00:SCAN HDFS [tpcds_parquet.store_sales, RANDOM]
HDFS partitions=1824/1824 files=1824 size=201.02MB
runtime filters: RF000[bloom] -> ss_sold_date_sk, RF002[bloom] -> ss_item_sk
stored statistics:
table: rows=2.88M size=201.02MB
partitions: 1824/1824 rows=2.88M
columns: all
extrapolated-rows=disabled max-scan-range-rows=130.09K
mem-estimate=32.00MB mem-reservation=1.00MB thread-reservation=1
tuple-ids=0 row-size=16B cardinality=2.88M
in pipelines: 00(GETNEXT)
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=184.75MB Threads=9
Per-Host Resource Estimates: Memory=294MB
F04:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Instance Resources: mem-estimate=1.32MB mem-reservation=0B thread-reservation=1
PLAN-ROOT SINK
| output exprs: i_item_desc, i_category, i_class, i_current_price, sum(ss_ext_sales_price), sum(ss_ext_sales_price) * CAST(100 AS DECIMAL(3,0)) / sum(sum(ss_ext_sales_price))
| mem-estimate=0B mem-reservation=0B thread-reservation=0
|
13:MERGING-EXCHANGE [UNPARTITIONED]
| order by: i_category ASC, i_class ASC, i_item_id ASC, i_item_desc ASC, sum(ss_ext_sales_price) * 100 / sum(sum(ss_ext_sales_price)) ASC
| limit: 1000
| mem-estimate=1.32MB mem-reservation=0B thread-reservation=0
| tuple-ids=5 row-size=214B cardinality=1.00K
| in pipelines: 08(GETNEXT)
|
F03:PLAN FRAGMENT [HASH(i_class)] hosts=3 instances=6
Per-Instance Resources: mem-estimate=62.90MB mem-reservation=50.00MB thread-reservation=1
08:TOP-N [LIMIT=1000]
| order by: i_category ASC, i_class ASC, i_item_id ASC, i_item_desc ASC, sum(ss_ext_sales_price) * 100 / sum(sum(ss_ext_sales_price)) ASC
| mem-estimate=209.09KB mem-reservation=0B thread-reservation=0
| tuple-ids=5 row-size=214B cardinality=1.00K
| in pipelines: 08(GETNEXT), 06(OPEN)
|
07:ANALYTIC
| functions: sum(sum(ss_ext_sales_price))
| partition by: i_class
| mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0
| tuple-ids=10,9 row-size=214B cardinality=864.12K
| in pipelines: 06(GETNEXT)
|
06:SORT
| order by: i_class ASC NULLS LAST
| mem-estimate=14.00MB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
| tuple-ids=10 row-size=198B cardinality=864.12K
| in pipelines: 06(GETNEXT), 12(OPEN)
|
12:AGGREGATE [FINALIZE]
| output: sum:merge(ss_ext_sales_price)
| group by: i_item_id, i_item_desc, i_category, i_class, i_current_price
| mem-estimate=44.90MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
| tuple-ids=3 row-size=198B cardinality=864.12K
| in pipelines: 12(GETNEXT), 00(OPEN)
|
11:EXCHANGE [HASH(i_class)]
| mem-estimate=11.18MB mem-reservation=0B thread-reservation=0
| tuple-ids=3 row-size=198B cardinality=864.12K
| in pipelines: 00(GETNEXT)
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
Per-Host Shared Resources: mem-estimate=2.00MB mem-reservation=2.00MB thread-reservation=0 runtime-filters-memory=2.00MB
Per-Instance Resources: mem-estimate=60.90MB mem-reservation=35.00MB thread-reservation=1
05:AGGREGATE [STREAMING]
| output: sum(ss_ext_sales_price)
| group by: i_item_id, i_item_desc, i_category, i_class, i_current_price
| mem-estimate=44.90MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
| tuple-ids=3 row-size=198B cardinality=864.12K
| in pipelines: 00(GETNEXT)
|
04:HASH JOIN [INNER JOIN, BROADCAST]
| hash-table-id=00
| hash predicates: ss_sold_date_sk = d_date_sk
| fk/pk conjuncts: ss_sold_date_sk = d_date_sk
| mem-estimate=0B mem-reservation=0B spill-buffer=64.00KB thread-reservation=0
| tuple-ids=0,1,2 row-size=232B cardinality=864.12K
| in pipelines: 00(GETNEXT), 02(OPEN)
|
|--F05:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
| | Per-Instance Resources: mem-estimate=5.09MB mem-reservation=4.88MB thread-reservation=1 runtime-filters-memory=1.00MB
| JOIN BUILD
| | join-table-id=00 plan-id=01 cohort-id=01
| | build expressions: d_date_sk
| | runtime filters: RF000[bloom] <- d_date_sk
| | mem-estimate=3.88MB mem-reservation=3.88MB spill-buffer=64.00KB thread-reservation=0
| |
| 10:EXCHANGE [BROADCAST]
| | mem-estimate=215.48KB mem-reservation=0B thread-reservation=0
| | tuple-ids=2 row-size=26B cardinality=7.30K
| | in pipelines: 02(GETNEXT)
| |
| F02:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
| Per-Instance Resources: mem-estimate=16.00MB mem-reservation=1.00MB thread-reservation=1
| 02:SCAN HDFS [tpcds_parquet.date_dim, RANDOM]
| HDFS partitions=1/1 files=1 size=2.15MB
| predicates: CAST(d_date AS TIMESTAMP) <= TIMESTAMP '1999-03-24 00:00:00', CAST(d_date AS TIMESTAMP) >= TIMESTAMP '1999-02-22 00:00:00'
| stored statistics:
| table: rows=73.05K size=2.15MB
| columns: all
| extrapolated-rows=disabled max-scan-range-rows=73.05K
| parquet dictionary predicates: CAST(d_date AS TIMESTAMP) <= TIMESTAMP '1999-03-24 00:00:00', CAST(d_date AS TIMESTAMP) >= TIMESTAMP '1999-02-22 00:00:00'
| mem-estimate=16.00MB mem-reservation=1.00MB thread-reservation=0
| tuple-ids=2 row-size=26B cardinality=7.30K
| in pipelines: 02(GETNEXT)
|
03:HASH JOIN [INNER JOIN, BROADCAST]
| hash-table-id=01
| hash predicates: ss_item_sk = i_item_sk
| fk/pk conjuncts: ss_item_sk = i_item_sk
| mem-estimate=0B mem-reservation=0B spill-buffer=64.00KB thread-reservation=0
| tuple-ids=0,1 row-size=206B cardinality=864.12K
| in pipelines: 00(GETNEXT), 01(OPEN)
|
|--F06:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
| | Per-Instance Resources: mem-estimate=6.04MB mem-reservation=4.88MB thread-reservation=1 runtime-filters-memory=1.00MB
| JOIN BUILD
| | join-table-id=01 plan-id=02 cohort-id=01
| | build expressions: i_item_sk
| | runtime filters: RF002[bloom] <- i_item_sk
| | mem-estimate=3.88MB mem-reservation=3.88MB spill-buffer=64.00KB thread-reservation=0
| |
| 09:EXCHANGE [BROADCAST]
| | mem-estimate=1.17MB mem-reservation=0B thread-reservation=0
| | tuple-ids=1 row-size=190B cardinality=5.40K
| | in pipelines: 01(GETNEXT)
| |
| F01:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
| Per-Instance Resources: mem-estimate=16.00MB mem-reservation=2.00MB thread-reservation=1
| 01:SCAN HDFS [tpcds_parquet.item, RANDOM]
| HDFS partitions=1/1 files=1 size=1.73MB
| predicates: i_category IN ('Jewelry', 'Sports', 'Books')
| stored statistics:
| table: rows=18.00K size=1.73MB
| columns: all
| extrapolated-rows=disabled max-scan-range-rows=18.00K
| parquet statistics predicates: i_category IN ('Jewelry', 'Sports', 'Books')
| parquet dictionary predicates: i_category IN ('Jewelry', 'Sports', 'Books')
| mem-estimate=16.00MB mem-reservation=2.00MB thread-reservation=0
| tuple-ids=1 row-size=190B cardinality=5.40K
| in pipelines: 01(GETNEXT)
|
00:SCAN HDFS [tpcds_parquet.store_sales, RANDOM]
HDFS partitions=1824/1824 files=1824 size=201.02MB
runtime filters: RF000[bloom] -> ss_sold_date_sk, RF002[bloom] -> ss_item_sk
stored statistics:
table: rows=2.88M size=201.02MB
partitions: 1824/1824 rows=2.88M
columns: all
extrapolated-rows=disabled max-scan-range-rows=130.09K
mem-estimate=16.00MB mem-reservation=1.00MB thread-reservation=0
tuple-ids=0 row-size=16B cardinality=2.88M
in pipelines: 00(GETNEXT)
====