Replies: 2 comments 5 replies
-
Thanks a lot for your work! |
Beta Was this translation helpful? Give feedback.
5 replies
-
Seems like we still need to use separate queries and join them manually if we need to use any relational queries with a where or orderby clause. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Drizzle team,
Thank you for this good ORM.
I was reading the docs and this sentence was surprising to me:
In my mind, using exactly one SQL query will not be performant in all cases. In fact, I have seen some cases where doing multiple joins hurt the performance a lot. To validate that, I made this benchmark https://github.com/webNeat/sql-single-vs-multiple-queries
The results show a big difference in performance between using a single
db.query....
and using multiple ones and creating the final result manually (71seconds vs 150ms)if I made a mistake in my small benchmark, please let me know.
I want to understand the reasoning behind this choice of always using a single SQL query.
Thanks,
Amine
Beta Was this translation helpful? Give feedback.
All reactions