Cosmos DB storage quota usage for keys

RG 1 Reputation point

Hi Team,

I am planning to use Azure Cosmos DB for few of my use cases.
Given that Cosmos DB is primarily a document based storage, I wanted to know about the storage profile (and corresponding costing) of the keys in my JSON document. Let's say a key is present in multiple documents.
Would I be charged for storage for the key depending on the length of the key only once (and probably a constant storage difference after first document) or would I be charged for the storage individually per document. I am only concerned about keys here, not their value. Trying to see if we need to reduce length of the keys used in documents to reduce storage costs.


Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,539 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 27,031 Reputation points Microsoft Employee

    @RG ,

    Have a look at Optimize storage cost in Azure Cosmos DB, specifically the section under indexing. If you have multiple documents that will share an index, then you can create a custom index policy that will be written once.

    0 comments No comments