From 780b92ada9afcf1d58085a83a0b9e6bc982203d1 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 17 Feb 2015 17:25:57 +0000 Subject: Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz. --- docs/programmer_reference/am_conf_logrec.html | 107 +++++++++++++++----------- 1 file changed, 61 insertions(+), 46 deletions(-) (limited to 'docs/programmer_reference/am_conf_logrec.html') diff --git a/docs/programmer_reference/am_conf_logrec.html b/docs/programmer_reference/am_conf_logrec.html index 9f72bcc5..68906418 100644 --- a/docs/programmer_reference/am_conf_logrec.html +++ b/docs/programmer_reference/am_conf_logrec.html @@ -14,7 +14,7 @@ -

The Berkeley DB Btree, Queue and Recno access methods can operate on logical -record numbers. Record numbers are 1-based, not 0-based, that is, the -first record in a database is record number 1.

-

In all cases for the Queue and Recno access methods, and when calling -the Btree access method using the DB->get() and DBC->get() methods -with the DB_SET_RECNO flag specified, the data field of -the key DBT must be a pointer to a memory location of type -db_recno_t, as typedef'd in the standard Berkeley DB include file. -The size field of the key DBT should be the size of that -type (for example, "sizeof(db_recno_t)" in the C programming language). -The db_recno_t type is a 32-bit unsigned type, which limits the -number of logical records in a Queue or Recno database, and the maximum -logical record which may be directly retrieved from a Btree database, -to 4,294,967,295.

-

Record numbers in Recno databases can be configured to run in either -mutable or fixed mode: mutable, where logical record numbers change as -records are deleted or inserted, and fixed, where record numbers never -change regardless of the database operation. Record numbers in Queue -databases are always fixed, and never change regardless of the database -operation. Record numbers in Btree databases are always mutable, and -as records are deleted or inserted, the logical record number for other -records in the database can change. See -Logically renumbering records -for more information.

-

When appending new data items into Queue databases, record numbers wrap -around. When the tail of the queue reaches the maximum record number, -the next record appended will be given record number 1. If the head of -the queue ever catches up to the tail of the queue, Berkeley DB will return -the system error EFBIG. Record numbers do not wrap around when appending -new data items into Recno databases.

-

Configuring Btree databases to support record numbers can severely limit -the throughput of applications with multiple concurrent threads writing -the database, because locations used to store record counts often become -hot spots that many different threads all need to update. In the case -of a Btree supporting duplicate data items, the logical record number -refers to a key and all of its data items, as duplicate data items are -not individually numbered.

-

The following is an example function that reads records from standard -input and stores them into a Recno database. The function then uses a -cursor to step through the database and display the stored records.

+

+ The Berkeley DB Btree, Queue and Recno access methods can + operate on logical record numbers. Record numbers are 1-based, + not 0-based, that is, the first record in a database is record + number 1. +

+

+ In all cases for the Queue and Recno access methods, and + when calling the Btree access method using the DB->get() and + DBC->get() methods with the DB_SET_RECNO flag specified, + the data field of the key + DBT must be a pointer to a memory location of type db_recno_t, as typedef'd in the + standard Berkeley DB include file. The size + field of the key DBT should be the size + of that type (for example, "sizeof(db_recno_t)" in the C + programming language). The db_recno_t + type is a 32-bit unsigned type, which limits the number of logical + records in a Queue or Recno database, and the maximum logical record + which may be directly retrieved from a Btree database, to 4,294,967,295. +

+

+ Record numbers in Recno databases can be configured to run + in either mutable or fixed mode: mutable, where logical record + numbers change as records are deleted or inserted, and fixed, + where record numbers never change regardless of the database + operation. Record numbers in Queue databases are always fixed, + and never change regardless of the database operation. Record + numbers in Btree databases are always mutable, and as records + are deleted or inserted, the logical record number for other + records in the database can change. See Logically renumbering + records for more + information. +

+

+ When appending new data items into Queue databases, record + numbers wrap around. When the tail of the queue reaches the + maximum record number, the next record appended will be given + record number 1. If the head of the queue ever catches up to + the tail of the queue, Berkeley DB will return the system + error EFBIG. Record numbers do not wrap around when appending + new data items into Recno databases. +

+

+ Configuring Btree databases to support record numbers can + severely limit the throughput of applications with multiple + concurrent threads writing the database, because locations + used to store record counts often become hot spots that many + different threads all need to update. In the case of a Btree + supporting duplicate data items, the logical record number + refers to a key and all of its data items, as duplicate data + items are not individually numbered. +

+

+ The following is an example function that reads records from + standard input and stores them into a Recno database. The + function then uses a cursor to step through the database and + display the stored records. +

-
-int
+      
int
 recno_build(DB *dbp)
 {
     DBC *dbcp;
-- 
cgit v1.2.1