diff options
| author | Simon Riggs <simon@2ndQuadrant.com> | 2014-11-18 10:24:55 +0000 |
|---|---|---|
| committer | Simon Riggs <simon@2ndQuadrant.com> | 2014-11-18 10:24:55 +0000 |
| commit | 606c0123d627b37d5ac3f7c2c97cd715dde7842f (patch) | |
| tree | d7afc6412732b75ada6c45581d59a4ee7abf487d /src/include | |
| parent | dedae6c211415290cdf5faca4ef874f803af204c (diff) | |
| download | postgresql-606c0123d627b37d5ac3f7c2c97cd715dde7842f.tar.gz | |
Reduce btree scan overhead for < and > strategies
For <, <=, > and >= strategies, mark the first scan key
as already matched if scanning in an appropriate direction.
If index tuple contains no nulls we can skip the first
re-check for each tuple.
Author: Rajeev Rastogi
Reviewer: Haribabu Kommi
Rework of the code and comments by Simon Riggs
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/access/nbtree.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h index c8bb3f5d66..6ecd2ced62 100644 --- a/src/include/access/nbtree.h +++ b/src/include/access/nbtree.h @@ -618,6 +618,7 @@ typedef BTScanOpaqueData *BTScanOpaque; */ #define SK_BT_REQFWD 0x00010000 /* required to continue forward scan */ #define SK_BT_REQBKWD 0x00020000 /* required to continue backward scan */ +#define SK_BT_MATCHED 0x00040000 /* required to skip further key match */ #define SK_BT_INDOPTION_SHIFT 24 /* must clear the above bits */ #define SK_BT_DESC (INDOPTION_DESC << SK_BT_INDOPTION_SHIFT) #define SK_BT_NULLS_FIRST (INDOPTION_NULLS_FIRST << SK_BT_INDOPTION_SHIFT) |
