Ray Ontko <rayo(at)ontko(dot)com> writes:
> In other words, if I only give one letter, then I might expect
> to get about 1/10 of the table, and a full scan might make sense.
> But the cost should continue to decline as I give longer and longer
> strings, up to the length of the field.
> Would this be a reasonable improvement to the optimizer?
It's there already; what did you think was making the difference
between W% and WI% ?
regards, tom lane