Index WHERE meant for unrelated document types.
If N is few you can create. If lot use as INDEX key leading most. If EE use partition BY HASH(cutsId) if it is immutable
You won’t have an index for new customers that are added. Also - I suspect there is no performance benefit. as the query will need to figure out which index to use - or use all of them. Why not use the customerId as the document id and use the kv api or “use keys”
I have multiple records per customer in the same collection, so key is random guid.
If you can clarify below things:
is there hard coded limit for no of indexes? Yes / No ?
if there are many indexes, then if any document gets upserted, then will it take time indexes to be updated even if i have use partial index? Lets say i insert one record with custId = c1, then it will update only one partial index (where custId = c1) or affect others as well.
I don’t know. One could perform an experiment to create indexes in a loop until failure. If there is no limit on the number of indexes, but you encounter other issues, then then the number of indexes would not be relevant. To determine if your design is feasible for your purpose, conduct an experiment.
Edit: 6708 and counting.
I don’t know why they would. Again, a quick experiment would reveal the behavior.