Library Version 12.1.6.0

Db::stat_print()
Prev | Chapter 2. The Db Handle | Next

## Db::stat_print()

    #include <db_cxx.h>

    int
    Db::stat_print(u_int32_t flags);

The `Db::stat_print()` method displays the database statistical information, as described for the Db::stat() method. The information is printed to a specified output channel (see the DbEnv::set_msgfile() method for more information), or passed to an application callback function (see the DbEnv::set_msgcall() method for more information).

The `Db::stat_print()` method may not be called before the Db::open() method is called.

The `Db::stat_print()` method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

For Berkeley DB SQL table or index statistics, see Command Line Features Unique to dbsql.

### Parameters

#### flags

The flags parameter must be set to 0 or by bitwise inclusively OR'ing together one or more of the following values:

- `DB_FAST_STAT`

  Return only the values which do not require traversal of the database. Among other things, this flag makes it possible for applications to request key and record counts without incurring the performance penalty of traversing the entire database.

- `DB_STAT_ALL`

  Display all available information.

### Class

Db

### See Also

Database and Related Methods

Prev | Up | Next
Db::stat() | Home | Db::sync()