Question about using T3 Stack in a DB Query-heavy app

Hey everyone! I’m currently exploring the T3 stack and loving the workflow so far. I’ve primarily worked with Angular and Django for years, where I built a large-scale web app. The app is very SQL query-heavy, as it manages a lot of data—one of the major tables in the DB has about 1 million rows with loads of relations. In Django, I ran into a lot of bottlenecks but eventually got it to perform well enough. Now, I’m considering migrating the app to the T3 stack because I’ve really fallen for the developer experience (I love React!). I’m also doing this partly for fun and learning, even though it’s a big step for a production app (again, don’t judge 😅— it's my solo dev learning process). I’ve quickly picked up most of the stack’s workflow, but my main concern is around using Prisma or Drizzle for database handling. Given that the app is query-heavy, I’m curious how well these ORMs will handle a high volume of data manipulation and fetching. Would love to hear your thoughts and experiences with Prisma or Drizzle for large-scale, query-intensive apps as they are both new technologies for me. Any insights or advice would be greatly appreciated! Thanks in advance
2 Replies
cje
cje3w ago
drizzle is just a query builder. you will need to put in the work to make the queries efficient, but it's possible. it also supports transactions. prisma is very naive by default but can be pushed with a bit of research. you lose most of the dx at that point. i would recommend drizzle for your use case. both prisma and drizzle can fall back to raw sql, so you could inspect the queries from your existing app and copy/paste those 1:1, and then slowly translate them into drizzle's TypeScript syntax to get the DX back.
えみり
えみり3w ago
If you're doing anything reasonably complex in the SQL, you will probably be falling back to just using SQL directly. Drizzle is still lacking quite a bit in tooling for heavy db interactions. Fortunately drizzle's support for writing and composing your own sql directly is quite good, and you can still take advantage of things like parameterization with it
Want results from more Discord servers?
Add your server