- Notifications
You must be signed in to change notification settings - Fork5
Commit422495d
committed
Modify prefix_selectivity() so that it will never estimate the selectivity
of the generated range condition var >= 'foo' AND var < 'fop' as being lessthan what eqsel() would estimate for var = 'foo'. This is intuitivelyreasonable and it gets rid of the need for some entirely ad-hoc coding weformerly used to reject bogus estimates. The basic problem here is thatif the prefix is more than a few characters long, the two boundary valuesare too close together to be distinguishable by comparison to the columnhistogram, resulting in a selectivity estimate of zero, which is oftennot very sane. Change motivated by an example from Peter Eisentraut.Arguably this is a bug fix, but I'll refrain from back-patching itfor the moment.1 parent6f10eb2 commit422495d
1 file changed
+215
-150
lines changed0 commit comments
Comments
(0)