Nov 11 2021 12:22 AM
One of the most emphasized rules I have learned from my experience when working with Cosmos DB is that, in your documents, you have to separate the parts which change very often from the parts which are rarely updated.
Like for instance, likes count in a post or comment. Whilst the posts content, title, author and tags are less likely to change after being set, it ok to put them together in a single document. But to include the post's likes count was not a good practice as every time the post get liked, shared or commented on, you had to update the whole document, which might not be ideal.
Edit: I just selected the SqlClient label because there's no Cosmos DB label and I wasn't able to post without a label. 🤷:male_sign:
Jan 17 2022 07:46 AM