Article For
4.1 4.2 5.0 5.2 5.3

Operations: How to Get Detailed Database Statistics

GetDetailedStatisticsOperation will retrieve the same database statistics as GetStatisticsOperation plus total count of identities and counters.


public GetDetailedStatisticsOperation()
Return Value
DetailedDatabaseStatistics Detailed database statistics


DetailedDatabaseStatistics stats = store.Maintenance.Send(new GetDetailedStatisticsOperation());
long countOfDocuments = stats.CountOfDocuments;
long countOfIndexes = stats.CountOfIndexes;
long countOfCompareExchange = stats.CountOfCompareExchange;
long countOfIdentities = stats.CountOfIdentities;
bool isStale = stats.Indexes[0].IsStale;