I have a container having JSON documents of size ~2KB and has a synthetic partition key constructed as TenantId-Division-UserId
The documents contain following updatable attributes:
- UpdateDate
- DeactivateInd
The TPS on the UPDATE is ~400. Volume of the documents ~30 million
Question: Does CosmosDB DataModel need to be split into two collections one static collection and another a lookup type collection for quick update with less RUs? Any suggestions on the high performance data model with low RUs?
Ref: http://www.mnazureusergroup.com/2018/10/25/azure-cosmos-db-partitioning-design-patterns-part-1/
If you have access patterns where small portions of a document are updated frequently then yes you should consider shredding it and putting it into a different document. I would not put it into a different container because you then cannot query for the entire document in a single operation. Doing updates on smaller documents is much cheaper than doing a replace on a large one.
Before committing to this however, you should measure the impact on RU/s to ensure doing so is a less expensive option.