btree(3) Library Functions Manual btree(3) btree - LIBRARY Standard C library (libc, -lc) #include #include Note well: This page documents interfaces provided up until glibc 2.1. Since glibc 2.2, glibc no longer provides these interfaces. Probably, you are looking for the APIs provided by the libdb library instead. dbopen(3) -- . -- btree. dbopen(3). , btree. btree -- , , <</>>. btree, dbopen(3), : typedef struct { unsigned long flags; unsigned int cachesize; int maxkeypage; int minkeypage; unsigned int psize; int (*compare)(const DBT *key1, const DBT *key2); size_t (*prefix)(const DBT *key1, const DBT *key2); int lorder; } BTREEINFO; : flags : R_DUP , . . , . , dbopen(3), , <<>> ; , R_NOOVERWRITE. R_DUP R_NOOVERWRITE; R_NOOVERWRITE , . , / get, seq, R_CURSOR, <<>> . cachesize ( ) . , . , , , . , , , /. , ( ) . cachesize 0 (. ., ), . maxkeypage , . . minkeypage , . (overflow pages), . ., , pagesize, minkeypage, , . minkeypage 0 ( ), 2. psize ( ), -- 512 , -- 64 . psize 0 ( ), / . compare . , , , , . . compare NULL ( ), , . ., , . prefix . , , ; , , , . , , . , , . prefix NULL ( ) , . prefix NULL , . lorder , . ; , <> 4321. lorder 0 ( ), , . If the file already exists (and the O_TRUNC flag is not specified), the values specified for the arguments flags, lorder, and psize are ignored in favor of the values used when the tree was created. . , /, , . , . -- . , O lg N, -- . , , , , . btree errno dbopen(3). . . dbopen(3), hash(3), mpool(3), recno(3) The Ubiquitous B-tree, Douglas Comer, ACM Comput. Surv. 11, 2 (June 1979), 121-138. Prefix B-trees, Bayer and Unterauer, ACM Transactions on Database Systems, Vol. 2, 1 (March 1977), 11-26. The Art of Computer Programming Vol. 3: Sorting and Searching, D.E. Knuth, 1968, pp 471-480. Artyom Kunyov , Azamat Hackimov , Dmitriy Ovchinnikov , Dmitry Bolkhovskikh , ITriskTI , Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . btree(3)