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?
If you click on Collection: users at the top on the right-hand side of the ArangoDB logo, the document browser will show the documents in the users collection and you will see the document you just created in the list.
A collection may store a number of documents. A collection is analogous to a table of an RDBMS. A collection may store documents those who are not same in structure. This is possible because MongoDB is a Schema-free database. In a relational database like MySQL, a schema defines the organization / structure of data in a database.
The document is the unit of storing data in a MongoDB database. document use JSON (JavaScript Object Notation, is a lightweight, thoroughly explorable format used to interchange data between various applications) style for storing data. Often, the term "object" is used to refer a document. Documents are analogous to the records of an RDBMS.
MongoDB offers Capped collections for doing so. Capped collections are collections which can store data in the same order it is inserted. It is very fixed size, high-performance and "auto-FIFO age-Out". That is, when the allotted space is fully utilized, newly added objects (documents) will replace the older ones in the same order it is inserted.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With