
prisma-sql
Prisma reads at raw SQL speed
FreeDBOpen Source3,528 impressions#3 of its week
prisma-sql speeds up Prisma read queries by generating SQL and executing it via postgres.js or better-sqlite3.
- for
- Node.js developers using Prisma for PostgreSQL or SQLite who need faster read performance.
- pricing
- freemium
- license
- open source
Key features
- Runtime SQL generation — Converts supported Prisma read queries into SQL at runtime.
- Prebaked hot queries — Allows @optimize annotations to generate SQL at build time for hot query shapes.
- PostgreSQL batch queries — Combines multiple read queries into a single round-trip using Prisma $batch.
- Include & relation reduction — Optimizes includes with flat joins, where-in loading, or correlated subqueries.
- Large to-many include protection — Detects large child tables and switches to batched where-in loading to avoid expensive scans.
- Aggregate type handling — Maps aggregate results back to Prisma-style types like Decimal, BigInt, and DateTime.
Use cases
- Fetching paginated lists with complex filters faster than standard Prisma.
- Running batch read operations across multiple tables in a single DB round-trip.
- Including large to-many relations without performance degradation.
prisma-sql pricing
- Free$0Unlimited public packages
- Pro$7/monthUnlimited public packages · Unlimited private packages · Package-based permissions
- Teams$7/user per monthUnlimited public packages · Unlimited private packages · Team-based permissions
prisma-sql vs alternatives
prisma-sql | Keel | WunderGraph | Fluent CI | Automock | |
|---|---|---|---|---|---|
| Best for | Accelerated Prisma read queries | Backend as a service | API composition | CI/CD pipelines | Testing utilities |
| Pricing | Freemium | Subscription | Free | Free | Free |
| DevHunt upvotes | 6 | 46 | 38 | 158 | 148 |
| Launched | Mar 2026 | Mar 2024 | Jan 2023 | Jan 2024 | Jan 2023 |
- prisma-sql vs Keel: Keel provides a full backend platform, while prisma-sql only accelerates Prisma reads.
- prisma-sql vs WunderGraph: WunderGraph focuses on API composition, whereas prisma-sql optimizes database read performance for Prisma.
- prisma-sql vs Fluent CI: Fluent CI is a CI/CD tool, unrelated to Prisma query acceleration.
- prisma-sql vs Automock: Automock simplifies unit testing, not database query performance.
prisma-sql FAQ
Which Prisma queries are accelerated?+
findMany, findFirst, findUnique, count, aggregate, groupBy and PostgreSQL $batch are accelerated; writes remain unchanged.
What happens if a query cannot be accelerated?+
The extension falls back to Prisma’s normal execution path, optionally logging debug information.
Do I need to change my existing Prisma code?+
No, you keep the same Prisma API and types; you only add the speedExtension during client initialization.
Can I pre-bake queries?+
Yes, using the @optimize comment you can generate SQL at build time for frequently used query shapes.
Is prisma-sql compatible with both PostgreSQL and SQLite?+
Yes, it works with PostgreSQL via postgres.js and SQLite via better-sqlite3, with version requirements noted for SQLite.
Summarized by DevHunt from npmjs.com · Sep 28, 2026. Details may change; check the official site.
prisma-sql
Keel
WunderGraph
Fluent CI
Automock.png?width=64)


.png?width=64)









