apps/blog/content/blog/prisma-orm-without-rust-latest-performance-benchmarks/index.mdx
Our move from Rust to TypeScript in the Prisma ORM internals is now in Preview for all first-class databases! In this article, we’re sharing the performance improvements we observed in our latest benchmarks and give an outlook for Prisma v7 where the ORM will become “Rust-free” by default.
Prisma ORM's core engine has undergone a major shift from the Rust based query engine to a leaner TypeScript/WASM core (the Query Compiler). This new architecture is now production-ready (v6.16+) and fundamentally improves your developer experience (DX) and application performance.
To implement these benefits now, see the official usage guide for the new Rust-Free ORM. You can also follow the entire development and release history in our Prisma ORM: The Complete Rust-to-TypeScript Migration Journey blog series**.**
Our move from Rust to TypeScript not only improves the developer experience, it also makes Prisma ORM more flexible and easier to use—whether you're working with different JavaScript runtimes, deployment platforms, or project setups like monorepos. On top of that, it brings significant performance improvements.
Over the past few releases, we’ve gradually rolled out Preview support for Prisma ORM for all major SQL databases supported by Prisma ORM. It’s now available for: PostgreSQL, CockroachDB, Neon, MySQL, MariaDB, PlanetScale, SQLite, D1 and MS SQL Server databases.
Our work on moving away from Rust continues with the goal of making “Rust-free” Prisma ORM the default in the upcoming Prisma v7 release. In this article, we are sharing an update on the performance improvements we’ve measured using the latest Rust-free Preview version of Prisma ORM.
We chose a Rust-based architecture initially because we wanted to make Prisma ORM available for various programming languages. Five years later, it has become clear that TypeScript is the dominant language for building web applications and the goal of supporting multiple languages has become secondary to providing the best DX possible for TypeScript developers.
With that in mind, our main reasons for moving away from Rust are:
If you want to learn more, you can check out our previous articles on this topic:
We continuously run benchmarks on the new releases of Prisma ORM in order to monitor any changes and prevent performance regressions as we continue the migration from Rust to TypeScript. You can find all details about our setup in the benchmark repo.
In the latest benchmark run, we found that for almost all queries that we tested, the performance improved compared to the prior Rust-based version of Prisma ORM:
| Query | Rust | Rust-free w/ pg | Comparison (Rust ÷ QC) |
|---|---|---|---|
| findMany (all 25k) | 163 ms | 77 ms | 2.12× |
| findMany (take 2k) | 8 ms | 5 ms | 1.60× |
| findMany (where + take 2k) | 10 ms | 8 ms | 1.25× |
| findMany (orderBy + take 50) | 5 ms | 5 ms | 1.00× |
| update (single) | 1 ms | 1 ms | 1.00× |
| findMany (include cast, m2m, take 2k) | 1539 ms | 136 ms | 11.32× |
| findMany (where + include cast, m2m, take 2k) | 82 ms | 38 ms | 2.16× |
| findMany (include cast + person, where, take 2k) | 169 ms | 70 ms | 2.41× |
| findMany (where reviews.author, to-many → to-one) | 177 ms | 182 ms | 0.97× |
| findMany (where cast.person, m2m → to-one) | 1 ms | 2 ms | 0.50× |
| review.findMany (where author, to-one) | 1 ms | 1 ms | 1.00× |
| actor.findMany (movies.reviews.author, to-many → to-one) | 178 ms | 179 ms | 0.99× |
| findUnique (include reviews.take 3) | 19 ms | 25 ms | 0.76× |
| findUnique (include cast.take 3) | 1 ms | 1 ms | 1.00× |
| actor + 25 movies (ordered), 15 actors each | 9 ms | 11 ms | 0.82× |
Note: These benchmarks were created on a PostgreSQL database and the Rust-free Prisma ORM version uses the
pgdriver.
Overall, the Rust-free version of Prisma ORM delivers strong performance improvements—especially when working with large datasets. In our benchmarks, queries that returned a lot of data were consistently faster with the new TypeScript-based implementation.
For smaller queries, performance differences between the two versions are minimal. In some cases, the Rust-based version was slightly faster, but only when the absolute query time was already extremely low (e.g. 1–2 ms). These marginal gains are not meaningful in practice and don’t outweigh the broader benefits of the Rust-free version.
Our key takeaway is that Prisma ORM without Rust is often significantly faster where it matters most—on large and complex queries—while remaining on par for simpler ones.
Another benefit: The CPU footprint of the Rust-free Prisma ORM is notably reduced, as there's no longer a separate engine binary running alongside your app.
If you read this and have become curious, here are the steps you need to follow to try out the Rust-free version of Prisma ORM:
Enable the queryCompiler and driverAdapters Preview feature flags in your Prisma schema:
generator client {
provider = "prisma-client-js" // or `prisma-client`
output = "../generated/prisma"
previewFeatures = ["queryCompiler", "driverAdapters"]
}
Note: The new internal component replacing the query engine is called query compiler, hence the name of the Preview feature flag.
Run prisma generate to re-generate Prisma Client
Install a driver adapter for your database (e.g. @prisma/adapter-pg if you’re using PostgreSQL):
npm install @prisma/adapter-pg
You can instantiate PrismaClient as follows:
import { PrismaClient } from "./generated/prisma";
import { PrismaPg } from "@prisma/adapter-pg";
const adapter = new PrismaPg({ connectionString: env.DATABASE_URL });
const prisma = new PrismaClient({ adapter });
In the Rust-based version of Prisma ORM, you’ll find an engine binary file in your output directory (or in node_modules if you haven’t set a dedicated output path). You can now check that you’re using the Rust-free version of Prisma ORM by validating that this binary file isn’t there. By the way, this will significantly decrease the bundle size of your entire application 🎉
The Rust-free version of Prisma ORM is approaching General Availability and we’re excited that you can now try it out for any major database supported by Prisma ORM.
Follow the instructions above or try one of our ready-to-run example projects (which also use the new, ESM-first prisma-client generator), for example:
Share your feedback on Discord or ping us on X.