Evan
Evan

Reputation: 2040

Putting all users in one collection Firebase?

I was wondering if adding more documents to a collection is unscalable/will cause longer retrieval times. I have an application set up right now where all users are in a single collection and it seems fine everything works but I'm a bit concerned that this would be unsustainable with large amounts of users.

The Firebase documentation claims that the number of documents you can have in a collection is unlimited but I'd like to confirm that placing thousands of documents in one collection won't slow down read/write times, etc.

Thanks

Upvotes: 0

Views: 98

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317572

The Firebase documentation is correct. The number of documents in a collection doesn't affect the performance of queries against that collection. The performance of a query is only related to the number of documents in the query, not the size of the collection.

Upvotes: 1

Related Questions