Re: 7.3 no longer using indexes for LIKE queries

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 7.3 no longer using indexes for LIKE queries
Дата
Msg-id 14882.1039020642@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 7.3 no longer using indexes for LIKE queries  (Matthew Gabeler-Lee <mgabelerlee@zycos.com>)
Список pgsql-general
Matthew Gabeler-Lee <mgabelerlee@zycos.com> writes:
> Can someone please elaborate on why it stops doing this optimization?  The
> only reasons for it that I can think of for it to be unsafe in a locale is
> that two characters that are not the same character still compare as being
> equal (does this ever really happen?).

Unfortunately, locale-dependent sorting rules are much stranger than you
seem to think.  You can dig in the pghackers archives for some of the
reasons that we had to disable that optimization (we tried repeatedly to
find ways around this, btw).  Special digraph rules and multipass
comparisons are a couple of examples of things that completely break
the LIKE optimization.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Backend message type 0x50 arrived while idle
Следующее
От: Csaba Nagy
Дата:
Сообщение: Re: Efficient Boolean Storage