This page tracks reproducible performance snapshots for the public SQLQueryHelperjs runtime engines.
The benchmark suite is designed to measure representative hot paths instead of every exported method in isolation.
Current benchmark groups:
planReflect(...)reflect(...)These scenarios cover the paths that matter most when comparing SQLite, PostgreSQL, and MySQL in this project.
Use:
npm run bench
Environment variables:
POSTGRES_BENCH_CONNECTION_STRING or POSTGRES_TEST_CONNECTION_STRINGMYSQL_BENCH_CONNECTION_STRING or MYSQL_TEST_CONNECTION_STRINGMYSQL_BENCH_SCHEMA or MYSQL_TEST_SCHEMASQLite uses a temporary local file under benchmarks/.tmp/.
The benchmark runner writes:
benchmarks/latest-results.jsonbenchmarks/latest-results.mdbenchmarks/history/<version>/results.jsonbenchmarks/history/<version>/results.mdbenchmarks/history/<version>/comparison.json when a previous versioned baseline existsbenchmarks/history/<version>/comparison.md when a previous versioned baseline existsLatest captured snapshot:
2026-04-22T16:59:34.621Z10.0.26100), Node v22.12.0| Scenario | SQLite avg ms/op | PostgreSQL avg ms/op | MySQL avg ms/op |
|---|---|---|---|
build.select.toSQL |
0.005 |
0.007 |
0.007 |
build.insert.toSQL |
0.005 |
0.006 |
0.016 |
runtime.dml.roundtrip |
12.688 |
7.743 |
22.281 |
schema.inspect.singleTable |
0.381 |
19.203 |
10.374 |
schema.generate.singleTable |
0.389 |
20.759 |
9.929 |
schema.planReflect.singleEntity |
0.404 |
38.915 |
23.656 |
schema.reflect.noop.singleEntity |
0.382 |
38.231 |
29.173 |
Quick read:
returning(...) uses follow-up selection, but remains stronger than PostgreSQL in this snapshot's schema inspection/generation timings.The source artifact for this snapshot is benchmarks/latest-results.md.
toSQL) show pure builder overhead without network cost.The runner now keeps the latest point-in-time snapshot and also archives versioned snapshots by package release.
When a previous versioned baseline exists, the runner also emits comparison artifacts for release review.
Use benchmark-history.md as the operating guide for reading and operating that workflow.
This page tracks the implemented runtime engines:
SQL Server remains a documentation split target, not a benchmarked runtime engine yet.