{NOTE: }
-
Statistics can be retrieved for the database and for collections.
-
By default, statistics are retrieved for the database defined in the Document Store.
To get database and collection statistics for another database use ForDatabase. -
In this page:
{PANEL: Get collection statistics}
To get collection statistics, use GetCollectionStatisticsOperation
:
{CODE stats_1@ClientApi\Operations\Maintenance\GetStats.cs /}
Statistics are returned in the CollectionStatistics
object.
{CODE stats_1_results@ClientApi\Operations\Maintenance\GetStats.cs /}
{PANEL/}
{PANEL: Get detailed collection statistics}
To get detailed collection statistics, use GetDetailedCollectionStatisticsOperation
:
{CODE stats_2@ClientApi\Operations\Maintenance\GetStats.cs /}
Statistics are returned in the DetailedCollectionStatistics
object.
{CODE stats_2_results@ClientApi\Operations\Maintenance\GetStats.cs /}
{PANEL/}
{PANEL: Get database statistics}
To get database statistics, use GetStatisticsOperation
:
{CODE stats_3@ClientApi\Operations\Maintenance\GetStats.cs /}
Statistics are returned in the DatabaseStatistics
object.
{CODE stats_3_results@ClientApi\Operations\Maintenance\GetStats.cs /}
{PANEL/}
{PANEL: Get detailed database statistics}
To get detailed database statistics, use GetDetailedStatisticsOperation
:
{CODE stats_4@ClientApi\Operations\Maintenance\GetStats.cs /}
Statistics are returned in the DetailedDatabaseStatistics
object.
{CODE stats_4_results@ClientApi\Operations\Maintenance\GetStats.cs /}
{PANEL/}
{PANEL: Get statistics for another database}
- By default, you get statistics for the database defined in your Document Store.
- Use
ForDatabase
to get database and collection statistics for another database. ForDatabase
can be used with any of the above statistics options.
{CODE stats_5@ClientApi\Operations\Maintenance\GetStats.cs /}
- Learn more about switching operations to another database here.
{PANEL/}