Skip to content

fix(backend): make uniqueness constraint query use indexes #6392

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

Merged
merged 2 commits into from
May 2, 2025

Conversation

fatih-acar
Copy link
Contributor

Use more granular subqueries depending on the parameters so that the planner can find the best index.
Otherwise the planner might use the attribute name index instead of the attribute value index when the latter is available.

@github-actions github-actions bot added the group/backend Issue related to the backend (API Server, Git Agent) label May 1, 2025
Use more granular subqueries depending on the parameters so that the
planner can find the best index.
Otherwise the planner might use the attribute name index instead of the
attribute value index when the latter is available.

Signed-off-by: Fatih Acar <[email protected]>
@fatih-acar fatih-acar force-pushed the fac-fix-uniqueness-constr-index branch from 1d787d1 to 5d962a0 Compare May 1, 2025 13:04
Copy link

codspeed-hq bot commented May 1, 2025

CodSpeed Performance Report

Merging #6392 will not alter performance

Comparing fac-fix-uniqueness-constr-index (ebd0e9e) with stable (a7bdcb3)

Summary

✅ 10 untouched benchmarks

@fatih-acar fatih-acar marked this pull request as ready for review May 1, 2025 13:30
@fatih-acar fatih-acar requested a review from a team as a code owner May 1, 2025 13:30
@fatih-acar fatih-acar marked this pull request as draft May 1, 2025 13:32
@fatih-acar
Copy link
Contributor Author

Please do not merge yet, I need to run benchmarks with the feature flag disabled to confirm there's no regression.

Copy link
Contributor

@ajtmccarty ajtmccarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks right to me

This should prevent potential performance regression when the value
index is not present (feature flag disabled).

Signed-off-by: Fatih Acar <[email protected]>
@fatih-acar fatih-acar marked this pull request as ready for review May 2, 2025 09:26
@fatih-acar fatih-acar merged commit 0143434 into stable May 2, 2025
38 checks passed
@fatih-acar fatih-acar deleted the fac-fix-uniqueness-constr-index branch May 2, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/backend Issue related to the backend (API Server, Git Agent)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants