I have two questions about the firestore collection group
.
My data structure is like the bellow different carts for different stores(multi-vendor app).
Users>userId1>Carts>storeId1>Items>productId1
>storeId2>Items>productId1
>productId2
Users>userId2>Carts>storeId1>Items>productId1
Now whenever a product price is changed by the owner I want to update the cart of all users with that product. So If I make Items
subcollection a collection group will there be any performance issue? I mean does a deeper collection group affect the performance? Or It doesn't matter how deep nesting subcollection it is the performance will depend only on the number of documents.
2nd question is the same documentId(productId1)
will be in multiple Items subcollection. So when it will merge and act as a giant Items collection by indexing will there be any conflict for the same document id?