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
Using Indexes with 'OR' filters #11929
Comments
@h-oll Thanks for the report. Where is |
@sherfert : it's coming from an earlier part of the query: Either because it was user defined and passed as a parameter (I usually put all the parameters at the top of the query inside a WITH {_uuids} AS _uuids) or as a result of a previous step and obtained via a |
The problem the planner encounters is this part: The index can only solve the predicate |
Well I thought I understood: If I follow you correctly, when writing So I imagined that adding to the |
Setup:
Now this query will return 2 of the 4 nodes:
It will return the same removing
If you remove Since it is not possible to find the nodes not having the property from any index, the planner chooses a To work around that, you could write:
This will still not plan an Please note, however, that this query would return 3 of the 4 above nodes. (Not the one missing the property). |
In lack of response I am assuming that my last response cleared out the confusion. Feel free to reopen if that was a premature assumption. |
When executing the following query :
where
_uuid
is indexed onEntity
nodes, the planner does not use the index and hinting at it withUSING
does not work.Expected behaviour would be using the index (or at least being able to hint its usage).
The text was updated successfully, but these errors were encountered: