NEW  New: cqlint (lint + format), cql-migrate and cqlprof → see the benchmarks

Benchmarks

Measured, including the results that do not flatter us. Apple M3, one node in Docker.

betterequalworsebaseline
At a glance

Six numbers

3.8×
cqlc parse speed vs sqlparser
40/40
cqlc, Cassandra 5.0 schema
97 %
cqlx vs raw driver
+0.29
cql-ai F1 vs keyword rules
+8.2 %
gym design, real ScyllaDB
400×
cql-ai slower than cqlc
cqlc

Fast, and complete for Cassandra 5

Parse 22 statements

3.8× faster than sqlparser

33 µscqlc126 µssqlparser3.8×
sqlparser is a SQL parser: no CQL schema checks.

KillrVideo schemas accepted

Cassandra 5.0 fully parsed

14/14v316/23v440/40v5
v4: the 7 rejected use DEFAULT, which is not CQL.

Real query examples analysed

v4 and v5 sample queries

18/20v427/35v5
The rest are invalid CQL in the samples (wrong vector size, date - date).
Numbers
cqlc 1.1Time
lexer, 36 statements13.9 µs
parser52 µs
full analysis (lex, parse, resolve, type-check)103 µs
cqlx

Level with the raw driver; safe by construction

YCSB throughput, k ops/s

all within run-to-run noise

035701051409599100A 50/50113114107B 95/5111116118C 100/0
cqlxraw driver

cqlx as share of raw driver

95 to 97 %

97 %median
Zipfian 0.99, 64 tasks, median of 3 runs.

Build one statement

cqlx pays 250 ns for compile-time checks

320 nscqlx, validated68 nsformat!, unchecked+250 ns
Hidden by a ~1 ms network round trip.
Not measured here
cqlx 1.0 partial updates, LWT, batches and streaming are covered by tests on ScyllaDB and Cassandra 5.0/4.1, not by this benchmark.
cql-ai

Predicts measured bottlenecks, on data it never saw

Macro-F1 on held-out data

blue wins on all three

unseen worldsunseen familiesother engine
keyword rulesstatement onlywith data stats

Training data: 5,284 measured statements

ScyllaDB 2,670 + Cassandra 5.0 2,614

NoSQLBench tabularNoSQLBench iotcassandra-stressKillrVideo commentsNoSQLBench queue (tombstones)TSBS cpuNoSQLBench keyvalueYCSB

Time to check 36 statements

cqlc is the faster, simpler tool; cql-ai answers a different question

0.11 mscqlc analysis41.7 mscql-ai forward pass400×
42 ms is far inside a CI budget.
Numbers
Macro-F1with data statsstatement onlykeyword rules
unseen worlds0.8550.6830.557
unseen families0.8890.6740.624
other engine (Cassandra 5.0)0.8020.6240.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.

cqlz-gym

An exact ILP wins; the design pays off on a real database

Extra cost over the best design

80–150 queries, lower is better

greedy11.7%exact B&B, 15 s7.8%one table per query4.4%learned policy0.6%ILP0%
The learned policy is a fast approximation, never better than the ILP.

Instances solved to optimality in 15 s

80–150 queries

8/8ILP0/8B&B
ILP time: under 10 ms.

Real ScyllaDB: throughput vs one table per query

+8.2 % on sensors, equal on killrvideo

+0.0%+2.5%+5.0%+7.5%+10.0%+8.2%sensors+1.4%shop+0.0%killrvideo
Noise is a few percent; the model predicted −23 % cost for sensors, measured −7.6 % latency.

Environment steps per second, M steps/s

91 % efficient on 4 threads; 8 threads use the efficiency cores

0M0.75M1.5M2.25M3M1248
measuredideal
Table: cost relative to best, by workload size
QueriesgreedyB&BILPlearned
4–71.0951.0001.0001.000
8–161.0091.0001.0001.003
25–501.0541.0011.0001.005
80–1501.1171.0781.0001.006
cqlint

Fast enough to run on every save

Throughput, MB of CQL per second

3,600 files, 23.3 MB, 79,200 statements

030609012097lint44format --check
Apple M3, 8 cores. No comparable CQL linter or formatter exists to measure against: absolute numbers only.

Statements per second

lint 330k, format check 150k

0.24 slint0.53 sformat --check1 run each

Formatter safety

tokens and comments unchanged, idempotent

25/25real files
KillrVideo (v3 to v5) and cqlc example files; plus 190 benchmark statements.
cql-migrate, cqlprof

Correctness is the benchmark

Integration tests against real databases

all pass

4/4ScyllaDB4/4Cassandra 5.0
cql-migrate: lifecycle, failure and resolve, lock, drift. cqlprof: tombstone detection, bound values, JSON.

cqlprof detects what it should

10 live rows + 2,990 deleted rows in one partition

2,990tombstones found10live rows returnedPROF001
Same result on ScyllaDB and Cassandra 5.0; the clean partition raises no finding.
Reproduce

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.