Re: 7.3 no longer using indexes for LIKE queries

Поиск
Список
Период
Сортировка
От Matthew Gabeler-Lee
Тема Re: 7.3 no longer using indexes for LIKE queries
Дата
Msg-id ABABFB80F35AD311848B0090279918EF010B9B63@ZYCOSNT2.hq.zycos.com
обсуждение исходный текст
Ответ на 7.3 no longer using indexes for LIKE queries  (Matthew Gabeler-Lee <mgabelerlee@zycos.com>)
Ответы Re: 7.3 no longer using indexes for LIKE queries  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: 7.3 no longer using indexes for LIKE queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Okay, now I understand the problem better.

How about, as an intermediate solution, a list of 'sane' locales in which
the optimization applied to the C/POSIX locale works?  It should be fairly
straight forward to write a test program that will test a locale and see if
any of the common problems apply.  And I expect that several locales can be
added straight away as they are known to obey simple sorting rules.

Alternately, though I don't think this would be a very good idea, a SET
option along the lines of enable_dangerous_like_optimization or such that
would (of course) default to off.

    -Matt


-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]

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 по дате отправления:

Предыдущее
От: pginfo
Дата:
Сообщение: Slow delete by table with reference to him slef.
Следующее
От: Joe Conway
Дата:
Сообщение: Re: Efficient Boolean Storage