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

Support preliminary/tentative index use when planning LIKE with a non-literal argument (parameter, column reference, etc) #7912

Open
mrotteveel opened this issue Dec 7, 2023 · 0 comments

Comments

@mrotteveel
Copy link
Member

mrotteveel commented Dec 7, 2023

Currently LIKE can only use parameter if it has a literal argument and it doesn't start with a wildcard. As soon as a parameter or column reference is used, an index can no longer be used.

I guess it could be possible to implement a way for LIKE to also use an index in those cases, conditionally on the actual value of the argument. That is, if the value doesn't start with a wildcard, it uses an index, and if it does start with a wildcard, a full scan is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants