Home Expressions
Docs
Drivers Gateway SDKs Benchmarks
Changelog
GitHub
Blog Status Roadmap
← Back to benchmark index
Historical ORM page December 2025

ORM/Driver Benchmark

Historical December 2025 snapshot. Rerun locally for current numbers.

388us

qail-pg per-query latency in the dated run

388us
qail-pg latency
baseline
1.35x
SQLx latency ratio
vs qail-pg
1.09x
SeaORM latency ratio
vs qail-pg

Test Parameters

ParameterValue
Iterations10,000 sequential queries
Warmup100 queries
ConnectionSingle persistent connection
DatabasePostgreSQL 16 on localhost
Data4 departments, 1,000 employees

Query Shape

WITH high_earners AS (
    SELECT * FROM employees WHERE salary > 80000
)
SELECT e.*, d.name AS dept_name
FROM high_earners e
JOIN departments d ON e.department_id = d.id
WHERE e.status = 'active'
ORDER BY e.salary DESC
LIMIT 100

Measured Results

DriverTotal timePer queryRelative latency vs qail-pg
qail-pg3,881ms388.09us1.00x
SeaORM4,216ms421.62us1.09x
SQLx5,245ms524.52us1.35x

Observed sources of difference

  • The AST path serializes directly to bytes on the wire protocol path.
  • The query builder stays allocation-light under the workload used here.
  • Application-side mapping and abstraction work are lower than the ORM baselines in this harness.

Comparison notes

  • All drivers used a single persistent connection.
  • The result set and query complexity were matched across the run.
  • Queries were sequential, so no driver received a concurrency advantage.
  • SeaORM was tested with raw SQL rather than full entity abstraction.

Reproduce

git clone https://github.com/qail-io/qail.git
cd qail
cargo run --example orm_benchmark --release