aboutsummaryrefslogtreecommitdiff
path: root/contrib/btree_gist/btree_gist.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-07-31 03:27:40 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2010-07-31 03:27:40 +0000
commitb8c798ebc528f6b6300174929e66b8128ac5cef8 (patch)
treeffd175b9dca404c892da413db0a92ff33ce67c77 /contrib/btree_gist/btree_gist.h
parent2ab57e089b0b94ca43dadfb3d567ee59a7ca6276 (diff)
downloadpostgresql-b8c798ebc528f6b6300174929e66b8128ac5cef8.tar.gz
postgresql-b8c798ebc528f6b6300174929e66b8128ac5cef8.zip
Tweak tsmatchsel() so that it examines the structure of the tsquery whenever
possible (ie, whenever the tsquery is a constant), even when no statistics are available for the tsvector. For example, foo @@ 'a & b'::tsquery can be expected to be more selective than foo @@ 'a'::tsquery, whether or not we know anything about foo. We use DEFAULT_TS_MATCH_SEL as the assumed selectivity of individual query terms when no stats are available, then combine the terms according to the query's AND/OR structure as usual. Per experimentation with Artur Dabrowski's example. (The fact that there are no stats available in that example is a problem in itself, but nonetheless tsmatchsel should be smarter about the case.) Back-patch to 8.4 to keep all versions of tsmatchsel() in sync.
Diffstat (limited to 'contrib/btree_gist/btree_gist.h')
0 files changed, 0 insertions, 0 deletions