Library Version 11.2.5.3

DB->stat
Prev | Chapter 13. Upgrading Berkeley DB 3.0 applications to Berkeley DB 3.1 | Next

## DB->stat

For Btree database statistics, the DB->stat() method field bt_nrecs has been removed, replaced by two fields: bt_nkeys and bt_ndata. The bt_nkeys field returns a count of the unique keys in the database. The bt_ndata field returns a count of the key/data pairs in the database. Neither exactly matches the previous value of the bt_nrecs field, which returned a count of keys in the database, but, in the case of Btree databases, could overcount as it sometimes counted duplicate data items as unique keys. The application should be searched for any uses of the bt_nrecs field and the field should be changed to be either bt_nkeys or bt_ndata, whichever is more appropriate.

For Hash database statistics, the DB->stat() method field hash_nrecs has been removed, replaced by two fields: hash_nkeys and hash_ndata. The hash_nkeys field returns a count of the unique keys in the database. The hash_ndata field returns a count of the key/data pairs in the database. The new hash_nkeys field exactly matches the previous value of the hash_nrecs field. The application should be searched for any uses of the hash_nrecs field, and the field should be changed to be hash_nkeys.

For Queue database statistics, the DB->stat() method field qs_nrecs has been removed, replaced by two fields: qs_nkeys and qs_ndata. The qs_nkeys field returns a count of the unique keys in the database. The qs_ndata field returns a count of the key/data pairs in the database. The new qs_nkeys field exactly matches the previous value of the qs_nrecs field. The application should be searched for any uses of the qs_nrecs field, and the field should be changed to be qs_nkeys.

Prev | Up | Next
identical duplicate data items | Home | DB_SYSTEM_MEM