I have the following pagination query:
g.V().hasLabel('my-label').flatMap(out().order().by(id)).range(15000, 15299)
and I getting the following error:
[ERROR] GremlinServerError: 500: {"code":"MemoryLimitExceededException","requestId":"...","detailedMessage":"Query cannot be completed due to memory limitations."}
So is order()
causing the db to load all nodes into memory, and caused memory issue?
How can I get around this?