← Back to Changelog

Prisma ORM v7.4.0: Prisma Client query caching and partial indexes

v7.4.0
February 11, 2026
Prisma ORM

Prisma ORM v7.4.0: Prisma Client query caching and partial indexes

Highlights

ORM

Caching in Prisma Client

Prisma ORM v7.4.0 introduces a new caching layer for Prisma Client. In Prisma 7, the query compiler runs as a WebAssembly module directly on the JavaScript main thread. While that simplified the architecture, it also meant that every query compilation could synchronously block the event loop.

The new cache normalizes query shapes by extracting user-provided values and replacing them with typed placeholders. That lets Prisma reuse compiled plans for repeated queries with the same shape instead of recompiling them every time.

// These two queries have the same shape:
const alice = await prisma.user.findUnique({ where: { email: 'alice@prisma.io' } })
const bob = await prisma.user.findUnique({ where: { email: 'bob@prisma.io' } })
prisma.user.findUnique({ where: { email: %1 } })   // cache key
                                         ^
                              %1 = 'alice@prisma.io'  (or 'bob@prisma.io')

On the first call, the query is compiled as usual and the resulting plan is stored in an LRU cache. On subsequent calls with the same query shape, the cached plan is reused instantly without invoking the compiler again.

Partial Indexes support

Prisma ORM v7.4.0 also adds support for Partial Indexes behind the partialIndexes preview feature for PostgreSQL, SQLite, SQL Server, and CockroachDB, with migration and introspection support included.

Enable the preview feature in your schema:

generator client {
  provider        = "prisma-client-js"
  previewFeatures = ["partialIndexes"]
}

For maximum flexibility, you can use raw() with a database-specific predicate:

model User {
  id     Int    @id
  email  String
  status String

  @@unique([email], where: raw("status = 'active'"))
  @@index([email], where: raw("deletedAt IS NULL"))
}

For simpler conditions, you can also use the type-safe object syntax:

model Post {
  id        Int      @id
  title     String
  published Boolean

  @@index([title], where: { published: true })
  @@unique([title], where: { published: { not: false } })
}

Bug fixes

This release also includes a set of fixes from Prisma and community contributors:

  • prisma-engines#5767: Fixed PostgreSQL migration scripts to allow CREATE INDEX CONCURRENTLY
  • prisma-engines#5752: Fixed BigInt precision loss in JSON aggregation for MySQL and CockroachDB
  • prisma-engines#5750: Fixed connection failures with non-ASCII database names
  • #29155: Fixed silent transaction commit errors in the PlanetScale adapter
  • #29141: Resolved SQL Server adapter race condition errors during commit and rollback
  • #29158: Fixed MSSQL connection string parsing for passwords with curly braces

Enterprise support

Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.

With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: https://prisma.io/enterprise.