Drizzle ORM has become one of the most talked-about database tools in the TypeScript ecosystem. With its "if you know SQL, you know Drizzle" philosophy and lightning-fast performance, it's challenging Prisma's dominance. Here's everything you need to know.
Drizzle is a TypeScript-first ORM that takes a radically different approach from Prisma. Instead of generating client code from schema files, Drizzle lets you define your schema in TypeScript and generates SQL from that.
The result? Zero code generation, smaller bundle sizes, and queries that look almost exactly like SQL.
This difference matters significantly for serverless deployments where cold start times are critical.
Drizzle (SQL-like):
const users = await db .select() .from(usersTable) .where(eq(usersTable.email, "user@example.com"));
Prisma (Object-oriented):
const users = await prisma.user.findMany({ where: { email: "user@example.com" } });
Prisma requires running
prisma generate after schema changes. Drizzle has no generation step—your TypeScript schema IS the source of truth.
pnpm add drizzle-orm postgres pnpm add -D drizzle-kit
// schema.ts import { pgTable, serial, text, timestamp } from "drizzle-orm/pg-core"; export const users = pgTable("users", { id: serial("id").primaryKey(), name: text("name").notNull(), email: text("email").notNull().unique(), createdAt: timestamp("created_at").defaultNow() }); export const posts = pgTable("posts", { id: serial("id").primaryKey(), title: text("title").notNull(), content: text("content"), authorId: serial("author_id").references(() => users.id) });
// drizzle.config.ts import { defineConfig } from "drizzle-kit"; export default defineConfig({ schema: "./src/schema.ts", out: "./drizzle", dialect: "postgresql", dbCredentials: { url: process.env.DATABASE_URL! } });
pnpm drizzle-kit generate pnpm drizzle-kit migrate
const postsWithAuthors = await db .select({ postTitle: posts.title, authorName: users.name }) .from(posts) .leftJoin(users, eq(posts.authorId, users.id));
const newUser = await db .insert(users) .values({ name: "John", email: "john@example.com" }) .returning();
await db .update(users) .set({ name: "Jane" }) .where(eq(users.id, 1));
await db.delete(users).where(eq(users.id, 1));
await db.transaction(async (tx) => { const user = await tx.insert(users).values({ name: "New User", email: "new@example.com" }).returning(); await tx.insert(posts).values({ title: "First Post", authorId: user[0].id }); });
Drizzle includes a beautiful database GUI called Drizzle Studio:
pnpm drizzle-kit studio
This opens a local web interface for browsing and editing your database—no external tools needed.
Drizzle's small bundle size means faster cold starts on platforms like Vercel, Cloudflare Workers, and AWS Lambda. Some teams report 50-70% reduction in cold start times after migrating from Prisma.
Prisma bundles a Rust query engine that adds complexity. Drizzle communicates directly with your database driver, reducing overhead.
Drizzle ORM represents a new approach to database access in TypeScript—one that embraces SQL rather than abstracting it away. For developers who value performance, type safety, and simplicity, it's become the go-to choice in 2026.
The migration from Prisma is straightforward, and the benefits for serverless deployments are substantial. Give Drizzle a try on your next project.