-I:Berkeley DB Reference Guide: Access Methods[P4

Berkeley DB Reference Guide: Access Methods



,

Logical record numbers



SBoth the Berkeley DB Btree and Recno access methods can be&accessed using logical record numbers.

DIn all cases for the Recno access method, and in some cases with theDBtree access method, a record number may be specified to reference aCspecific key/data pair. In the case of Btrees supporting duplicateEdata items, i.e., a single key may have more than one associated dataCitem, the logical record refers to a key and all of its data items.

DRecord numbers are 32-bit unsigned types, which limits the number of/logical records in a database to 4,294,967,296.

GLogical record numbers are 1-based, not 0-based, i.e., the first record#in the database is record number 1.

FRecord numbers in Btree databases are always mutable, i.e., as recordsGare deleted or inserted, the logical record number for other records inFthe database can change. The Recno access method can be configured toJrun in either mutable or fixed mode: mutable, where logical record numbersJchange as records are deleted or inserted, and fixed, where record numbers8never change regardless of the database operation. (SeeTLogically renumbering records (DB_RENUMBER)for more information.

HConfiguring Btree databases to support record numbers can severely limitGthe throughput of applications with multiple concurrent threads writing the database.

HAJÿÿ