#3 Product of the week · Launched March 10, 2026
prisma-sql

prisma-sql

Prisma reads at raw SQL speed

FreeDBOpen Source3,528 impressions#3 of its week

Speed up Prisma reads 2-7x by executing queries via postgres.js or better-sqlite3 instead of Prisma's query engine. Same API. Same types. Just faster.

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
multipliedtwice/prisma-sql 22 0TypeScriptupdated a month ago
works withPrisma Clientpostgres.jsbetter-sqlite3

Key features

6 features of prisma-sql
  • 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-sqlKeelWunderGraphFluent CIAutomock
Best forAccelerated Prisma read queriesBackend as a serviceAPI compositionCI/CD pipelinesTesting utilities
PricingFreemiumSubscriptionFreeFreeFree
DevHunt upvotes64638158148
LaunchedMar 2026Mar 2024Jan 2023Jan 2024Jan 2023

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.