Home Expressions
Docs
Drivers Gateway SDKs Benchmarks
Changelog
GitHub
Blog Status Roadmap
← Back to benchmark index
Current ORM snapshot December 31, 2025

ORM/Driver Report: 50K Queries

Fair comparison of qail-pg, SQLx, and SeaORM with the same complex CTE, JOIN, WHERE, ORDER BY, and LIMIT workload.

4,534 q/s

qail-pg cached throughput in the December 31, 2025 snapshot

0.79x
SQLx / qail-pg
3,573 vs 4,534 q/s
0.89x
SeaORM / qail-pg
4,032 vs 4,534 q/s
221us
qail-pg latency
cached path

Measured Results

DriverQueries/sLatencyNormalized throughput
qail-pg (cached)4,534 q/s221us1.00x
SeaORM4,032 q/s248us0.89x
SQLx3,573 q/s280us0.79x
qail-pg (fast)3,531 q/s283us0.78x
qail-pg (basic)2,640 q/s379us0.58x

Optimizations Applied (v0.14.4)

  • Reusable sql_buf and params_buf on PgConnection remove hot-path heap allocation.
  • The statement cache is bounded with an LRU policy and automatic eviction.
  • Parameterized LIMIT/OFFSET keeps identical SQL text on cache hits.
  • Prepared statements are keyed by SQL hash so Parse is skipped when the cache hits.

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

Reproduce

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