Hi @Ahsan Habib , welcome to Microsoft Q&A forum.
If I understand it correctly you want to know the disadvantages of using a unique GUID as partition key for Azure Cosmos DB Container.
Only disadvantage here that we see will be if we don't use the partition key in our queries then they will be all cross-partition queries which are definitely costlier.
Avoiding cross-partition queries
There will also be no transaction as transaction scope is limited to single partition key.
Choosing a partition key that has unique values will definitely have more pros than cons. We must always try to choose a partition key that offers more cardinality which means more range of possible value. GUID surely belongs there as it has all unique values. Another thing to mention is each partition key in this case will have a unique logical partition however this does not have any impact on performance and any other feature of cosmos db.
Advantages:
- Good cardinality as wide range of values available
- It will help us to avoid transactions
- Even balancing of RU consumption of partition, which would help us in avoiding hot partitions.
- Faster reads, so less RU charges
Although designing the partition key will altogether be a different topic in case you want to discuss that we well.
Please let us know if this helps or else we can discuss further on the same.
----------
If answer is helpful please click on as it could help other members of the Microsoft Q&A community who have similar questions and are looking for solutions. Thank you for helping to improve Microsoft Q&A!