Tom Lane wrote:
> As you can see, the estimate drops off by about a factor of 90 per
> added character. This is probably too much, but it's not that easy
> to determine what the ratio ought to be. The critical code involved
> in this is convert_string_to_scalar in backend/utils/adt/selfuncs.c;
> the ratio per character is essentially the same as the character range
> that it induces from the available values. Feel free to propose a
> better implementation if you can think of one.
FYI, 7.3 will drop off quicker than <=7.2.X:
* Change FIXED_CHAR_SEL to 0.20 from 0.04 to give better selectivity (Bruce)
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026