New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade Drizzle and Prisma to its latest versions #2
base: main
Are you sure you want to change the base?
Conversation
src/schema.prisma
Outdated
@@ -1,6 +1,6 @@ | |||
generator client { | |||
provider = "prisma-client-js" | |||
previewFeatures = ["referentialIntegrity", "fullTextSearch", "fullTextIndex"] | |||
previewFeatures = ["fullTextSearch", "fullTextIndex"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to also add relationJoins
feature which should make a perf difference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@capaj done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rafaell-lycan because relationJoins is still in preview are not enabled by default in queries https://www.prisma.io/docs/orm/prisma-client/queries/relation-queries#relation-load-strategies-preview. So you need also to update all queries
Any reason why this is not merged? |
It seems like the Drizzle team is tackling a lot at the same time lately and understaffed/overworked recently. They are planning some internal changes/refactoring and likely a few other things behind the scenes which require a lot of work. Sadly this leaves very little manpower for tying up loose ends everywhere else: Drizzle Kit is still not open sourced (it was initially planned for end of last year), some easy documentation issues are still not tackled (and cannot be contributed by the community because we cannot look inside Drizzle Kit), benchmark was supposed to get a comparison with TypeORM as well as support for SQLite, MySQL... which are all listed as coming soon (and have been for a while). This PR seems to suffer from the same circumstances. |
I ran the benchmark with the latest version of Prisma and found that Prisma and Drizzle perform nearly identically: #5 |
Sorry bro, you ought to quit making excuses for them. The Drizzle team put a "benchmark" out there professing the superiority of their product and whilst doing so, they are purposefully keeping older versions of the competitive library? In using this "strategy" they should have anticipated requests for updates. In order to come across as a team with integrity, they ought to take the 10 mins it'll take to merge this PR. It's been open for months now. Either that, or they should put something up on the so called benchmark that lets the viewer know that they are purposefully not able to update the competitor library due to lack of time and therefore, the benchmark is stale; so that the viewer is made aware of facts. |
My intention was not to make an excuse for them, instead I wanted to put things into perspective. I definitely agree with you. Due to the sudden success they have a plethora of feature request and want to please everyone which does not work. They bit of more than they can chew and are investing time into new fancy projects like Drizzle Studio while leaving the fundamentals behind. What astonishes me is that there has not been any comment from the @drizzle-team on this PR so far. We currently have a project using Prisma ORM and planned to switch to Drizzle for several reasons (not only performance). However, the missing open-sourceness of Drizzle Kit is currently a show stopper for us. And with Prisma increasing their performance with the new experimental features there is one less reason for us to consider switching to a project which cannot get their basic priorities straight (or at least be more transparent about it!!). |
Yep, fully agree with you on this. Again, they've been repeatedly asked to comment on why drizzle-kit is not open source'd and it's been nothing but silence.... for months. One has to wonder why the aversion to making drizzle-kit OSS... what is going on under the hood there? 🤔 Anywho, I hope they are listening and will react. |
Didn't check this repo until now. We will check PR's and merge |
that's why this repo is open-sourced, so you can run benchmarks with any versions and queries you want |
thanks! |
Clearly you miss the point being made... Look, the point here is not to give you grief. People who are commenting are just asking you guys to do what seems like the right thing to do. In the end, what you do is up to you 😉 |
What information is potentially misleading? |
ok, I'll spell it out, but only cause you asked.
Perhaps you can incorporate these into the new version of your benchmark, now that you are "looking at this repo." 🙄 |
This repo info about it Website info: https://orm.drizzle.team/benchmarks |
Just to clarify one thing, In my testing, I found that upgrading Prisma to the latest version increased the performance in this benchmark by only about 0.1x. The real improvement was removing the use of the full-text preview feature and replace it with a simple SQL query. That change improved performance on the order of 10x. After that change, Prisma and Drizzle are effectively performing the same in this benchmark. You can see this change implemented here: https://github.com/drizzle-team/drizzle-benchmarks/pull/5/files#diff-9bf733829a3120ca160edb833b45d1b5652846283b22a7a8e32de02652b763baR29 |
This PR aims to bring a more realistic comparison using the latest versions of both Prisma and Drizzle, as well as upgrading some of the dependencies of this repo such as Hono and more.
Prisma also includes a new preview feature called
relationJoins
since v5.7.x, which enables support for JOINs for relation queries, but I'm unsure if it should add it or not.It closes #1