should be it
This commit is contained in:
13
external/duckdb/benchmark/micro/aggregate/any_value_uuid.benchmark
vendored
Normal file
13
external/duckdb/benchmark/micro/aggregate/any_value_uuid.benchmark
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# name: benchmark/micro/aggregate/any_value_uuid.benchmark
|
||||
# description: ANY_VALUE(uuid) over a bunch of uuids
|
||||
# group: [aggregate]
|
||||
|
||||
name Any Value (UUID)
|
||||
group aggregate
|
||||
|
||||
load
|
||||
CREATE TABLE t AS SELECT uuid() AS uuid FROM range(100000000) tbl(i);
|
||||
|
||||
run
|
||||
SELECT ANY_VALUE(uuid) FROM t;
|
||||
|
||||
15
external/duckdb/benchmark/micro/aggregate/bitstring_aggregate.benchmark
vendored
Normal file
15
external/duckdb/benchmark/micro/aggregate/bitstring_aggregate.benchmark
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# name: benchmark/micro/aggregate/bitstring_aggregate.benchmark
|
||||
# description: Count distinct values using bitstring_agg function
|
||||
# group: [aggregate]
|
||||
|
||||
name distinct count with bitstring_agg
|
||||
group aggregate
|
||||
|
||||
load
|
||||
CREATE TABLE ints AS SELECT i % 1000 col FROM range(0, 100000000, 5) tbl(i);
|
||||
|
||||
run
|
||||
SELECT bit_count(bitstring_agg(col)) FROM ints
|
||||
|
||||
result I
|
||||
200
|
||||
15
external/duckdb/benchmark/micro/aggregate/bitwise_aggregate.benchmark
vendored
Normal file
15
external/duckdb/benchmark/micro/aggregate/bitwise_aggregate.benchmark
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# name: benchmark/micro/aggregate/bitwise_aggregate.benchmark
|
||||
# description: BIT_AND over a bunch of bitstrings
|
||||
# group: [aggregate]
|
||||
|
||||
name Bit string Bitwise AND (Ungrouped)
|
||||
group aggregate
|
||||
|
||||
load
|
||||
CREATE TABLE bits AS SELECT printf('%032b', 1000 + (i % 5))::BIT col FROM range(0, 1000000) tbl(i);
|
||||
|
||||
run
|
||||
SELECT BIT_AND(col) FROM bits
|
||||
|
||||
result I
|
||||
00000000000000000000001111101000
|
||||
13
external/duckdb/benchmark/micro/aggregate/constant_aggregate.benchmark
vendored
Normal file
13
external/duckdb/benchmark/micro/aggregate/constant_aggregate.benchmark
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# name: benchmark/micro/aggregate/constant_aggregate.benchmark
|
||||
# description: Aggregate Over Constant Groups
|
||||
# group: [aggregate]
|
||||
|
||||
name Aggregate Over Constant Vectors
|
||||
group aggregate
|
||||
storage persistent
|
||||
|
||||
load
|
||||
CREATE TABLE t AS SELECT DATE '1900-01-01' + INTERVAL (i // 50000) MONTH grp, i FROM range(100_000_000) tbl(i);
|
||||
|
||||
run
|
||||
SELECT grp, SUM(i) FROM t GROUP BY ALL ORDER BY ALL
|
||||
115
external/duckdb/benchmark/micro/aggregate/dictionary_aggregate.benchmark
vendored
Normal file
115
external/duckdb/benchmark/micro/aggregate/dictionary_aggregate.benchmark
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
# name: benchmark/micro/aggregate/dictionary_aggregate.benchmark
|
||||
# description: Aggregate Over Dictionary Vectors
|
||||
# group: [aggregate]
|
||||
|
||||
name Aggregate Over Dictionary Vectors
|
||||
group aggregate
|
||||
storage persistent
|
||||
|
||||
load
|
||||
CREATE TABLE t AS SELECT CONCAT('thisisastringwithrepetitions', i%100) AS grp, i FROM range(100_000_000) tbl(i);
|
||||
|
||||
run
|
||||
SELECT grp, SUM(i) FROM t GROUP BY ALL ORDER BY ALL
|
||||
|
||||
result II
|
||||
thisisastringwithrepetitions0 49999950000000
|
||||
thisisastringwithrepetitions1 49999951000000
|
||||
thisisastringwithrepetitions10 49999960000000
|
||||
thisisastringwithrepetitions11 49999961000000
|
||||
thisisastringwithrepetitions12 49999962000000
|
||||
thisisastringwithrepetitions13 49999963000000
|
||||
thisisastringwithrepetitions14 49999964000000
|
||||
thisisastringwithrepetitions15 49999965000000
|
||||
thisisastringwithrepetitions16 49999966000000
|
||||
thisisastringwithrepetitions17 49999967000000
|
||||
thisisastringwithrepetitions18 49999968000000
|
||||
thisisastringwithrepetitions19 49999969000000
|
||||
thisisastringwithrepetitions2 49999952000000
|
||||
thisisastringwithrepetitions20 49999970000000
|
||||
thisisastringwithrepetitions21 49999971000000
|
||||
thisisastringwithrepetitions22 49999972000000
|
||||
thisisastringwithrepetitions23 49999973000000
|
||||
thisisastringwithrepetitions24 49999974000000
|
||||
thisisastringwithrepetitions25 49999975000000
|
||||
thisisastringwithrepetitions26 49999976000000
|
||||
thisisastringwithrepetitions27 49999977000000
|
||||
thisisastringwithrepetitions28 49999978000000
|
||||
thisisastringwithrepetitions29 49999979000000
|
||||
thisisastringwithrepetitions3 49999953000000
|
||||
thisisastringwithrepetitions30 49999980000000
|
||||
thisisastringwithrepetitions31 49999981000000
|
||||
thisisastringwithrepetitions32 49999982000000
|
||||
thisisastringwithrepetitions33 49999983000000
|
||||
thisisastringwithrepetitions34 49999984000000
|
||||
thisisastringwithrepetitions35 49999985000000
|
||||
thisisastringwithrepetitions36 49999986000000
|
||||
thisisastringwithrepetitions37 49999987000000
|
||||
thisisastringwithrepetitions38 49999988000000
|
||||
thisisastringwithrepetitions39 49999989000000
|
||||
thisisastringwithrepetitions4 49999954000000
|
||||
thisisastringwithrepetitions40 49999990000000
|
||||
thisisastringwithrepetitions41 49999991000000
|
||||
thisisastringwithrepetitions42 49999992000000
|
||||
thisisastringwithrepetitions43 49999993000000
|
||||
thisisastringwithrepetitions44 49999994000000
|
||||
thisisastringwithrepetitions45 49999995000000
|
||||
thisisastringwithrepetitions46 49999996000000
|
||||
thisisastringwithrepetitions47 49999997000000
|
||||
thisisastringwithrepetitions48 49999998000000
|
||||
thisisastringwithrepetitions49 49999999000000
|
||||
thisisastringwithrepetitions5 49999955000000
|
||||
thisisastringwithrepetitions50 50000000000000
|
||||
thisisastringwithrepetitions51 50000001000000
|
||||
thisisastringwithrepetitions52 50000002000000
|
||||
thisisastringwithrepetitions53 50000003000000
|
||||
thisisastringwithrepetitions54 50000004000000
|
||||
thisisastringwithrepetitions55 50000005000000
|
||||
thisisastringwithrepetitions56 50000006000000
|
||||
thisisastringwithrepetitions57 50000007000000
|
||||
thisisastringwithrepetitions58 50000008000000
|
||||
thisisastringwithrepetitions59 50000009000000
|
||||
thisisastringwithrepetitions6 49999956000000
|
||||
thisisastringwithrepetitions60 50000010000000
|
||||
thisisastringwithrepetitions61 50000011000000
|
||||
thisisastringwithrepetitions62 50000012000000
|
||||
thisisastringwithrepetitions63 50000013000000
|
||||
thisisastringwithrepetitions64 50000014000000
|
||||
thisisastringwithrepetitions65 50000015000000
|
||||
thisisastringwithrepetitions66 50000016000000
|
||||
thisisastringwithrepetitions67 50000017000000
|
||||
thisisastringwithrepetitions68 50000018000000
|
||||
thisisastringwithrepetitions69 50000019000000
|
||||
thisisastringwithrepetitions7 49999957000000
|
||||
thisisastringwithrepetitions70 50000020000000
|
||||
thisisastringwithrepetitions71 50000021000000
|
||||
thisisastringwithrepetitions72 50000022000000
|
||||
thisisastringwithrepetitions73 50000023000000
|
||||
thisisastringwithrepetitions74 50000024000000
|
||||
thisisastringwithrepetitions75 50000025000000
|
||||
thisisastringwithrepetitions76 50000026000000
|
||||
thisisastringwithrepetitions77 50000027000000
|
||||
thisisastringwithrepetitions78 50000028000000
|
||||
thisisastringwithrepetitions79 50000029000000
|
||||
thisisastringwithrepetitions8 49999958000000
|
||||
thisisastringwithrepetitions80 50000030000000
|
||||
thisisastringwithrepetitions81 50000031000000
|
||||
thisisastringwithrepetitions82 50000032000000
|
||||
thisisastringwithrepetitions83 50000033000000
|
||||
thisisastringwithrepetitions84 50000034000000
|
||||
thisisastringwithrepetitions85 50000035000000
|
||||
thisisastringwithrepetitions86 50000036000000
|
||||
thisisastringwithrepetitions87 50000037000000
|
||||
thisisastringwithrepetitions88 50000038000000
|
||||
thisisastringwithrepetitions89 50000039000000
|
||||
thisisastringwithrepetitions9 49999959000000
|
||||
thisisastringwithrepetitions90 50000040000000
|
||||
thisisastringwithrepetitions91 50000041000000
|
||||
thisisastringwithrepetitions92 50000042000000
|
||||
thisisastringwithrepetitions93 50000043000000
|
||||
thisisastringwithrepetitions94 50000044000000
|
||||
thisisastringwithrepetitions95 50000045000000
|
||||
thisisastringwithrepetitions96 50000046000000
|
||||
thisisastringwithrepetitions97 50000047000000
|
||||
thisisastringwithrepetitions98 50000048000000
|
||||
thisisastringwithrepetitions99 50000049000000
|
||||
15
external/duckdb/benchmark/micro/aggregate/group_two_string_dictionaries.benchmark
vendored
Normal file
15
external/duckdb/benchmark/micro/aggregate/group_two_string_dictionaries.benchmark
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# name: benchmark/micro/aggregate/group_two_string_dictionaries.benchmark
|
||||
# description: Group by two string dictionary columns (test string dictionary hash cache)
|
||||
# group: [aggregate]
|
||||
|
||||
name Group by two string dictionary columns
|
||||
group aggregate
|
||||
storage persistent
|
||||
|
||||
load
|
||||
create or replace table test as
|
||||
select format('{:a>256}', cast(range % 100 as varchar)) a256, a256 b256,
|
||||
from range(10_000_000);
|
||||
|
||||
run
|
||||
select a256, b256 from test group by all;
|
||||
39
external/duckdb/benchmark/micro/aggregate/grouped_distinct.benchmark
vendored
Normal file
39
external/duckdb/benchmark/micro/aggregate/grouped_distinct.benchmark
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# name: benchmark/micro/aggregate/grouped_distinct.benchmark
|
||||
# description: SUM(i) over a bunch of integers
|
||||
# group: [aggregate]
|
||||
|
||||
name Integer Sum (Grouped)
|
||||
group aggregate
|
||||
|
||||
load
|
||||
CREATE TABLE integers AS SELECT i % 5 AS i, i % 25 as j FROM range(0, 10000000) tbl(i);
|
||||
|
||||
run
|
||||
SELECT SUM(distinct i), COUNT(distinct i), AVG(distinct i), PRODUCT(distinct i) FROM integers group by j order by all
|
||||
|
||||
result IIII
|
||||
0 1 0.0 0.0
|
||||
0 1 0.0 0.0
|
||||
0 1 0.0 0.0
|
||||
0 1 0.0 0.0
|
||||
0 1 0.0 0.0
|
||||
1 1 1.0 1.0
|
||||
1 1 1.0 1.0
|
||||
1 1 1.0 1.0
|
||||
1 1 1.0 1.0
|
||||
1 1 1.0 1.0
|
||||
2 1 2.0 2.0
|
||||
2 1 2.0 2.0
|
||||
2 1 2.0 2.0
|
||||
2 1 2.0 2.0
|
||||
2 1 2.0 2.0
|
||||
3 1 3.0 3.0
|
||||
3 1 3.0 3.0
|
||||
3 1 3.0 3.0
|
||||
3 1 3.0 3.0
|
||||
3 1 3.0 3.0
|
||||
4 1 4.0 4.0
|
||||
4 1 4.0 4.0
|
||||
4 1 4.0 4.0
|
||||
4 1 4.0 4.0
|
||||
4 1 4.0 4.0
|
||||
19
external/duckdb/benchmark/micro/aggregate/ordered_first.benchmark
vendored
Normal file
19
external/duckdb/benchmark/micro/aggregate/ordered_first.benchmark
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# name: benchmark/micro/aggregate/ordered_first.benchmark
|
||||
# description: FIRST(i ORDER BY i) over a bunch of integers
|
||||
# group: [aggregate]
|
||||
|
||||
name Ordered First (Grouped)
|
||||
group aggregate
|
||||
|
||||
load
|
||||
CREATE TABLE t AS FROM range(10000000) tbl(i);
|
||||
|
||||
run
|
||||
SELECT SUM(agg) FROM (
|
||||
SELECT i // 2048 AS grp, FIRST(i ORDER BY i DESC) AS agg
|
||||
FROM t
|
||||
GROUP BY ALL
|
||||
)
|
||||
|
||||
result I
|
||||
24420932461
|
||||
12
external/duckdb/benchmark/micro/aggregate/quantile/quantile.benchmark
vendored
Normal file
12
external/duckdb/benchmark/micro/aggregate/quantile/quantile.benchmark
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# name: benchmark/micro/aggregate/quantile/quantile.benchmark
|
||||
# description: Quantile Function
|
||||
# group: [quantile]
|
||||
|
||||
name Quantile
|
||||
group quantile
|
||||
|
||||
load
|
||||
create table quantile as select range r, random() from range(10000000) union all values (NULL, 0.1), (NULL, 0.5), (NULL, 0.9) order by 2;
|
||||
|
||||
run
|
||||
SELECT quantile(r, 0.5) FROM quantile
|
||||
14
external/duckdb/benchmark/micro/aggregate/quantile/quantile_approx.benchmark
vendored
Normal file
14
external/duckdb/benchmark/micro/aggregate/quantile/quantile_approx.benchmark
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
# name: benchmark/micro/aggregate/quantile/quantile_approx.benchmark
|
||||
# description: Approximate Quantile Function
|
||||
# group: [quantile]
|
||||
|
||||
name Approximate Quantile
|
||||
group aggregate
|
||||
|
||||
load
|
||||
create table quantile as select range r, random() from range(10000000) union all values (NULL, 0.1), (NULL, 0.5), (NULL, 0.9) order by 2;
|
||||
|
||||
run
|
||||
SELECT approx_quantile(r, 0.5) FROM quantile
|
||||
|
||||
|
||||
13
external/duckdb/benchmark/micro/aggregate/quantile/quantile_many.benchmark
vendored
Normal file
13
external/duckdb/benchmark/micro/aggregate/quantile/quantile_many.benchmark
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# name: benchmark/micro/aggregate/quantile/quantile_many.benchmark
|
||||
# description: Quantile Function
|
||||
# group: [quantile]
|
||||
|
||||
name Quantile Many Groups
|
||||
group quantile
|
||||
|
||||
load
|
||||
create table quantile as select range r, random() from range(10000000) union all values (NULL, 0.1), (NULL, 0.5), (NULL, 0.9) order by 2;
|
||||
|
||||
run
|
||||
SELECT quantile(r, 0.5) FROM quantile GROUP BY r % 100000
|
||||
|
||||
15
external/duckdb/benchmark/micro/aggregate/quantile/quantile_sampling.benchmark
vendored
Normal file
15
external/duckdb/benchmark/micro/aggregate/quantile/quantile_sampling.benchmark
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# name: benchmark/micro/aggregate/quantile/quantile_sampling.benchmark
|
||||
# description: Quantile Function With Sampling
|
||||
# group: [quantile]
|
||||
|
||||
name Quantile With Sampling
|
||||
group quantile
|
||||
|
||||
load
|
||||
create table quantile as select range r, random() from range(10000000) union all values (NULL, 0.1), (NULL, 0.5), (NULL, 0.9) order by 2;
|
||||
|
||||
run
|
||||
SELECT reservoir_quantile(r, 0.5) FROM quantile
|
||||
|
||||
|
||||
|
||||
15
external/duckdb/benchmark/micro/aggregate/simple_aggregate.benchmark
vendored
Normal file
15
external/duckdb/benchmark/micro/aggregate/simple_aggregate.benchmark
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# name: benchmark/micro/aggregate/simple_aggregate.benchmark
|
||||
# description: SUM(i) over a bunch of integers
|
||||
# group: [aggregate]
|
||||
|
||||
name Integer Sum (Ungrouped)
|
||||
group aggregate
|
||||
|
||||
load
|
||||
CREATE TABLE integers AS SELECT i % 5 AS i FROM range(0, 10000000) tbl(i);
|
||||
|
||||
run
|
||||
SELECT SUM(i) FROM integers
|
||||
|
||||
result I
|
||||
20000000
|
||||
15
external/duckdb/benchmark/micro/aggregate/simple_distinct.benchmark
vendored
Normal file
15
external/duckdb/benchmark/micro/aggregate/simple_distinct.benchmark
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# name: benchmark/micro/aggregate/simple_distinct.benchmark
|
||||
# description: SUM(i) over a bunch of integers
|
||||
# group: [aggregate]
|
||||
|
||||
name Integer Sum (Ungrouped)
|
||||
group aggregate
|
||||
|
||||
load
|
||||
CREATE TABLE integers AS SELECT i % 5 AS i FROM range(0, 10000000) tbl(i);
|
||||
|
||||
run
|
||||
SELECT SUM(distinct i), COUNT(distinct i), AVG(distinct i), PRODUCT(distinct i) FROM integers
|
||||
|
||||
result IIII
|
||||
10 5 2 0
|
||||
19
external/duckdb/benchmark/micro/aggregate/simple_group.benchmark
vendored
Normal file
19
external/duckdb/benchmark/micro/aggregate/simple_group.benchmark
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# name: benchmark/micro/aggregate/simple_group.benchmark
|
||||
# description: SUM(i) over integer, grouped by integer
|
||||
# group: [aggregate]
|
||||
|
||||
name Integer Sum (Grouped)
|
||||
group aggregate
|
||||
|
||||
load
|
||||
CREATE TABLE integers AS SELECT i % 5 AS i, i % 100 AS j FROM range(0, 10000000) tbl(i);
|
||||
|
||||
run
|
||||
SELECT i, SUM(j) FROM integers GROUP BY i ORDER BY i
|
||||
|
||||
result II
|
||||
0 95000000
|
||||
1 97000000
|
||||
2 99000000
|
||||
3 101000000
|
||||
4 103000000
|
||||
17
external/duckdb/benchmark/micro/aggregate/sorted_last.benchmark
vendored
Normal file
17
external/duckdb/benchmark/micro/aggregate/sorted_last.benchmark
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# name: benchmark/micro/aggregate/sorted_last.benchmark
|
||||
# description: LAST with ORDER BY
|
||||
# group: [aggregate]
|
||||
|
||||
load
|
||||
SELECT SETSEED(0.8675309);
|
||||
CREATE TABLE df AS
|
||||
SELECT
|
||||
'2019-01-01 00:00:00'::TIMESTAMP + INTERVAL (FLOOR(RANDOM() * 25000)::INT * 20) MINUTE AS time,
|
||||
RANDOM()::DECIMAL(18, 17) AS value,
|
||||
FLOOR(RANDOM() * 300)::INT AS id
|
||||
FROM range(70000000);
|
||||
|
||||
run
|
||||
SELECT time::DATE, id, last(value ORDER BY time ASC)
|
||||
FROM df
|
||||
GROUP BY ALL
|
||||
Reference in New Issue
Block a user