Skip to content

[P2] Add Container/Database Statistics command #108

@sajeetharan

Description

@sajeetharan

Feature Request

Priority: P2 (Medium)

Description

CosmosDB Shell's settings command shows limited account info but doesn't expose container/database statistics like storage size, RU consumption, document count, or partition key distribution.

Comparable Features in Other Shells

  • mongosh: db.stats(), db.collection.stats(), db.serverStatus()
  • sqlcmd: sp_spaceused, system views

Proposed Behavior

Add a stats command:

  • stats — Show current container/database statistics
  • Display: document count, storage size (data + index), provisioned/consumed RUs
  • Show partition key distribution and hot partition detection
  • Show top partition keys by storage

Example Usage

cd /MyDatabase/MyContainer
stats
stats --partitions
stats --detailed

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions