summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2003-12-21 01:23:06 +0000
committerTom Lane2003-12-21 01:23:06 +0000
commit569659ae16f4e4f3585ec4197f1017db53d184ef (patch)
tree0be6fb9762eeae3c5039ee2292bc37b95994f04c /src/include
parent772d0f9345adc32c401ec9098083a4ffc0ff4603 (diff)
Improve btree's initial-positioning-strategy code so that we never need
to step more than one entry after descending the search tree to arrive at the correct place to start the scan. This can improve the behavior substantially when there are many entries equal to the chosen boundary value. Per suggestion from Dmitry Tkach, 14-Jul-03.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/nbtree.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h
index 6fc61a90999..62af3ca30e9 100644
--- a/src/include/access/nbtree.h
+++ b/src/include/access/nbtree.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/nbtree.h,v 1.74 2003/11/29 22:40:55 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/access/nbtree.h,v 1.75 2003/12/21 01:23:06 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -459,12 +459,13 @@ extern int _bt_pagedel(Relation rel, Buffer buf, bool vacuum_full);
/*
* prototypes for functions in nbtsearch.c
*/
-extern BTStack _bt_search(Relation rel, int keysz, ScanKey scankey,
- Buffer *bufP, int access);
+extern BTStack _bt_search(Relation rel,
+ int keysz, ScanKey scankey, bool nextkey,
+ Buffer *bufP, int access);
extern Buffer _bt_moveright(Relation rel, Buffer buf, int keysz,
- ScanKey scankey, int access);
+ ScanKey scankey, bool nextkey, int access);
extern OffsetNumber _bt_binsrch(Relation rel, Buffer buf, int keysz,
- ScanKey scankey);
+ ScanKey scankey, bool nextkey);
extern int32 _bt_compare(Relation rel, int keysz, ScanKey scankey,
Page page, OffsetNumber offnum);
extern bool _bt_next(IndexScanDesc scan, ScanDirection dir);