drizzle-team / drizzle-benchmarks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing indexes for Prisma schema

pstachula-dev opened this issue · comments

This comparison is unfair because Drizzle has applied index optimizations that Schema Prisma lacks.

https://www.prisma.io/docs/orm/reference/prisma-schema-reference#index

Which index exactly?

It's fair because we are seeding both databases with Drizzle migration scripts, and the Prisma schema simply represents models for us to query.

As you can see from the README, you should use the pnpm seed:start script, which executes the migrate from the drizzle folder (refer to the source code).

This script utilizes two migration files:

These files include indexes for both Drizzle and Prisma, ensuring fair tests. You can run them yourself to confirm that they operate against indexed databases for both libraries.