Skip to content

Add COMPARISON.md vs Prisma, Kysely, pgTyped, Zapatos#6

Merged
tiagolauer merged 1 commit into
masterfrom
comparison-benchmarks
Jul 18, 2026
Merged

Add COMPARISON.md vs Prisma, Kysely, pgTyped, Zapatos#6
tiagolauer merged 1 commit into
masterfrom
comparison-benchmarks

Conversation

@tiagolauer

Copy link
Copy Markdown
Owner

Summary

Adds COMPARISON.md, scoped deliberately to build step, runtime parser cost, bundle size, and DX — explicitly not a runtime query-speed benchmark, since that's dominated by the database/driver and compares architecturally different tools (full ORM vs query builder vs SQL-in-files vs type-level parser) unfairly.

Every factual claim is researched and cited (bundlephobia's API for bundle sizes, official docs/blog posts/GitHub issues for build-step and runtime architecture), not assumed:

  • Kysely: 189 KB / 38.7 KB gzip, no required build step, but every query call compiles the builder chain to SQL at runtime.
  • pgTyped: mandatory CLI codegen against a live Postgres just to type-check, but the runtime is close to a passthrough since the SQL text is already known by generate time. @pgtyped/runtime measures larger than expected (399 KB / 85 KB gzip) — called out rather than glossed over.
  • Prisma: mandatory prisma generate. The historical Rust query engine was ~14 MB / ~7 MB gzip (a well-documented Lambda cold-start problem); the TypeScript-based rewrite (GA since v6.16, default in v7) cut that to ~1.6 MB / ~600 KB gzip. @prisma/client itself measures near-zero on bundlephobia only because the real client is generated at build time — noted as misleading rather than used at face value.
  • Zapatos: schema generation is one-shot/opt-in like this library's own generate, not a per-build requirement; not resolvable on bundlephobia (CLI+library hybrid) — stated as a gap, not papered over with a guess.

sql-template-typed's own numbers are grounded in checkable facts rather than marketing language: zero entries in package.json's dependencies field, and the entire runtime surface (src/index.ts + src/result.ts) is 128 lines, most of it type declarations erased at compile time.

Linked from the README's "Why I built it" section.

Test plan

  • Documentation-only change — npm test re-run to confirm nothing else was touched (47 tests passing, unchanged)

Scoped deliberately to build step, runtime parser cost, bundle size, and DX
- explicitly not a runtime query-speed benchmark, since that's dominated by
the database/driver and compares architecturally different tools unfairly.

Every factual claim is researched and cited (bundlephobia's API for bundle
sizes, official docs/blog posts/GitHub issues for build-step and runtime
architecture), not assumed:

- Kysely: 189 KB / 38.7 KB gzip, no required build step, but every query
  call compiles the builder chain to SQL at runtime.
- pgTyped: mandatory CLI codegen against a live Postgres just to type-check,
  but the runtime is close to a passthrough since the SQL text is already
  known by generate time. @pgtyped/runtime measures larger than expected
  (399 KB / 85 KB gzip) - called out rather than glossed over.
- Prisma: mandatory `prisma generate`. The historical Rust query engine was
  ~14 MB / ~7 MB gzip (a well-documented Lambda cold-start problem); the
  TypeScript-based rewrite (GA since v6.16, default in v7) cut that to
  ~1.6 MB / ~600 KB gzip. @prisma/client itself measures near-zero on
  bundlephobia only because the real client is generated at build time -
  noted as misleading rather than used at face value.
- Zapatos: schema generation is one-shot/opt-in like this library's own
  `generate`, not a per-build requirement; not resolvable on bundlephobia
  (CLI+library hybrid) - stated as a gap, not papered over with a guess.

sql-template-typed's own numbers are grounded in checkable facts rather than
marketing language: zero entries in package.json's dependencies field, and
the entire runtime surface (src/index.ts + src/result.ts) is 128 lines, most
of it type declarations erased at compile time.

Linked from the README's "Why I built it" section.
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@tiagolauer, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 956979fb-a337-48c3-ad03-9c1c08728028

📥 Commits

Reviewing files that changed from the base of the PR and between 41e2766 and c906327.

📒 Files selected for processing (2)
  • COMPARISON.md
  • README.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch comparison-benchmarks

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tiagolauer
tiagolauer merged commit 1ab8dc7 into master Jul 18, 2026
3 of 6 checks passed
@tiagolauer
tiagolauer deleted the comparison-benchmarks branch July 18, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant