Benchmarks
Measured, including the results that do not flatter us. Apple M3, one node in Docker.
Six numbers
Fast, and complete for Cassandra 5
Parse 22 statements
3.8× faster than sqlparser
KillrVideo schemas accepted
Cassandra 5.0 fully parsed
DEFAULT, which is not CQL.Real query examples analysed
v4 and v5 sample queries
date - date).Numbers
| cqlc 1.1 | Time |
|---|---|
| lexer, 36 statements | 13.9 µs |
| parser | 52 µs |
| full analysis (lex, parse, resolve, type-check) | 103 µs |
Level with the raw driver; safe by construction
YCSB throughput, k ops/s
all within run-to-run noise
cqlx as share of raw driver
95 to 97 %
Build one statement
cqlx pays 250 ns for compile-time checks
Not measured here
Predicts measured bottlenecks, on data it never saw
Macro-F1 on held-out data
blue wins on all three
Training data: 5,284 measured statements
ScyllaDB 2,670 + Cassandra 5.0 2,614
Time to check 36 statements
cqlc is the faster, simpler tool; cql-ai answers a different question
Numbers
| Macro-F1 | with data stats | statement only | keyword rules |
|---|---|---|---|
| unseen worlds | 0.855 | 0.683 | 0.557 |
| unseen families | 0.889 | 0.674 | 0.624 |
| other engine (Cassandra 5.0) | 0.802 | 0.624 | 0.516 |
Trained on ScyllaDB only for this table. Without data statistics the model is only a little better than the rules: the gain comes from knowing your data size. Released weights are trained on both engines.
An exact ILP wins; the design pays off on a real database
Extra cost over the best design
80–150 queries, lower is better
Instances solved to optimality in 15 s
80–150 queries
Real ScyllaDB: throughput vs one table per query
+8.2 % on sensors, equal on killrvideo
Environment steps per second, M steps/s
91 % efficient on 4 threads; 8 threads use the efficiency cores
Table: cost relative to best, by workload size
| Queries | greedy | B&B | ILP | learned |
|---|---|---|---|---|
| 4–7 | 1.095 | 1.000 | 1.000 | 1.000 |
| 8–16 | 1.009 | 1.000 | 1.000 | 1.003 |
| 25–50 | 1.054 | 1.001 | 1.000 | 1.005 |
| 80–150 | 1.117 | 1.078 | 1.000 | 1.006 |
Fast enough to run on every save
Throughput, MB of CQL per second
3,600 files, 23.3 MB, 79,200 statements
Statements per second
lint 330k, format check 150k
Formatter safety
tokens and comments unchanged, idempotent
Correctness is the benchmark
Integration tests against real databases
all pass
cqlprof detects what it should
10 live rows + 2,990 deleted rows in one partition
Run it yourself
git clone https://github.com/Max-imalgutaussehend/cqlz && cd cqlz/benchmarks
cargo bench --bench frontend # cqlc vs sqlparser
cargo bench --bench inference # cql-ai vs cqlc
cargo run --release --bin realworld # KillrVideo coverage
cargo run --release --bin ycsb -- 50000 10 # cqlx vs raw driver (Docker)
git clone https://github.com/Max-imalgutaussehend/cqlz-lab && cd cqlz-lab
cargo run --release -p cqlz-gym -- eval --policy artifacts --instances 8 --exact-seconds 15
cargo run --release -p cqlz-gym -- bench
Data sources and what is not measured
KillrVideo schemas and queries (Apache-2.0), YCSB core workloads A/B/C, NoSQLBench (cql-keyvalue2, cql-tabular2, cql-iot, cql-timeseries2), cassandra-stress profiles, TSBS CPU table, DataStax data-modelling examples (shapes of the gym workloads). Not measured: cluster throughput, multi-node scaling, tail latency under overload, one machine only.