Hi,
I am trying to run a graph AQL query. But it is using too much memory to
run. Even after I give 20GB to ArangoDB, the query doesn’t complete and
runs out of memory. I am running ArangoDB inside docker. I tried both
3.3.22 and 3.4.5(with RocksDB) versions. The issue happens in both
versions. Is there anything wrong in the following query that I am doing? Is
the huge memory usage because of storing intermediate results in memory?
Even though the entire DB is only 500MB in size, why is the query taking
GBs of memory to run?
LET edgeCollection = ( FOR v, e, p IN 1 .. 10
OUTBOUND 'seVertexCollection/72919271699415'
seProviderEdgeCollection
OPTIONS { bfs: true, uniqueVertices: 'path', uniqueEdges: 'path' }
FILTER p.vertices[*].entityType NONE IN
["ComputeTier","StorageTier","DatabaseTier"]
LET from = FIRST(
FOR fv IN seVertexCollection
FILTER fv._id == e._from
RETURN fv
)
LET to = FIRST(
FOR tv IN seVertexCollection
FILTER tv._id == e._to
RETURN tv
)
FILTER from.entityType != null && to.entityType != null
COLLECT ttype = to.entityType
INTO groups = {
provider: { entityType: from.entityType, state: from.state, id:
from._key },
consumer: { entityType: to.entityType, state: to.state, id:
to._key }
}
RETURN { entityType: ttype, edges: UNIQUE(groups[*]) }
)
LET originCollection = ( RETURN
DOCUMENT('seVertexCollection/72919271699415') )
LET origin = FIRST(originCollection)
RETURN { origin: {id: origin._key, entityType: origin.entityType, state:
origin.state}, edgeCollection: edgeCollection }
The seVertexCollection stats are given below:
Journal size:
33.55 MB
Wait for sync:
false
ID:
9586267
Revision:
1631547879042580493
Type:
document
Status:
loaded
Index buckets:
8
Compaction status:
checked datafiles, but no compaction opportunity found
(2019-04-25T19:45:05Z)
Waiting for:
-
Type
Count
Size
Deletion
Info
Alive
73,572
457.51 MB
-
Dead
0
0 B
0
Type
Count
Size
Info
Datafiles
13
436.21 MB
Journals
1
33.55 MB
Compactors
0
0 B
Indexes
5
21.6 MB
Indexes:
ID
Type
Unique
Sparse
Deduplicate
Selectivity Est.
Fields
Action
0
primary
true
false
n/a
100.00%
_key
9586290
fulltext
false
true
n/a
n/a
displayName
9586293
hash
false
false
true
0.01%
entityType
9586296
hash
false
false
true
100.00%
uuid
9586299
hash
false
false
true
100.00%
oid
The seProviderEdgeCollection has the following stats:
Journal size:
33.55 MB
Wait for sync:
false
ID:
9586273
Revision:
1631547879127515188
Type:
edge
Status:
loaded
Index buckets:
8
Compaction status:
skipped compaction because collection has no datafiles
(2019-04-25T19:47:15Z)
Waiting for:
-
Type
Count
Size
Deletion
Info
Alive
163,107
24.79 MB
-
Dead
0
0 B
0
Type
Count
Size
Info
Datafiles
0
0 B
Journals
1
33.55 MB
Compactors
0
0 B
Indexes
2
22.12 MB
Indexes:
ID
Type
Unique
Sparse
Deduplicate
Selectivity Est.
Fields
Action
0
primary
true
false
n/a
100.00%
_key
1
edge
false
false
n/a
33.90%
_from, _to
Thanks,
John
--
You received this message because you are subscribed to the Google Groups
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.