Skip to content
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

Queries use is_deleted <> 'Y' but is_deleted = 'N' might support better execution plans #1649

Closed
punktilious opened this issue Oct 29, 2020 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@punktilious
Copy link
Collaborator

Describe the bug
JDBC queries use is_deleted <> 'Y' to filter out resources which have been marked as deleted. Although only one row needs to be logically checked (the current resource), the optimizer might try to access this first and therefore require scan multiple rows when only one will match. Using is_deleted = 'N' is a better strategy should there be a suitable index available.

@punktilious punktilious added the bug Something isn't working label Oct 29, 2020
@punktilious punktilious changed the title Queries use is_deleted <> 'Y' but is_deleted = 'N' might offer better execution plans Queries use is_deleted <> 'Y' but is_deleted = 'N' might support better execution plans Oct 29, 2020
@lmsurpre
Copy link
Member

I confirmed that there's no more refrences to 'Y' in our jdbc project and that the queries continue to work as expected

@lmsurpre lmsurpre added this to the Sprint 20 milestone Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants