B-Tree Indexes in Prisma ORM: Make Slow Postgres Queries 80x Faster
CYBERSECURITY FEATURED ANALYSIS

B-Tree Indexes in Prisma ORM: Make Slow Postgres Queries 80x Faster

SOURCE

Prisma Blog

DATE

READ

1 min read

Add a B-tree index in your Prisma schema with @@index and turn a 66ms sequential scan into a sub-millisecond lookup, an 80x improvement verified on Prisma ORM 7 and PostgreSQL 17 with EXPLAIN ANALYZE.

Add a B-tree index in your Prisma schema with @@index and turn a 66ms sequential scan into a sub-millisecond lookup, an 80x improvement verified on Prisma ORM 7 and PostgreSQL 17 with EXPLAIN ANALYZE.