Was wondering if there are any limits to the number of Collections you can create within a single database?
Hi, @Evyn7!! Welcome to the Fauna Forums.
There is no hard limit on the number of Collections in a given database. Do you have a use case to create many collections? I would love to hear about it.
Ok that’s great b/c my use case involves a Member Portal, where each new Member will be assigned their very own Collection, which in turn will contain Members(Docs/Obj’s) that will be uniquely assigned to them.
For me, it’s Speed over Search Queries, meaning the User will log directly into their assigned Collection, as opposed to filtering thru a very large Master Database in search of their assigned members. (Hopefully this makes
Does this sound practical?
After discussion internally, there is a limit to the number of collections in a database: 2^16 - 1024, or 64512.
If you might have more users than that, you want to create a child database per user.
Ok. B/C this was going to be my next question (Collections .vs. Databases).
Is there a limit to the number of “Child” Databases, or is this unlimited?
The number of child databases in a database is: 2^32 - 1, or 4,294,967,295.
We’ll have a documentation update soon that describes all of the limits to databases, collections, indexes, etc.
OK. Thanks Ewan. This is a great help…
…And thanks in advance for the upcoming documentation.
Truly look forward to using the service.
Hi Ewan,
Does each Child Database that’s created get its own ~64K Collection Limit?
Yes, the database limits apply to any database, no matter how deeply nested they are.
Following this logic Ewan…
Can a Collection have an “Unlimited” number of Documents
- regardless its nested level?
Or is there a limit to the number of Documents that can occupy
a Collection?
Following this logic Ewan…
Can a Collection have an “Unlimited” number of Documents
- regardless its nested level?
Or is there a limit to the number of Documents that can occupy
a Collection?
The number of documents in a single collection is not unlimited, but it is a rather large number of documents: 2^63 - 1, or 9,223,372,036,854,775,807.
If you were to insert documents at a rate of 5,000 per second, it would take about 58 million years to reach the limit. There’s a chance that we’d run out of available storage before you did so.
Wow! Thanks Ewan.
This is very helpful to know this.