Performance: ORM options (Prisma, Drizzle)
This affects server response time and initial data fetching speed, impacting how fast the page can show dynamic content.
const users = await prisma.user.findMany({ select: { id: true, name: true } });const users = await prisma.user.findMany({ include: { posts: true, comments: true } });| Pattern | Server CPU Load | Query Complexity | Response Time | Verdict |
|---|---|---|---|---|
| Prisma with heavy includes | High | Complex | Slow (100-200ms) | [X] Bad |
| Prisma with selective fields | Low | Simple | Fast (50-80ms) | [OK] Good |
| Drizzle with multiple joins | High | Complex | Slow (150-300ms) | [X] Bad |
| Drizzle with simple selects | Low | Simple | Fast (40-70ms) | [OK] Good |
const users = await db.select().from(usersTable); console.log(users.map(u => u.name));
const users = await prisma.user.findMany(). What is the likely cause?Pass the test and this pattern moves unknown