Improve IN and NOT IN queries #76

Merged
lunny merged 10 commits from kolaente/builder:feature/in-performance into master 2022-07-07 00:18:02 +00:00
Contributor

This PR improves IN and NOT IN queries by removing duplicate values from it. These kinds of queries are not optimized in postgres or sqlite - for sqlite there is even a hard limit on how many parameters calls to IN can take.

In an ideal world, there would be more tests, I could add some more if needed. For now (and especially comparing to before) I think the new added tests are enough.

This PR improves `IN` and `NOT IN` queries by removing duplicate values from it. These kinds of queries are not optimized in postgres or sqlite - for sqlite there is even a hard limit on how many parameters calls to `IN` can take. In an ideal world, there would be more tests, I could add some more if needed. For now (and especially comparing to before) I think the new added tests are enough.
kolaente added 7 commits 2020-06-19 15:47:53 +00:00
lunny added the
enhancement
label 2020-06-20 08:11:53 +00:00
Owner

Why the CI didn't run? 🤔

Why the CI didn't run? :thinking:
lunny added 1 commit 2020-12-22 13:01:50 +00:00
Merge branch 'master' into feature/in-performance
Some checks reported errors
continuous-integration/drone/pr Build was killed
7496e633df
lunny added 1 commit 2021-01-26 09:21:22 +00:00
Merge branch 'master' into feature/in-performance
Some checks failed
continuous-integration/drone/pr Build is failing
f94d1b4f25
Author
Contributor

@lunny Do you think we could pick this up again and merge it?

@lunny Do you think we could pick this up again and merge it?
Owner

@lunny Do you think we could pick this up again and merge it?

Yes, please update the branch and take a look at whether CI pass. Thanks!

> @lunny Do you think we could pick this up again and merge it? Yes, please update the branch and take a look at whether CI pass. Thanks!
kolaente added 1 commit 2022-07-06 07:13:17 +00:00
Merge remote-tracking branch 'upstream/master' into feature/in-performance
All checks were successful
continuous-integration/drone/pr Build is passing
621fd13c50
Author
Contributor

@lunny Looks like the CI is having issues again (stuck in pending), could you take a look?

The tests pass locally now.

@lunny Looks like the CI is having issues again (stuck in pending), could you take a look? The tests pass locally now.
lunny merged commit d74b6f1050 into master 2022-07-07 00:18:02 +00:00
Author
Contributor

Thanks for merging! Any chance to get a release?

Thanks for merging! Any chance to get a release?
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/builder#76
No description provided.