A large query consists of ~100 blocks that has results exceed the memory limit of the VM(node) could potentially get a dgraph server instance killed due to OOM.
Other than optimising the order of the query block, ie run the block with filter first, to reduce the total result found, another suggestion is to use pagination, but from our testing, when paginating a result set of 1000 to 10 items/page, 1000 results are still found and stored in memory upfront.
Could you provide more detail about the pagination suggestion, please?
Other than these approaches is there anything else we can try to reduce the memory usage to avoid the OOMkilled issue?
Any suggestion would be much appreciated.