diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-07-31 03:27:57 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-07-31 03:27:57 +0000 |
commit | 4a8fcfdefbbad470c038de543ff69753ba801d58 (patch) | |
tree | 2700995118e7de40fdf27ba4a19e9b8e85ba562d /src/tutorial/basics.source | |
parent | 8d3487dacc4e07a65ebd5bd49c7ce25867685109 (diff) | |
download | postgresql-4a8fcfdefbbad470c038de543ff69753ba801d58.tar.gz postgresql-4a8fcfdefbbad470c038de543ff69753ba801d58.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 'src/tutorial/basics.source')
0 files changed, 0 insertions, 0 deletions