Question:I want to build
userscollection which will have Documents with IDs as
Z. Each Document will contain a subcollection which will contain data of all users with starting letter
Zdepending on document ID.
In Firestore documentation it is mentioned
Do not use monotonically increasing document IDs such as: Customer1, Customer2, Customer3, … Product 1, Product 2, Product 3, … Such sequential IDs can lead to hotspots that impact latency.
So Does using alphabets as
Document IDcreate the same issue and cause hotspots or some other in efficiencies?
Answer:Yes, you could observe the same effect. It’s best to use fully randomized IDs like you get if you use
add()to create a new document.
If you have better answer, please add a comment about this, thank you!