Skip to content

Benchmark

Our open-source benchmark measures pure SQL generation speed, with no database I/O, to isolate the overhead each tool adds to every query. This page always reflects the latest run; the original announcement post tells the full story.

Node.js v24, Apple Silicon M-series, July 2026. Latest stable of every entry: TypeORM 1.0.0, MikroORM 7.1.5, Sequelize 6.37.8, Drizzle 0.45.2, Knex 3.3.0, Kysely 0.29.3, UQL 0.15.5. All values in ops/sec (higher is better), averaged over 3 runs.

Query Type UQL Sequelize TypeORM MikroORM Drizzle Knex Kysely
INSERT (10 rows) 472K 205K 43K 108K 11K 464K 187K
UPDATE (SET+WHERE) 1,748K 237K 294K 210K 74K 699K 729K
UPSERT (ON CONFLICT) 591K 343K 266K 259K 34K 451K 314K
DELETE (WHERE) 3,388K 1,233K 519K 250K 195K 1,093K 1,177K
SELECT (1 field) 3,951K 3,154K 605K 565K 217K 1,117K 1,456K
SELECT (WHERE+SORT+LIMIT) 1,299K 396K 285K 74K 56K 607K 362K
SELECT (complex $or) 663K 149K 167K 28K 32K 242K 195K
AGGREGATE (GROUP+HAVING) 1,494K 404K 280K 73K 67K 326K 187K

UQL is the fastest entry in all 8 categories, on average ~2.1x faster than the next fastest tool. Seven of those wins are clear, ranging from 1.2x to 3.7x. The eighth, batch INSERT, is the narrowest: UQL edges the standalone query builder Knex by a few percent (472K vs. 464K here) and stays ahead of it across every run, rather than trading the lead run to run as earlier versions did. Explore the interactive charts.

Operation group Avg advantage (vs. next fastest)
Reads (SELECT, filter, complex, AGGREGATE) ~2.4x
Writes (UPDATE/UPSERT/DELETE) ~2.1x

Two design choices drive the numbers:

  • Schema metadata (tables, columns, relations) is pre-computed once at startup, so no lookups happen at query time.
  • SQL is written directly into a string buffer, avoiding intermediate builder objects and garbage-collection pressure.
  • What’s measured: pure SQL string generation, with no database, no I/O, and no connection pool.
  • Fairness: every entry defines the same User entity, generates logically equivalent queries, compiles the PostgreSQL dialect, and uses its idiomatic API (QueryBuilder for TypeORM/MikroORM, QueryGenerator for Sequelize).
  • Why no Prisma? Prisma’s query compiler is Rust compiled to WebAssembly, not pure JS/TS, and it exposes no public SQL-compilation API, so it cannot be measured this way.
  • Reproduce it: no database needed; it runs in seconds.
Terminal window
git clone https://github.com/rogerpadilla/ts-orm-benchmark.git
cd ts-orm-benchmark
bun install
npm run bench

The full methodology, fairness guarantees, and per-run data live in the benchmark repository.


Speed is one axis. For side-by-side API and feature differences, see the ORM Comparison.