69 lines
1.5 KiB
Plaintext
69 lines
1.5 KiB
Plaintext
# name: benchmark/micro/window/mode_variable_400.benchmark
|
|
# description: Measure performance of moving MODE with variable frames
|
|
# group: [window]
|
|
|
|
name Windowed MODE, Variable 400
|
|
group micro
|
|
subgroup window
|
|
|
|
require tpch
|
|
|
|
load
|
|
CALL dbgen(sf=1);
|
|
|
|
run
|
|
SELECT l_orderkey, l_shipdate, l_linenumber, mode(l_linenumber) over w AS l_mode
|
|
FROM lineitem
|
|
WINDOW w AS (
|
|
order by l_orderkey, l_shipdate
|
|
rows between mod(rowid * 47, 521) preceding and 400 - mod(rowid * 47, 521) following
|
|
)
|
|
QUALIFY l_mode > 1
|
|
ORDER BY ALL
|
|
;
|
|
|
|
result IIII
|
|
39 1996-12-08 6 3
|
|
707618 1993-12-31 2 2
|
|
707649 1995-11-03 5 2
|
|
707680 1998-02-28 3 2
|
|
1701765 1996-09-01 3 2
|
|
1701767 1994-06-08 2 2
|
|
1701889 1992-10-26 3 2
|
|
1701923 1993-09-29 4 2
|
|
1702080 1993-06-25 5 2
|
|
1702240 1995-03-21 1 2
|
|
1805063 1992-04-30 6 2
|
|
2596640 1995-09-14 3 2
|
|
2596647 1992-05-23 3 2
|
|
2596736 1998-04-17 4 2
|
|
4578916 1997-06-15 4 2
|
|
4578982 1996-09-02 4 2
|
|
5646241 1997-02-12 3 2
|
|
5646278 1993-07-01 4 2
|
|
5646337 1996-11-03 2 2
|
|
5646373 1996-02-14 6 2
|
|
5646403 1998-03-29 4 2
|
|
5646404 1992-07-23 5 2
|
|
5646435 1994-08-16 5 2
|
|
5646531 1992-12-19 5 2
|
|
5646531 1993-04-08 1 2
|
|
5646533 1994-12-02 5 2
|
|
5646535 1998-05-07 3 2
|
|
5646567 1992-10-08 3 2
|
|
5646594 1996-07-20 1 2
|
|
5646597 1996-12-06 1 2
|
|
5646656 1996-06-15 1 2
|
|
5646756 1995-02-12 7 2
|
|
5783364 1992-06-03 6 2
|
|
5783457 1993-02-03 1 2
|
|
5783489 1998-07-18 2 2
|
|
5783524 1996-02-06 2 2
|
|
5783555 1995-03-11 1 2
|
|
5783588 1995-06-15 2 2
|
|
5894308 1995-12-31 1 2
|
|
5894439 1994-09-15 2 2
|
|
5894499 1996-05-19 1 2
|
|
5894532 1992-04-23 4 2
|
|
5894722 1997-03-18 3 2
|