I have a collection. My collection has 30 000 000 documents. I want to receive all its by means AQL query. I do so:
FOR c FROM MyCollection
SORT c.value ASC LIMIT 30000000
RETURN c.id
But I receives no more 1001 documents. Why?
I have a collection. My collection has 30 000 000 documents. I want to receive all its by means AQL query. I do so:
FOR c FROM MyCollection
SORT c.value ASC LIMIT 30000000
RETURN c.id
But I receives no more 1001 documents. Why?
The AQL editor in the web interface has a select box at the bottom that allows specifying the maximum number of documents to receive. The selected value defaults to 1000, so only 1000 documents will be fetched.
You can increase the number up to 5000 results using the select box. This value is an arbitrary limit, however, it protects you from actions such as trying to fetch 30M documents into your browser, which is an operation that will not work (your browser will likely run out of memory or it will come to a grinding halt when trying to render the HTML for 30M rows).
https://github.com/solher/arangolite/blob/master/requests/aql.go
, it seems that this driver does not support the full cursor API of ArangoDB. A cursor is normally created using HTTP POST to /_api/cursors, and then the results are fetched in batches. The default batch size is 1000. The driver will only fetch the first batch but not any of the remaining batches. It seems that one can set a BatchSize
property somehow to make all the results go into the first batch. –
Dowell © 2022 - 2024 — McMap. All rights reserved.