Files
email-tracker/external/duckdb/benchmark/micro/window/window_mode_constant.benchmark
2025-10-24 19:21:19 -05:00

37 lines
582 B
Plaintext

# name: benchmark/micro/window/window_mode_constant.benchmark
# description: Measure performance of moving MODE with constant frame
# group: [window]
name Windowed MODE, Single value per frame
group micro
subgroup window
require tpch
load
CALL dbgen(sf=0.1);
run
SELECT
l_orderkey,
l_shipmode,
l_linenumber,
mode(l_linenumber ORDER BY l_linenumber DESC) over w AS l_mode,
FROM lineitem
WINDOW w AS (partition by l_shipmode)
ORDER BY ALL
LIMIT 10
;
result IIII
1 AIR 4 1
1 FOB 5 1
1 MAIL 2 1
1 MAIL 6 1
1 REG AIR 3 1
1 TRUCK 1 1
2 RAIL 1 1
3 AIR 1 1
3 FOB 5 1
3 RAIL 2 1