-
Notifications
You must be signed in to change notification settings - Fork 64
updating query plan for operator.adoc #395
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
Conversation
|
Looks like you've updated the documentation! Check out your changes at https://neo4j-docs-cypher-395.surge.sh |
…r into fix-operator-plan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change Query into:
PROFILE
MATCH (bob:Person {name: 'Bob'})-[:WORKS_IN]->(loc)<-[:WORKS_IN]-(matt:Person {name: 'Mattias'}) USING JOIN ON loc
RETURN loc.name
remove noplay roles
|
One last query plan due to a change happened in January, where |
To a good extent, this is a rollback of #395. This investigation started with the query plan of `CacheProperties` being wrong since... well, there was no `CacheProperties` operator in the plan. The testing was happy that way, which was odd. It turned out that it was because of the example query in the `Eager` operator, which effectively _cleared_ the database, so that all examples afterwards ran on an empty db. `CacheProperties` comes after `Eager` in the operators page, so that the `CacheProperties` example ran on an empty db. Summary of changes: - Changed `Eager` example so that it deletes only _two_ nodes, rather than _all_ nodes. The query plan is essentially unchanged, other than indexes being used. Most notably, `Eager` is still triggered, presumably as the db doesn't know upfront how many nodes have that property value anyway. - Fixing the above triggered a bunch of failures (for `CacheProperties`, `EagerAggregation`, `Distinct`) , which are essentially the plans changed in #395. I've restored them as they were before, but not altered them otherwise. - Given proper names to indexes/constraints, describing what they _index_ rather than what they _test_. - Moved the setup queries _inside_ the sections they belong to, rather than _before_ the respective openings. - Removed a setup block that dropped and recreated the exact same index. - The `Delete` example was acting on `(me:Person {name: 'me'})`, which has relationships attached to it, so an error is raised. Or rather, no failure used to happen because, previously, the `Eager` example cleared the whole db, so `DELETE me` was deleting a non-existent node, and now the `Eager` example `DETACH DELETE`s the `me` node, so that it keeps not existing. However, if for whatever reason we changed some of the examples involved and it turned out that `me` existed with relationships (as the page setup creates), then we'd get a failure. So I've changed the `DELETE` example to act on `you`, rather than `me`, as `you` never exists. There's also some perverse joy involved with pretending to obliterate the reader, so I like it better.
To a good extent, this is a rollback of neo4j#395. This investigation started with the query plan of `CacheProperties` being wrong since... well, there was no `CacheProperties` operator in the plan. The testing was happy that way, which was odd. It turned out that it was because of the example query in the `Eager` operator, which effectively _cleared_ the database, so that all examples afterwards ran on an empty db. `CacheProperties` comes after `Eager` in the operators page, so that the `CacheProperties` example ran on an empty db. Summary of changes: - Changed `Eager` example so that it deletes only _two_ nodes, rather than _all_ nodes. The query plan is essentially unchanged, other than indexes being used. Most notably, `Eager` is still triggered, presumably as the db doesn't know upfront how many nodes have that property value anyway. - Fixing the above triggered a bunch of failures (for `CacheProperties`, `EagerAggregation`, `Distinct`) , which are essentially the plans changed in neo4j#395. I've restored them as they were before, but not altered them otherwise. - Given proper names to indexes/constraints, describing what they _index_ rather than what they _test_. - Moved the setup queries _inside_ the sections they belong to, rather than _before_ the respective openings. - Removed a setup block that dropped and recreated the exact same index. - The `Delete` example was acting on `(me:Person {name: 'me'})`, which has relationships attached to it, so an error is raised. Or rather, no failure used to happen because, previously, the `Eager` example cleared the whole db, so `DELETE me` was deleting a non-existent node, and now the `Eager` example `DETACH DELETE`s the `me` node, so that it keeps not existing. However, if for whatever reason we changed some of the examples involved and it turned out that `me` existed with relationships (as the page setup creates), then we'd get a failure. So I've changed the `DELETE` example to act on `you`, rather than `me`, as `you` never exists. There's also some perverse joy involved with pretending to obliterate the reader, so I like it better.
No description provided.