Skip to content

bench: add the Star Schema Benchmark to the SQL bench matrix - #9252

Open
mprammer wants to merge 1 commit into
developfrom
mp/ssb
Open

bench: add the Star Schema Benchmark to the SQL bench matrix#9252
mprammer wants to merge 1 commit into
developfrom
mp/ssb

Conversation

@mprammer

@mprammer mprammer commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

Vortex's SQL matrix has no star-schema workload. SSB (O'Neil, O'Neil & Chen) is TPC-H redesigned as one — lineitem and orders denormalized into a wide lineorder fact table against four dimensions — so every query is a fact-table scan under dimension-derived filters of a known, deliberately varied selectivity. That isolates filter pushdown, zone-map pruning, and dimension-join throughput instead of mixing them with TPC-H's subqueries and correlated predicates. Unlike SpatialBench it runs on DataFusion and DuckDB unmodified, so it covers the full target grid.

What changes are included in this PR?

The 13 queries under vortex-bench/sql/ssb/, a Benchmark impl in vortex-bench/src/ssb/, and a catalog entry at scale factor 10 with the same CI coverage as Appian — pr-full and develop, not the quick pr matrix. Expected row counts are baked in for SF 1 and SF 10 and asserted on every run. The date dimension registers as dwdate rather than date, which is a reserved word in both engines' parsers; the reference SSB load scripts rename it for the same reason.

Data generation is the part worth reviewing. There is no Rust SSB generator, and SSB is not derivable from TPC-H output — customer is SF × 30k rather than SF × 150k, supplier SF × 2k rather than SF × 10k, part is 200000 · ⌊1 + log₂ SF⌋, and the dwdate calendar has no TPC-H analogue. So src/ssb/datagen.rs builds the reference C dbgen from source and converts its .tbl output to Parquet with the duckdb CLI, the same shell-out Appian uses. SSB has no official upstream, only a tree of unsynchronized dbgen forks, and they are not interchangeable: this pins eyalroz/ssb-dbgen, which unifies them.

What APIs are changed? Are there any user-facing changes?

No library API change. New vx-bench run ssb --opt scale-factor=N subcommand. Generating SSB data needs cmake and a C compiler on top of the duckdb CLI the matrix already requires; the workflow installs cmake only for the SSB job.

🤖 Generated with Claude Code

@mprammer
mprammer marked this pull request as ready for review August 6, 2026 23:18
@codspeed-hq

codspeed-hq Bot commented Aug 6, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 15.34%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 3 regressed benchmarks
✅ 1922 untouched benchmarks
⏩ 51 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation decode_varbin[(1000, 2)] 61 µs 77.3 µs -21.05%
Simulation decompress[u64, (10000, 4)] 311.7 µs 361.1 µs -13.67%
Simulation compress_fsst[(1000, 64, 8)] 1 ms 1.2 ms -10.96%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing mp/ssb (f540b24) with develop (a1057db)

Open in CodSpeed

Footnotes

  1. 51 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@mprammer mprammer removed the changelog/chore A trivial change label Aug 6, 2026
Adds SSB (O'Neil, O'Neil & Chen) to `vortex-bench`, wired end to end the
same way Appian and SpatialBench are: a `Benchmark` impl, the 13 queries
under `sql/ssb/`, and a `BenchmarkCase` in the orchestrator catalog at
scale factor 10.

SSB is TPC-H redesigned as a star schema — one wide `lineorder` fact
table against four dimensions — so every query is a fact-table scan under
dimension-derived filters of known, deliberately varied selectivity. That
isolates filter pushdown, zone-map pruning, and dimension-join throughput
rather than mixing them with TPC-H's subqueries.

Signed-off-by: mprammer <martin@spiraldb.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant