Palle Girgensohn <girgen@pingpong.net> writes:
> Shouldn't the optimizer use indices if the like condition does not have any
> wildcards?
I can't get excited about this; if you are depending on LIKE to be fast
then you should have locale-insensitive indexes in place to support it.
Switching the tests around so that this special case is supported even
with an index that doesn't otherwise support LIKE would complicate the
code unduly IMHO, to support a rather pointless corner case...
regards, tom lane