Re: LIKE should use index when condition doesn't include wildcard

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: LIKE should use index when condition doesn't include wildcard
Дата
Msg-id 26840.1080692204@sss.pgh.pa.us
обсуждение исходный текст
Ответ на LIKE should use index when condition doesn't include wildcard  (Palle Girgensohn <girgen@pingpong.net>)
Ответы Re: LIKE should use index when condition doesn't include  (Palle Girgensohn <girgen@pingpong.net>)
Список pgsql-performance
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

В списке pgsql-performance по дате отправления:

Предыдущее
От: Palle Girgensohn
Дата:
Сообщение: LIKE should use index when condition doesn't include wildcard
Следующее
От: Palle Girgensohn
Дата:
Сообщение: Re: LIKE should use index when condition doesn't include