CosmosDb Mongo - index limits

David Ribeiro 82 Reputation points
2020-09-21T11:29:32.967+00:00

Hi all,
I have a collection in cosmosdb, Mongo 3.6.
The collection is sharded and has about two million documents.

I have three fields indexed, the shard key, and two more "string" fields".

I checked my cosmosdb metrics, and it shows the following

26174-image.png

So my question is, is there any limitation of the memory or storage of a given index that I should be aware of?

Is it possible to know how much memory/storage one index can consume?

Thanks a lot.

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

1 answer

Sort by: Most helpful
  1. Mark Brown - MSFT 2,766 Reputation points Microsoft Employee
    2020-09-21T16:52:15.72+00:00

    It is not possible to get the size of specific indexes. You can however see the size of all indexes via portal or diagnostic logs. You can also set alerts on storage size as well.

    To see index size in portal to your Cosmos account in Azure Portal then Metrics, select Storage tab, then select your database and collection.

    For more information on setting alerts see, https://video2.skills-academy.com/en-us/azure/cosmos-db/create-alerts

    For more information on querying diagnostic logs for storage metrics see, https://video2.skills-academy.com/en-us/azure/cosmos-db/monitor-cosmos-db-reference


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.