Skip to content Skip to sidebar Skip to footer

How Many Collection Document Pairs Can Be Used In Firestore?

I have an app that has this schema: HOME -> Collection -> Document -> Collection -> Document And code: db.collection('coll').doc('doc').collection('subcoll').doc('subd

Solution 1:

You can chain in depth up to a maximum of 100 subcollections. As per the offial documentation regarding usage and limits.

Maximum depth of subcollections: 100

Regarding your question:

Is this a problem?

As far as I know, Firestore can as quickly look up a node at level 1 as it can at level 100. So for a database as yours, depth should not be a factor that affects speed on a technical level.

Solution 2:

The maximum depth of subcollections is 100, as detailed here in the Firestore documentation.

Post a Comment for "How Many Collection Document Pairs Can Be Used In Firestore?"