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

Q: type hint for indexed operators #192

Open
jexp opened this issue Mar 25, 2021 · 0 comments
Open

Q: type hint for indexed operators #192

jexp opened this issue Mar 25, 2021 · 0 comments

Comments

@jexp
Copy link
Contributor

jexp commented Mar 25, 2021

As Neo4j is schema free it's hard to reason about if an index can be used, that's why in Cypher (currently) you have to hint at the type, before an index is used e.g. for sorting, min/max aggregations etc.

Not sure if that's also true for parameters but could be.

e.g. MATCH (p:Person) RETURN p ORDER BY p.age

Will only use an index with the additional (numeric) type hint

e.g. MATCH (p:Person) WHERE p.age > 0 RETURN p ORDER BY p.age

we might need to find a way to support adding these type hints where necessary.

TODO manual link
kinda between the lines here: https://neo4j.com/docs/cypher-manual/current/query-tuning/advanced-example/#advanced-query-tuning-example-index-backed-property-lookup

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

No branches or pull requests

1 participant