SQLQueryHelperjs - v1.2.6
    Preparing search index...

    Benchmark Guide

    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:

    • query builder SQL generation
    • DML roundtrips with returning support
    • schema inspection
    • entity generation
    • planReflect(...)
    • no-op 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_STRING
    • MYSQL_BENCH_CONNECTION_STRING or MYSQL_TEST_CONNECTION_STRING
    • MYSQL_BENCH_SCHEMA or MYSQL_TEST_SCHEMA

    SQLite uses a temporary local file under benchmarks/.tmp/.

    The benchmark runner writes:

    • benchmarks/latest-results.json
    • benchmarks/latest-results.md
    • benchmarks/history/<version>/results.json
    • benchmarks/history/<version>/results.md
    • benchmarks/history/<version>/comparison.json when a previous versioned baseline exists
    • benchmarks/history/<version>/comparison.md when a previous versioned baseline exists

    Latest captured snapshot:

    • generated: 2026-04-22T16:59:34.621Z
    • host: Windows 11 (10.0.26100), Node v22.12.0
    • CPU: AMD Ryzen 5 5600GT with Radeon Graphics
    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:

    • SQLite is best for tight local schema and builder loops.
    • PostgreSQL leads the live DML roundtrip benchmark in this snapshot.
    • MySQL pays extra overhead in DML when 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.

    • Build benchmarks (toSQL) show pure builder overhead without network cost.
    • Runtime DML benchmarks show end-to-end reflector cost for insert/update/select/delete.
    • Schema benchmarks show metadata and planning costs after the target schema is already aligned.
    • Cross-engine comparisons are directional unless you pin hardware, Docker limits, server tuning, and dataset size.

    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:

    • SQLite
    • PostgreSQL
    • MySQL

    SQL Server remains a documentation split target, not a benchmarked runtime engine yet.