run - Run Benchmarks
The primary command for executing benchmarks. Supports interactive mode, direct execution, and various execution phases.
Basic Syntax
benchbox run [OPTIONS]Core Options
Platform and Benchmark Selection:
--platform TEXT: Platform type- SQL platforms:
duckdb,sqlite,databricks,bigquery,snowflake,redshift,clickhouse,datafusion,polars,trino,presto - DataFrame platforms:
polars-df,pandas-df,pyspark-df,datafusion-df(see DataFrame Platforms)
- SQL platforms:
--benchmark TEXT: Benchmark name (tpch, tpcds, tpcdi, ssb, clickbench, h2odb, etc.)--scale FLOAT: Scale factor for data generation (default: 0.01)
Execution Control:
--phases TEXT: Benchmark phases to run (default: “power”)- Available phases:
generate- Generate benchmark data filesload- Load data into databasewarmup- Run warmup queries (optional, prepares caches)power- Sequential query execution (Power Test)throughput- Concurrent query execution (Throughput Test)maintenance- Data modification operations (DATABASE RELOAD REQUIRED AFTER) - See TPC-H Maintenance or TPC-DS Maintenance
- Use comma-separated list:
--phases generate,load,power - Warning: Maintenance phase permanently modifies data; reload database before running power/throughput again
- Note: the number of concurrent streams for the
throughputphase is set with--streams N(an advanced option listed bybenchbox run --help-topic all;--concurrency Nis accepted as an alias). The deprecatedrun-officialcommand also spells the setting--streams— see Deprecated:run-officialbelow.
- Available phases:
--force [MODE]: Force regeneration of data (modes:all,datagen,upload, ordatagen,upload)--non-interactive: Use defaults for all prompts (useful for automation)
Output and Paths:
--output TEXT: Output directory (supports local paths and cloud storage: s3://, gs://, abfss://)--dry-run OUTPUT_DIR: Preview configuration and queries without execution
Query Configuration:
--seed INTEGER: An RNG seed for query parameter generation (power/throughput tests)--queries TEXT: Run specific queries in specified order (comma-separated IDs: “1,6,17”)- Constraints:
- Max 100 queries per run
- Alphanumeric IDs only (letters, numbers, dash, underscore; max 20 chars each)
- Only works with
powerandstandardphases (errors if used with ONLY incompatible phases) - Duplicates automatically removed
- Order preserved as specified
- TPC Compliance: Breaks official TPC-H/TPC-DS compliance (overrides stream permutations)
- Valid Ranges: TPC-H (1-22), TPC-DS (1-99), SSB (1-13)
- Examples:
The first example runs a single query for debugging. The second runs several queries in the order given. The third adds verbose logging for development.
Terminal window benchbox run --platform duckdb --benchmark tpch --queries "Q6"benchbox run --platform postgres --benchmark tpch --queries "Q1,Q6,Q17"benchbox run --platform duckdb --benchmark tpcds --queries "Q42" --verbose --phases power
- Constraints:
Tuning and Optimization:
--tuning TEXT: Tuning mode (default: “notuning”)tuned: Enable optimizations (constraints for SQL, parallelism for DataFrame)notuning: Disable for baseline comparisonauto: Auto-detect optimal settings based on system profile- Path to config file: Custom tuning configuration (YAML)
Data Compression (Advanced):
--compression TEXT: Compression configuration (e.g.,zstd,zstd:9,gzip:6,none)- Format:
TYPEorTYPE:LEVEL - Types:
zstd(default),gzip,none - Levels: 1-9 for gzip, 1-22 for zstd
- Format:
Validation (Advanced):
--validation TEXT: Validation modeexact: Exact row count validation (default)loose: Loose validation (±5% tolerance)range: Min/max bounds validationdisabled: No validationfull: All validation checks enabled (preflight, postgen, postload, platform check)preflight,postgen,postload,check-platforms: Individual validation types
--strict-translation: Fail instead of falling back when SQL dialect translation cannot produce target SQL--client-region TEXT: Attested client cloud region (e.g.us-east-1), recorded inenvironment.client_linkwithsource: "cli_option"--client-cloud TEXT: Attested client cloud provider (aws,gcp,azure)--no-link-probe: Disable the post-benchmark statement overhead probe (6 meteredSELECT 1statements on billable warehouses)
Platform-Specific Configuration:
--platform-option KEY=VALUE: Platform-specific option (can be used multiple times)- Use
benchbox platforms status <name>to view platform details - Universal keys available on all platforms:
driver_version- pin the Python driver package version (e.g.1.2.0)driver_auto_install- auto-install the requested driver via uv if missing (true/false)
- Athena Spark only:
runtime_version- record the Spark engine version you expect (e.g.PySpark engine version 3); the workgroup sets the version and BenchBox records this value as requested
Benchmark-Specific Configuration:
-
--benchmark-option KEY=VALUE: Benchmark-specific option (can be used multiple times) -
Run
benchbox run --help-topic benchmarksto see all available options per benchmark -
Selected benchmarks and their options:
Benchmark Option Default Description nyctaxitaxi_types- Taxi types to load: yellow,green,hvfhv(comma-separated)nyctaxiyear2019Year of TLC data (2019-2025) nyctaximonths- Months to include, comma-separated (1-12) nyctaxiseed- Random seed for reproducibility nyctaxiforce_regenerate- Force data regeneration ( true/false)tpch_skewskew_presetmoderateSkew distribution: none,light,moderate,heavy,extreme,realistictpch_skewforce_regenerate- Force data regeneration tsbs_devopsnum_hosts- Number of simulated hosts tsbs_devopsduration_days- Duration in days for data generation tsbs_devopsinterval_seconds10Measurement interval in seconds tsbs_devopsstart_time- Start time ISO format (e.g. 2019-01-01T00:00:00)tsbs_devopsseed- Random seed for reproducibility tsbs_devopsforce_regenerate- Force data regeneration ( true/false)datavaulthash_algorithmmd5Hash algorithm for hub/link keys: md5,sha256datavaultrecord_sourceTPCHRecord source identifier for audit columns datavaultforce_regenerate- Force data regeneration ( true/false)flightdataend_yearlatest Last year of flight data to include flightdataseed- Random seed for reproducibility flightdataforce_regenerate- Force data regeneration ( true/false)joinorderqueries_dir- Directory containing custom query files; defaults to the embedded 113 canonical JOB queries joinorderforce_regenerate- Clear and refetch verified canonical data ( true/false);joinorderstill requires--scale 1tpcdienable_parallelfalseEnable parallel processing for ETL tpcdimax_workers- Maximum number of parallel workers tpcds_obtdimension_modefullOBT dimension mode: full,minimaltpcds_obtchannels- Sales channels: store,web,catalog(comma-separated)tpcds_obtoutput_formatparquetOutput format: dat,parquettpcds_obttpcds_source_dir- Directory containing TPC-DS source data tpcds_obtforce_regenerate- Force data regeneration ( true/false)vector_searchdimensions1536Embedding vector dimensions Most options also accept a hyphenated alias (e.g.
taxi-typesfortaxi_types).
Logging and Output:
--verbose,-v: Enable verbose logging (use-vvfor very verbose)--quiet,-q: Suppress all output (overrides verbose flags)
Help System:
-h, --help: Show common options--help-topic all: Show all options including advanced--help-topic examples: Show categorized usage examples--help-topic benchmarks: Show benchmark-specific options (see--benchmark-optionbelow)
Usage Examples
Basic Local Benchmark
benchbox run --platform duckdb --benchmark tpch --scale 0.01
benchbox run --platform duckdb --benchmark tpchThe first command is a simple TPC-H benchmark on DuckDB. The second uses the default settings.
Cloud Platform Examples
benchbox run --platform databricks --benchmark tpch --scale 0.1 \ --output dbfs:/Volumes/workspace/raw/benchmarks/
benchbox run --platform bigquery --benchmark tpcds --scale 0.01 \ --verbose --phases power
benchbox run --platform snowflake --benchmark tpch --scale 1 \ --tuning tunedThe examples use Databricks with a custom output location, BigQuery with verbose logging, and Snowflake with tuning enabled.
DataFrame Platform Examples
benchbox run --platform polars-df --benchmark tpch --scale 1 \ --tuning auto
benchbox run --platform pandas-df --benchmark tpch --scale 0.1 \ --platform-option dtype_backend=pyarrow
benchbox run --platform pyspark-df --benchmark tpch --scale 1 \ --platform-option driver_memory=8g
benchbox run --platform polars --benchmark tpch --scale 0.1benchbox run --platform polars-df --benchmark tpch --scale 0.1The examples use Polars DataFrame with auto-tuning, Pandas DataFrame with the PyArrow backend, and PySpark DataFrame in local mode. The last two commands compare SQL mode (polars) against DataFrame mode (polars-df) on the same workload.
Advanced Phase Control
benchbox run --benchmark tpch --scale 0.1 --phases generate \ --output ./tpch-data
benchbox run --platform duckdb --benchmark tpch --scale 0.1 \ --phases load
benchbox run --platform duckdb --benchmark tpcds --scale 0.01 \ --phases power,throughput --seed 42The commands, in order, generate data only, load data into the database, and run the full TPC-DS power and throughput test.
Dry Run and Preview
benchbox run --platform duckdb --benchmark tpch --scale 0.1 \ --dry-run ./preview
benchbox run --platform snowflake --benchmark tpcds \ --phases power --dry-run ./debug --seed 7The first command previews the configuration without running it. The second previews with a specific seed so the queries are reproducible.
Benchmark-Specific Options
benchbox run --platform duckdb --benchmark nyctaxi \ --benchmark-option taxi_types=yellow,green \ --benchmark-option year=2022
benchbox run --platform duckdb --benchmark tpch_skew --scale 1 \ --benchmark-option skew_preset=heavy
benchbox run --platform duckdb --benchmark tsbs_devops \ --benchmark-option num_hosts=100 \ --benchmark-option interval_seconds=30
benchbox run --platform duckdb --benchmark tpcdi \ --benchmark-option enable_parallel=true \ --benchmark-option max_workers=4
benchbox run --platform duckdb --benchmark datavault \ --benchmark-option hash_algorithm=sha256
benchbox run --help-topic benchmarksThe examples, in order:
- NYC Taxi: load only yellow and green trips from 2022.
- TPC-H Skew: use the heavy skew distribution.
- TSBS Devops: set a custom host count and interval.
- TPC-DI: enable parallel ETL with 4 workers.
- Data Vault: use SHA-256 hashing.
- The last command lists all benchmark options.
Platform-Specific Options
benchbox run --platform clickhouse-server --benchmark tpch \ --platform-option secure=true \ --platform-option port=9440
benchbox run --platform duckdb --benchmark tpch \ --platform-option driver_version=1.2.0 \ --platform-option driver_auto_install=true
benchbox run --platform athena-spark --benchmark tpch --scale 1.0 \ --platform-option compute_resource=my-spark-workgroup \ --platform-option s3_staging_dir=s3://my-bucket/benchbox \ --platform-option "runtime_version=PySpark engine version 3"
benchbox platforms status clickhouseThe examples, in order:
- ClickHouse server over TLS on port 9440. The platform name picks the deployment (
clickhouse-localfor embedded chDB); themodeoption is a deprecated alias. - Pin the driver version, which works on any platform.
- Athena Spark: run in a Spark-enabled workgroup and record the engine version it is configured with.
- The last command shows platform details and capabilities.
Table Storage Options
Table Mode:
--table-mode [native|external]: How tables are created (default:native)native: Standard materialized tables in the target databaseexternal: External table or view references (e.g., Parquet-backed)- Note: Incompatible with
--tuning tunedwhen set toexternal
Table Format:
--table-format TEXT: Open table format for data files- Format:
FORMAT[:COMPRESSION[:PARTITION:COLS...]] - Examples:
parquet,delta:snappy,iceberg:zstd,vortex - Supported formats depend on the platform adapter
- Format:
Pre-sorted Data:
--presort [parquet-sorted|delta-sorted|iceberg-sorted]: Pre-sort data into open table formats- Only valid for TPC-H and TPC-DS benchmarks
- TPC-H sorts on
lineitem.l_shipdate; TPC-DS sorts onstore_sales.ss_sold_date_sk
Cloud Sorted Ingestion Options
These flags control cloud data-organization strategy selection across supported cloud warehouses. They are advanced options - use --help-topic all to see them in the CLI help.
--sorted-ingestion-mode [off|auto|force]: Cloud sorted-ingestion strategy mode--sorted-ingestion-method [auto|ctas|z_order|hilbert|liquid_clustering|vacuum_sort]: Override the clustering method used during sorted ingestion
benchbox run --platform snowflake --benchmark tpch --scale 1 \ --sorted-ingestion-mode force \ --sorted-ingestion-method ctasThis runs Snowflake with forced CTAS-based sorted ingestion.
Databricks Clustering Options
These overrides are Databricks-specific and are passed via --platform-option.
--platform-option databricks_clustering_strategy=[z_order|liquid_clustering|liquid_clustering_auto|none]: SQL tuning strategy for Databricks tables--platform-option liquid_clustering_columns=col1,col2: Comma-separated liquid clustering columns
benchbox run --platform databricks --benchmark tpch --scale 1 \ --platform-option databricks_clustering_strategy=z_order
benchbox run --platform databricks --benchmark tpch --scale 1 \ --platform-option databricks_clustering_strategy=liquid_clustering \ --platform-option liquid_clustering_columns=l_shipdate,l_orderkey
benchbox run --platform databricks --benchmark tpch --scale 1 \ --platform-option databricks_clustering_strategy=liquid_clustering_autoThe commands, in order, run Databricks with Z-order clustering, with liquid clustering on specific columns, and with automatic liquid clustering.
Execution Control Options
These flags control monitoring, progress display, memory handling, and caching behavior. They are advanced options - use --help-topic all to see them in the CLI help.
--mode [sql|dataframe]: Force execution mode (validates against platform capabilities)--no-monitoring: Disable metrics collection during benchmark execution--no-progress: Disable progress bars--ignore-memory-warnings: Proceed with execution despite low memory warnings--global-cache: Use shared data cache at~/.benchbox/datagen/instead of project-localbenchmark_runs/directory
Query Plan Capture Options
-
--capture-plans: Capture the logical query plan for each executed query and embed it in results. Plans are persisted to the results bundle for later comparison or regression detection. Display is not affected — plans are captured silently. See Query Plan Analysis for full details. -
--show-plans: Display query plans in the console after each query executes. Use for interactive inspection without--capture-plans. When--capture-plansis also active, display is suppressed to avoid running EXPLAIN twice; usebenchbox show-planto inspect plans already captured to the results bundle. -
--analyze-plans/--no-analyze-plans: The single capture-detail knob (used with--capture-plans).--analyze-plans(default) capturesEXPLAIN (ANALYZE)plans with actual per-operator timing/cardinality, re-running each query once in the isolated post-measurement phase (~1× extra cost, outside the measured window).--no-analyze-planscaptures the static (estimated) plan with no re-execution. Write statements are never re-executed regardless (DML stays on a non-ANALYZEEXPLAIN). -
--normalize-plan-literals: In addition to the default fingerprint, record a literal-normalized fingerprint (fingerprint_normalizedin the plans companion file) that collapses queries differing only in literal constants (e.g. parameter substitutions) to the same value. Requires--capture-plans; the defaultfingerprintis left unchanged.- Example:
--capture-plans --normalize-plan-literals
- Example:
-
--plan-config TEXT: Fine-grained control over query plan capture- Format: comma-separated key:value pairs
- Keys:
queries:ID1,ID2,...- capture plans for specific query IDs onlystrict:true|false- fail if plan capture encounters errors
- Requires
--capture-plansto also be set - Example:
--capture-plans --plan-config "queries:Q1,Q6,strict:true" - Note: Plan capture records each distinct query exactly once in an isolated
post-measurement phase, so the old per-iteration sampling keys (
sample:/first:) have been removed. On DuckDB the defaultEXPLAIN (ANALYZE, FORMAT JSON)re-runs each query once; use--no-analyze-plansfor estimated plans without that overhead.
Cross-run fingerprint comparison and benchmark seeds. The default
plan_fingerprintembeds filter/join/projection literals, so comparing fingerprints across runs that used different seeds yields false positives when only a seed-driven filter value changed. Hold the seed constant across compared runs, or use the opt-in literal-normalized fingerprint (QueryPlanDAG.normalized_fingerprint,create_plan_metadata_from_results(..., normalize_literals=True)), which masks literals so seed-varied plans compare equal. See Query Plan Analysis → Literal normalization.
Deprecated: run-official
run-official {tpch|tpcds} [OPTIONS] is a hidden, deprecated compatibility
shim kept for older scripts. Prefer run --official for all new usage — it
covers everything run-official does except concurrent-stream count (see
below).
benchbox run-official {tpch|tpcds} [OPTIONS]--platform TEXT(required): Platform to run on--scale FLOAT(required): TPC scale factor (must be one of the TPC-allowed values: 1, 10, 30, 100, 300, 1000, 3000, 10000, 30000, 100000)--phases TEXT(required): Comma-separated test phases--streams INTEGER: Number of concurrent streams for thethroughputphase. Required when--phasesincludesthroughput; must be at least 2 (the TPC minimum), and--streams 0or--streams 1is rejected. SetsBenchmarkConfig.concurrency(the same fieldrun’s throughput driver reads internally), sorun-official ... --streams 4is equivalent to running with 4 concurrent throughput streams.--seed INTEGER: Random seed for reproducible official runs (a warning is printed if omitted)--output PATH: Output directory-v,--verbose: Enable verbose logging--validate-results: Enable result validation
Note: plain run (including run --official) accepts --streams N (with
--concurrency N as an alias), an advanced option that sets
BenchmarkConfig.concurrency. run-official --streams N is therefore
equivalent to run --streams N — see the throughput phase note above.
Related
- Configuration - Configuration files and environment variables
- Platform Options - Platform-specific settings
- Tuning Commands - Generate and manage tuning configurations