]> granicus.if.org Git - postgresql/commit
Reduce btree scan overhead for < and > strategies
authorSimon Riggs <simon@2ndQuadrant.com>
Tue, 18 Nov 2014 10:24:55 +0000 (10:24 +0000)
committerSimon Riggs <simon@2ndQuadrant.com>
Tue, 18 Nov 2014 10:24:55 +0000 (10:24 +0000)
commit606c0123d627b37d5ac3f7c2c97cd715dde7842f
treed7afc6412732b75ada6c45581d59a4ee7abf487d
parentdedae6c211415290cdf5faca4ef874f803af204c
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
src/backend/access/nbtree/nbtsearch.c
src/backend/access/nbtree/nbtutils.c
src/include/access/nbtree.h