You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 5.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Commands: How to get database and server statistics?

There are two types of statistics available. First type of statistics returns server-wide information, the second one returns statistics for particular database.

Database statistics

Database statistics can be downloaded using GetStatistics method in the commands.


DatabaseStatistics GetStatistics();
Return Value
DatabaseStatistics Current statistics for a database that commands work on


DatabaseStatistics statistics = store.DatabaseCommands.GetStatistics();

Server statistics

Server statistics can be downloaded using GetStatistics method in GlobalAdmin commands.


AdminStatistics GetStatistics();
Return Value
AdminStatistics Current statistics for a server


AdminStatistics serverStatistics = store