Description: Berkeley DB: An embedded database programmatic toolkit.
Keywords: embedded,database,programmatic,toolkit,b+tree,btr ee,hash,hashing,transaction,transactions,locking,logging,access method,access me thods,java,C,C++

### Berkeley DB Reference Guide: Access Methods

# Database statistics

The DB->stat function is the standard function for obtaining database statistics. Generally, the stat function returns a set of statistics about the underlying database, e.g., the number of key/data pairs in the database, how the database was originally configured, and so on. In most cases, this information is specific to the access method for which it was created, e.g., only Btree databases will return the number of levels in the underlying database tree.

There is one flag that you can set to customize the returned statistics:

DB_RECORDCOUNT
  If the database is a Recno database