drizzle orm is overhyped

Everyone is talking about drizzle orm. we all know that vercel pays people to talk I feel prisma DX is no match for drizzle orm no matter what they say prisma is here to stay You may say performance Why not develop you backend in rust or golang if performance was your main focus DX and community 🎤
38 Replies
willm
willm2y ago
🤡
Neto
Neto2y ago
You may say performance Why not develop you backend in rust or golang if performance was your main focus like performance in sql terms not in raw runtime performance if you run the same query, be on nodejs, rust, golang or whatever can you guess the performance?
Lopen
LopenOP2y ago
Most applications won't reach the so called performance bottle necks The term is performance is overshoot so as scalability leading to over engineering Prisma is enough for most applications but this whole drizzle hype may pressure you people to rebuilding it all
Tom
Tom2y ago
I will say that when it comes to prisma ther performance actually IS an issue at any scale cause no matter what size your app is, if you run it serverlessly youre gunna eat a huge coldstart time which matters much more if your app is small prisma kinda seems to reverse scale in that way. it gets BETTER the more users you have cause you get less cold starts prisma has a great DX, but its also a full ORM which has advantages and disadvantages. The main disadvantage is you do kinda get locked in hard. for reference, im using kysely for my app which i like a lot because its very easy to understand: it makes my sql queries typesafe. nothing more and nothing less i dont really use the migrations, but they seem overrated a bit overrated in both drizzle and prisma. for instance in prisma, (AFAICT) i need to specify default values to add a column. i cant do calculations on previous columns. maybe im wrong about that last bit, by the point i was looking into migrations i was already looking elsewhere because of the coldstart performance (also the fact that it manually does its own joins is bonkers)
Mendy
Mendy2y ago
Drizzle has a long way to go, agreed. Dose it worth the pain? YES! I was using Prisma for a db with 30 tables. To simply get the context for the user, it created 4 different queries. Each request would take more then a second just to get the context. With Drizzle using prepared statement, this is down to 60ms. I'm not hyped, just practical.
z
z2y ago
as far as i’ve understood, its a great alternative when ur going serverless. so i decided to go with bare metal and go with prisma…
mapacheney
mapacheney2y ago
Not having to generate types and restart your lsp when changing your schema is good too haha
Mendy
Mendy2y ago
Yes, cold starts and edge are the main selling points, but Drizzle will speed up your queries in any env - especially with db like PlanetScale.
z
z2y ago
I see.
Jim
Jim2y ago
prisma is over engineered deranged
Lopen
LopenOP2y ago
Eventually your typescript server will die and you will still restart it😅
iukea
iukea2y ago
I would say prisma's engineers.... Would not say it's engineered with how poor it actually does queries
Zan
Zan2y ago
not having to run codegen in my build is a big +
iukea
iukea2y ago
Agree. Please mind you I am saying what I said above .... But I am using Prisma
Chen
Chen2y ago
i thoguht recently prisma made some changes that made them like 10x faster or something for coldstart on serverless. is Drizzle still miles better than PRisma?
Sybatron
Sybatron2y ago
They work differently Prisma still have giant query engine that everything goes trough And not best thing in optimized queries so more complex queries will still hurt a lot
Tom
Tom2y ago
i tried these changes (which were not well documented btw). they did not make it 10x faster. i couldnt replicate the results they listed in the blog post and the fact that the orm does manual joins is bonkers i get that it was probably easier to develop, but that should be a minimum requirement for an orm better is also relative. Drizzle is still in active development so its not gunna have all the features and stability but it definitely performs way better and you may not need the features
cje
cje2y ago
Why is this in questions lol @barry this is the first time you can tell someone to not post in questions
barry
barry2y ago
@Lopen32
barry
barry2y ago
You done fucked up little lopen man, this is the questions channel, for questions, we have a #tech-discussion for this kind of bullshit
Chen
Chen2y ago
Interesting! I'm assuming you're using drizzle in a vercel serverless environment. how much of a performance increase do you see/feel for basic operations?
Tom
Tom2y ago
im actually using kysely now. i tried drizzle but opted for kysely for some more structural reasons but my test db has literally 1 row in it and i just did a query on that row and on cold starts i saw it take up to 9s to return data kysely cold start is still in the 4s range but thats at least tolerable for something i dont plan on happening that often once the app scales up a bit i think almost all of that cold start time is actually vercel / aws though 1 very frustrating thing is that it seems near impossible to get good accoounting of where all the time is going so i cant really say for sure why kysely is so much faster, but i can point to the numbers and make some educated guesses
Igal
Igal2y ago
Tom
Tom2y ago
?
Igal
Igal2y ago
Just emphasizing 🙂
Tom
Tom2y ago
emphasizing what? im sorry i dont understand
Diogo
Diogo2y ago
he's agreeing width you and showing an example of a query with kysely ( that took 4ms ) showing how fast it is
Tom
Tom2y ago
Oh. I didn’t see that in the picture Thanks
Igal
Igal2y ago
Sorry was on a call, yeah what @Diogovski said. Its taken from twitter, when it was first falsly claimed that only drizzle hits single digit latency, and later corrected (issue was misconfiguration on deployment of non-drizzle examples) most of the latency is not even kysely related, but communication/compute between lambda/worker and db
Tom
Tom2y ago
yeah i mean kysely is just a very nice string builder really so that makes sense side note. it would be really nice if there was a way to examine the complete timeline of a lambda even when i was using prisma it would report something like 20ms for the query, but the whole request still took 9 seconds on lambda
Donny D
Donny D2y ago
The term is performance is overshoot so as scalability leading to over engineering P R E A C H
Lopen
LopenOP2y ago
The thing is i use a real server for my deployments
rykuno
rykuno2y ago
If you don't use serverless then use what you like??? I have two apps that utilize prisma that are hosted on Render.com; great performance. Yet it does suck incredibly on serverless apps, like, bad. Each has their pros and cons; but there's no arguing that if severless continues to increase in popularity then either prisma needs to figure out their cold starts or it will lose popularity pretty quickly. I'd love to use prisma on serverless apps but I cannot risk churn through 6 second cold starts vs Drizzle's 100ms
Lopen
LopenOP2y ago
I thought Serverless infrastructure was the cause of the cold starts, but here the picture your painting makes it seems like the orm is the source of the cold start
z
z2y ago
Partially true, dont get me wrong I personally prefer prisma too, but prisma does add a huge over head on top of the coldstarts when you ur using serverless...
Account
Account2y ago
drizzle is a step back in humanity. Prisma lets u do many to many connections with ease while in drizzle u still have to do the old school way of creating a middle table like a pleb. And the columns are not even lined up in a nice way like in prisma's schema. The way forward for ORMs are custom languages for schemas like prisma does. everything else is poop prisma also gives u convinient item arrays that dont exist behined the scenes
JacobMGEvans
JacobMGEvans2y ago
Use #tech-discussion for discussions & debates (be sure to keep them civil and logical)
Want results from more Discord servers?
Add your server