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

Minor optimizaitons #1020

Merged
merged 2 commits into from
Feb 18, 2024
Merged

Minor optimizaitons #1020

merged 2 commits into from
Feb 18, 2024

Conversation

tomchop
Copy link
Collaborator

@tomchop tomchop commented Feb 17, 2024

  • Optimize some AQL queries
  • Change the way indicators are linked to artifacts (outgoing links)

@@ -588,7 +584,7 @@ def neighbors(

aql = f"""
FOR v, e, p IN @min_hops..@max_hops {direction} @extended_id @@graph

OPTIONS {{ uniqueVertices: "path" }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

for my own understanding, no impact on using this option?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, but the impact is intended.

This will just make sure that when traversing the graph, a same vertice isn't traversed more than once per path (in a connected graph, this can be useful to avoid infinite paths :D)

Check out the OPTIONS section here: https://docs.arangodb.com/3.12/aql/graphs/traversals/#working-with-named-graphs

Copy link
Collaborator

@udgover udgover left a comment

Choose a reason for hiding this comment

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

LGTM! Left just one question for my own understanding :)

@tomchop tomchop merged commit ac17abd into main Feb 18, 2024
2 checks passed
@tomchop tomchop deleted the aqloptimize branch February 18, 2024 12:55
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

Successfully merging this pull request may close these issues.

2 participants