should be it

This commit is contained in:
2025-10-24 19:21:19 -05:00
parent a4b23fc57c
commit f09560c7b1
14047 changed files with 3161551 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
# name: benchmark/micro/pushdown/iejoin_inequality_pushdown.benchmark
# description: Show the performance of using pushdown with IEJoin
# group: [pushdown]
name IEJoinInequalityPushdown
group micro
subgroup pushdown
require tpch
argument sf 10
cache tpch_sf${sf}.duckdb
load
CALL dbgen(sf=${sf});
run
SELECT count(*)
FROM lineitem lhs
INNER JOIN lineitem rhs
ON lhs.l_shipdate < rhs.l_receiptdate
AND rhs.l_shipdate < lhs.l_receiptdate
WHERE rhs.l_shipdate = '1992-01-10'::DATE;

View File

@@ -0,0 +1,15 @@
# name: benchmark/micro/pushdown/in_varchar_pushdown.benchmark
# description: Show the performance of IN pushed down on VARCHAR column
# group: [pushdown]
name InVarcharPushdown
group micro
subgroup pushdown
cache varchar_pushdown.duckdb
load
create table t1s as select printf('%08d', range) i from range(100e6::bigint);
run
select * from t1s where i in ('00000042', '00004242', '00424242', '42424242')

View File

@@ -0,0 +1,19 @@
# name: benchmark/micro/pushdown/join_filter_varchar_pushdown.benchmark
# description: Show the performance of dynamic join IN filter pushed down on VARCHAR column
# group: [pushdown]
name JoinFilterVarcharPushdown
group micro
subgroup pushdown
cache varchar_pushdown.duckdb
load
create table t1s as select printf('%08d', range) i from range(100e6::bigint);
# otherwise we get a projection and the pushdown fails
init
set disabled_optimizers to 'compressed_materialization'
run
select count(*) from t1s t1 join (from t1s where i::bigint % 10e6::bigint = 0) t2 using (i)

View File

@@ -0,0 +1,17 @@
# name: benchmark/micro/pushdown/main_dynamic_rowid_pushdown.benchmark
# description: Show the performance of rowid pushdown
# group: [pushdown]
name RowIdPushdownDynamic
group micro
subgroup pushdown
require tpch
cache tpch_sf10.duckdb
load
CALL dbgen(sf=10);
run
SELECT * FROM lineitem WHERE rowid IN (SELECT rowid FROM lineitem ORDER BY l_orderkey DESC LIMIT 5);

View File

@@ -0,0 +1,20 @@
# name: benchmark/micro/pushdown/nlj_inequality_pushdown.benchmark
# description: Show the performance of using pushdown with NestedLoopJoin
# group: [pushdown]
name NestedLoopJoinInequalityPushdown
group micro
subgroup pushdown
require tpch
argument sf 10
cache tpch_sf${sf}.duckdb
load
CALL dbgen(sf=${sf});
run
FROM lineitem
WHERE l_orderkey > (SELECT MAX(l_orderkey) - 100 FROM lineitem);

View File

@@ -0,0 +1,17 @@
# name: benchmark/micro/pushdown/or_pushdown.benchmark
# description: Show the performance of OR pushed down
# group: [pushdown]
name OrPushdown
group micro
subgroup pushdown
require tpch
cache tpch_sf1.duckdb
load
CALL dbgen(sf=1);
run
SELECT COUNT(l_orderkey) FROM lineitem WHERE l_orderkey=1 OR l_orderkey=80000

View File

@@ -0,0 +1,15 @@
# name: benchmark/micro/pushdown/or_varchar_pushdown.benchmark
# description: Show the performance of OR pushed down on VARCHAR column
# group: [pushdown]
name OrVarcharPushdown
group micro
subgroup pushdown
cache varchar_pushdown.duckdb
load
create table t1s as select printf('%08d', range) i from range(100e6::bigint);
run
select * from t1s where i = '00000042' or i = '00004242' or i = '00424242' or i = '42424242'

View File

@@ -0,0 +1,23 @@
# name: benchmark/micro/pushdown/pwmj_inequality_pushdown.benchmark
# description: Show the performance of using pushdown with PieceWiseMergeJoin
# group: [pushdown]
name PieceWiseMergeJoinInequalityPushdown
group micro
subgroup pushdown
require tpch
argument sf 10
cache tpch_sf${sf}.duckdb
load
CALL dbgen(sf=${sf});
run
SELECT lhs.l_orderkey as l, rhs.l_orderkey as r
FROM lineitem lhs
INNER JOIN lineitem rhs
ON lhs.l_orderkey < rhs.l_orderkey
WHERE rhs.l_orderkey < (rhs.l_suppkey // 100);

View File

@@ -0,0 +1,21 @@
# name: benchmark/micro/pushdown/rowid_no_pushdown.benchmark
# description: Show the performance of not using rowid pushdown
# group: [pushdown]
name RowIdNoPushdown
group micro
subgroup pushdown
require tpch
cache tpch_sf10.duckdb
load
CALL dbgen(sf=10);
run
pragma disabled_optimizers='filter_pushdown';
SELECT * FROM lineitem where rowid = 500;
result IIIIIIIIIIIIIIII
487 820987 20988 2 2.00 3815.88 0.02 0.06 R F 1992-10-19 1992-11-04 1992-11-11 COLLECT COD TRUCK longside of the express theodoli

View File

@@ -0,0 +1,17 @@
# name: benchmark/micro/pushdown/rowid_no_pushdown_dynamic.benchmark
# description: Show the performance of not using rowid pushdown
# group: [pushdown]
name RowIdNoPushdownDynamic
group micro
subgroup pushdown
require tpch
cache tpch_sf10.duckdb
load
CALL dbgen(sf=10);
run
SELECT * FROM lineitem ORDER BY l_orderkey DESC LIMIT 5;

View File

@@ -0,0 +1,20 @@
# name: benchmark/micro/pushdown/rowid_pushdown.benchmark
# description: Show the performance of rowid pushdown
# group: [pushdown]
name RowIdPushdown
group micro
subgroup pushdown
require tpch
cache tpch_sf10.duckdb
load
CALL dbgen(sf=10);
run
SELECT * FROM lineitem where rowid = 500;
result IIIIIIIIIIIIIIII
487 820987 20988 2 2.00 3815.88 0.02 0.06 R F 1992-10-19 1992-11-04 1992-11-11 COLLECT COD TRUCK longside of the express theodoli

View File

@@ -0,0 +1,17 @@
# name: benchmark/micro/pushdown/rowid_pushdown_dynamic.benchmark
# description: Show the performance of rowid pushdown
# group: [pushdown]
name RowIdPushdownDynamic
group micro
subgroup pushdown
require tpch
cache tpch_sf10.duckdb
load
CALL dbgen(sf=10);
run
SELECT * FROM lineitem WHERE rowid IN (SELECT rowid FROM lineitem ORDER BY l_orderkey DESC LIMIT 5);

View File

@@ -0,0 +1,20 @@
# name: benchmark/micro/pushdown/window_partition_pushdown.benchmark
# description: measure performance improvement of pushing down filters on window paritions
# group: [pushdown]
name Window_parition
group micro
subgroup pushdown
require tpch
cache tpch_partition_lineitem.duckdb
load
CALL dbgen(sf=1);
COPY lineitem to '${BENCHMARK_DIR}/lineitem_partitioned' (FORMAT PARQUET, PARTITION_BY l_shipmode);
run
select * from (select l_shipmode, l_quantity, sum(l_quantity) OVER (PARTITION BY l_shipmode)
from read_parquet('${BENCHMARK_DIR}/lineitem_partitioned/*/*.parquet', hive_partitioning = true))
where l_shipmode = 'SHIP';