Change patternsel (LIKE/regex selectivity estimation) so that if there

Tom Lane <tgl@sss.pgh.pa.us>

Commit: bfd1ffa948e676f0587239a36e71f15690ef2cde
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2006-09-20T19:50:21Z
Releases: 8.2.0
Change patternsel (LIKE/regex selectivity estimation) so that if there
is a large enough histogram, it will use the number of matches in the
histogram to derive a selectivity estimate, rather than the admittedly
pretty bogus heuristics involving examining the pattern contents.  I set
'large enough' at 100, but perhaps we should change that later.  Also
apply the same technique in contrib/ltree's <@ and @> estimator.  Per
discussion with Stefan Kaltenbrunner and Matteo Beccati.

Files

PathChange+/−
contrib/ltree/ltree_op.c modified +36 −4
src/backend/utils/adt/selfuncs.c modified +202 −108
src/include/utils/selfuncs.h modified +4 −1