Running out of RAM on large AQL query | Trying to split a collection into two

Viewed 158

In my efforts to solve my issue here, I'm using ArangoDb's AQL language to split a collection into two. As creating graphs can only be done on "normalized" collections. But my query is eating up all of my RAM (16gb).

FOR comment IN collection_name
    COLLECT author = comment.author
    , subreddit = comment.subreddit
    WITH COUNT INTO counter
    RETURN {author, counter, subreddit}

Is there a way I could dump the results directly to disk without pulling it into RAM? Or a way I could split it directly without using a query?

1 Answers
Related