-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from samansmink/feature
Update feature branch
- Loading branch information
Showing
297 changed files
with
2,639 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
build | ||
benchmark_results | ||
duckdb_benchmark_data/ | ||
.idea | ||
cmake-build-debug | ||
duckdb_unittest_tempdir/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Benchmarking the Delta Extension | ||
|
||
## Basics | ||
A primitive benchmarking suite exists for the Delta extension. | ||
|
||
To run the benchmarks, firstly run the build using: | ||
```shell | ||
BUILD_BENCHMARK=1 make | ||
``` | ||
|
||
Then, make sure that the generated data is created using: | ||
```shell | ||
make generate-data | ||
``` | ||
|
||
Then to run a benchmark, use one of the benchmark Makefile targets prefixed with `bench-run-`: | ||
```shell | ||
make bench-run-tpch-sf1 | ||
``` | ||
Now the TPCH benchmark will be run twice, once on parquet files and once on a delta table. | ||
|
||
To create a plot from the results run: | ||
```shell | ||
make plot | ||
``` | ||
|
||
## More options | ||
Specific benchmarks can be run from a suite using the `BENCHMARK_PATTERN` variable. For example to compare | ||
only Q01 from TPCH SF1, run: | ||
```shell | ||
BENCHMARK_PATTERN=q01.benchmark make bench-run-tpch-sf1 | ||
``` | ||
|
||
Also, we can run all local benchmarks using: | ||
```shell | ||
make bench-run-all-local | ||
``` | ||
Or all remote benchmarks using | ||
```shell | ||
make bench-run-all-remote | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
.PHONY: bench-output-dir clean_benchmark plot | ||
|
||
ifeq ("$(BENCHMARK_PATTERN)a", "a") | ||
BENCHMARK_PATTERN:=.* | ||
endif | ||
|
||
bench-output-dir: | ||
mkdir -p benchmark_results | ||
|
||
clean_benchmark: | ||
rm -rf benchmark_results | ||
|
||
plot: | ||
python3 scripts/plot.py | ||
|
||
|
||
############### BENCHMARK TARGETS ############### | ||
|
||
### | ||
# TPCH LOCAL | ||
### | ||
|
||
# TPCH SF1 on delta table | ||
bench-run-tpch-sf1-delta: bench-output-dir | ||
./build/release/benchmark/benchmark_runner --root-dir './' 'benchmark/tpch/sf1-delta/$(BENCHMARK_PATTERN)' &> benchmark_results/tpch-sf1-delta.csv | ||
# TPCH SF1 on parquet files | ||
bench-run-tpch-sf1-parquet: bench-output-dir | ||
./build/release/benchmark/benchmark_runner 'benchmark/tpch/sf1-parquet/$(BENCHMARK_PATTERN)' &> benchmark_results/tpch-sf1-parquet.csv | ||
# TPCH SF1 on duckdb file | ||
bench-run-tpch-sf1-duckdb: bench-output-dir | ||
./build/release/benchmark/benchmark_runner 'benchmark/tpch/sf1/$(BENCHMARK_PATTERN)' &> benchmark_results/tpch-sf1-duckdb.csv | ||
# COMPARES TPCH SF1 on parquet file vs on delta files | ||
bench-run-tpch-sf1: bench-run-tpch-sf1-delta bench-run-tpch-sf1-parquet | ||
|
||
### | ||
# TPCH REMOTE | ||
### | ||
|
||
# TPCH on remote delta table (set BENCHMARK_DATA_S3_LINEITEM_SF1) | ||
bench-run-tpch-sf1-remote-delta: bench-output-dir | ||
./build/release/benchmark/benchmark_runner --root-dir './' 'benchmark/tpch/sf1-delta-remote/$(BENCHMARK_PATTERN)' &> benchmark_results/tpch-sf1-remote-delta.csv | ||
# TPCH on remote parquet table (set BENCHMARK_DATA_S3_LINEITEM_SF1) | ||
bench-run-tpch-sf1-remote-parquet: bench-output-dir | ||
./build/release/benchmark/benchmark_runner --root-dir './' 'benchmark/tpch/sf1-parquet-remote/$(BENCHMARK_PATTERN)' &> benchmark_results/tpch-sf1-remote-parquet.csv | ||
# COMPARES TPCH SF1 on parquet file vs on delta files | ||
bench-run-tpch-sf1-remote: bench-run-tpch-sf1-remote-parquet bench-run-tpch-sf1-remote-delta | ||
|
||
### | ||
# TPCDS LOCAL | ||
### | ||
|
||
# TPCDS SF1 on delta table | ||
bench-run-tpcds-sf1-delta: bench-output-dir | ||
./build/release/benchmark/benchmark_runner --root-dir './' 'benchmark/tpcds/sf1-delta/$(BENCHMARK_PATTERN)' &> benchmark_results/tpcds-sf1-delta.csv | ||
# TPCDS SF1 on parquet files | ||
bench-run-tpcds-sf1-parquet: bench-output-dir | ||
./build/release/benchmark/benchmark_runner --root-dir './' 'benchmark/tpcds/sf1-parquet/$(BENCHMARK_PATTERN)' &> benchmark_results/tpcds-sf1-parquet.csv | ||
# TPCDS SF1 on duckdb files | ||
bench-run-tpcds-sf1-duckdb: bench-output-dir | ||
./build/release/benchmark/benchmark_runner 'benchmark/tpcds/sf1/$(BENCHMARK_PATTERN)' &> benchmark_results/tpcds-sf1-duckdb.csv | ||
|
||
# COMPARES TPCDS SF1 on parquet file vs on delta files | ||
bench-run-tpcds-sf1: bench-run-tpcds-sf1-delta bench-run-tpcds-sf1-parquet | ||
|
||
### | ||
# ALL | ||
### | ||
bench-run-all-local: bench-run-tpcds-sf1 bench-run-tpch-sf1 | ||
|
||
bench-run-all-remote: bench-run-tpch-sf1-remote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
create view call_center as from delta_scan('./data/generated/tpcds_sf1/call_center/delta_lake'); | ||
create view catalog_page as from delta_scan('./data/generated/tpcds_sf1/catalog_page/delta_lake'); | ||
create view catalog_returns as from delta_scan('./data/generated/tpcds_sf1/catalog_returns/delta_lake'); | ||
create view catalog_sales as from delta_scan('./data/generated/tpcds_sf1/catalog_sales/delta_lake'); | ||
create view customer as from delta_scan('./data/generated/tpcds_sf1/customer/delta_lake'); | ||
create view customer_demographics as from delta_scan('./data/generated/tpcds_sf1/customer_demographics/delta_lake'); | ||
create view customer_address as from delta_scan('./data/generated/tpcds_sf1/customer_address/delta_lake'); | ||
create view date_dim as from delta_scan('./data/generated/tpcds_sf1/date_dim/delta_lake'); | ||
create view household_demographics as from delta_scan('./data/generated/tpcds_sf1/household_demographics/delta_lake'); | ||
create view inventory as from delta_scan('./data/generated/tpcds_sf1/inventory/delta_lake'); | ||
create view income_band as from delta_scan('./data/generated/tpcds_sf1/income_band/delta_lake'); | ||
create view item as from delta_scan('./data/generated/tpcds_sf1/item/delta_lake'); | ||
create view promotion as from delta_scan('./data/generated/tpcds_sf1/promotion/delta_lake'); | ||
create view reason as from delta_scan('./data/generated/tpcds_sf1/reason/delta_lake'); | ||
create view ship_mode as from delta_scan('./data/generated/tpcds_sf1/ship_mode/delta_lake'); | ||
create view store as from delta_scan('./data/generated/tpcds_sf1/store/delta_lake'); | ||
create view store_returns as from delta_scan('./data/generated/tpcds_sf1/store_returns/delta_lake'); | ||
create view store_sales as from delta_scan('./data/generated/tpcds_sf1/store_sales/delta_lake'); | ||
create view time_dim as from delta_scan('./data/generated/tpcds_sf1/time_dim/delta_lake'); | ||
create view warehouse as from delta_scan('./data/generated/tpcds_sf1/warehouse/delta_lake'); | ||
create view web_page as from delta_scan('./data/generated/tpcds_sf1/web_page/delta_lake'); | ||
create view web_returns as from delta_scan('./data/generated/tpcds_sf1/web_returns/delta_lake'); | ||
create view web_sales as from delta_scan('./data/generated/tpcds_sf1/web_sales/delta_lake'); | ||
create view web_site as from delta_scan('./data/generated/tpcds_sf1/web_site/delta_lake'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# name: benchmark/tpcds/sf1/q01.benchmark | ||
# description: Run query 01 from the TPC-DS benchmark | ||
# group: [sf1] | ||
|
||
template benchmark/tpcds/sf1-delta/tpcds_sf1.benchmark.in | ||
QUERY_NUMBER=1 | ||
QUERY_NUMBER_PADDED=01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# name: benchmark/tpcds/sf1/q02.benchmark | ||
# description: Run query 02 from the TPC-DS benchmark | ||
# group: [sf1] | ||
|
||
template benchmark/tpcds/sf1-delta/tpcds_sf1.benchmark.in | ||
QUERY_NUMBER=2 | ||
QUERY_NUMBER_PADDED=02 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# name: benchmark/tpcds/sf1/q03.benchmark | ||
# description: Run query 03 from the TPC-DS benchmark | ||
# group: [sf1] | ||
|
||
template benchmark/tpcds/sf1-delta/tpcds_sf1.benchmark.in | ||
QUERY_NUMBER=3 | ||
QUERY_NUMBER_PADDED=03 |
Oops, something went wrong.