cosmosDB : how to see the records based on partition , using azure portal metrics

SOHRAB SHAIKH (EXTERNAL) 41 Reputation points
2023-02-09T03:40:12.15+00:00

Hello,

I want to see the records ( objects) in cosmosDB, for each partition.

How can i get a view of that.

In cosmosDB I have partition with sharKey as "part1", part2", "partN"

On Azure portal, i like to see how much data each partition has and memory of each partition.

Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
949 questions
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,441 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ShaktiSingh-MSFT 13,271 Reputation points Microsoft Employee
    2023-02-09T05:59:21.8466667+00:00

    Hi @SOHRAB SHAIKH (EXTERNAL) ,

    Welcome to Microsoft Q&A forum and thanks for using Azure services.

    As I understand your ask, you want to get how much data each partition has and memory of each partition.

    • Determine the throughput consumption by a partition key range:

    To determine the throughput distribution of any partitioned container broken down by partition key range IDs, navigate to the Insights pane. Open the Throughput tab, the normalized RU/s consumption across different partition key ranges is shown in the chart.

    Normalized throughput consumption by partition key range IDs

    With the help of this chart, you can identify if there is a hot partition. An uneven throughput distribution may cause hot partitions, which can result in throttled requests and may require repartitioning. After identifying which partition key is causing the skew in distribution, you may have to repartition your container with a more distributed partition key.

    • Determine the data and index usage:

    You can minimize the index usage, maximize the data usage and optimize your queries. To get this data, navigate to the Insights pane and open the Storage tab:

    Data, index, and document consumption

    Reference documentation link: Monitor and debug with insights in Azure Cosmos DB

    Hope this helps. Please let us know if you need more insight. Thanks