Graphic handling performance issue in ArangoDB

I installed a simple test case to finally find out some graph databases

I have a simple tree structure based on a set of approximately 80,000 vertices / documents with approximately 25 attributes. The only edges are the outgoing "is_parent" edges, so to find the children of each node, I can just pick up all the incoming edges. I did not specify any specific indexes in any fields. The 20-level tree is deep, and I grab a random node on the fifth level, to then take all the descendants of this node using a graph traversal:

FOR t IN GRAPH_TRAVERSAL("sample_tree", "sampleunit/2565130142666", "inbound",  {"maxDepth":20}) RETURN t'

It takes a little over 3 seconds on my dev machine and I feel like I can do something wrong. Is there a way to speed up the process or am I having any conceptual issues?

+4
source share
2 answers

I installed an exemplary tree graph as you described and ran a query on it.

Interestingly, the following query ran much faster than your query:

FOR t IN TRAVERSAL(sampleunit, unitlinks, "sampleunit/2565130142666", "inbound",  {"maxDepth":20}) RETURN t

The above query uses the "senior" crawl function in AQL. We checked why there is a performance difference between the two types of workarounds and finally found something that could be improved.

The fix for this was moved to branches 2.2 and devel. It is included in commit 9a1eb149aa4da514d709c43a4ebdfd8819ba2f1d if you prefer cherry picking.

+4
source

I see a similar problem between NEIGHBORS and GRAPH_NEIGHBORS on version 2.6.3, the first is 30 times faster than the second.

+1
source

All Articles