Skip to content

Commit 2bbc2e2

Browse files
committed
Added comments about FASTBUILD.
Added #define BTREE_VERSION_1.
1 parent 6771220 commit 2bbc2e2

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/include/config.h.in

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,25 @@
282282
*/
283283
/* #define PSQL_ALWAYS_GET_PASSWORDS */
284284

285-
/* Undocumented "features"? */
285+
/*
286+
* Use btree bulkload code:
287+
* this code is moderately slow (~10% slower) compared to the regular
288+
* btree (insertion) build code on sorted or well-clustered data. on
289+
* random data, however, the insertion build code is unusable -- the
290+
* difference on a 60MB heap is a factor of 15 because the random
291+
* probes into the btree thrash the buffer pool.
292+
*
293+
* Great thanks to Paul M. Aoki (aoki@CS.Berkeley.EDU)
294+
*/
286295
#define FASTBUILD /* access/nbtree/nbtsort.c */
287296

297+
/*
298+
* BTREE_VERSION_1: we must guarantee that all tuples in A LEVEL
299+
* are unique, not in ALL INDEX. So, we can use bti_itup->t_tid
300+
* as unique identifier for a given index tuple (logical position
301+
* within a level) and take off bti_oid & bti_dummy (8 bytes total)
302+
* from btree items.
303+
*/
304+
#define BTREE_VERSION_1
305+
288306
#endif /* CONFIG_H */

0 commit comments

Comments
 (0)