Skip to content

Conversation

@JPryce-Aklundh
Copy link
Collaborator

No description provided.

----
The result is a significantly faster query (down from 59 to 9 milliseconds):
The result is a less resource intensive query:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the drop in execution time not worth mentioning?

This constraint will inform the planner of the uniqueness of `trail` values up front.
As a result, the simpler shortest path query (without a `CALL` subquery) will now generate a faster plan (using the `StatefulShortestPath(Into)`) operator with a cardinality of 1 for both the source and target nodes of the shortest path.
As a result, the simpler shortest path query (without a `CALL` subquery) will now generate a faster plan (using the `ShortestPath` operator) with a cardinality of 1 for both the source and target nodes of the shortest path.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I didn't realise that both queries are planned as ShortestPath. So there is no example where SSP(Into) improves performance. I think we need that. The simplest thing to do would be to change the quantifier to {2,}.

Copy link
Contributor

@dogofbrian dogofbrian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@neo4j-docops-agent
Copy link
Collaborator

neo4j-docops-agent commented Sep 17, 2025

Thanks for the documentation updates.

The preview documentation has now been torn down - reopening this PR will republish it.

@JPryce-Aklundh JPryce-Aklundh merged commit 2b99006 into neo4j:dev Sep 17, 2025
5 checks passed
@JPryce-Aklundh JPryce-Aklundh deleted the shortest_update branch September 17, 2025 07:46
JPryce-Aklundh added a commit that referenced this pull request Sep 17, 2025
JPryce-Aklundh added a commit that referenced this pull request Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants