Re: 7.3 no longer using indexes for LIKE queries

From: Matthew Gabeler-Lee <mgabelerlee(at)zycos(dot)com>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: 7.3 no longer using indexes for LIKE queries
Date: 2002-12-04 17:09:19
Message-ID: ABABFB80F35AD311848B0090279918EF010B9B63@ZYCOSNT2.hq.zycos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sss(dot)pgh(dot)pa(dot)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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marc G. Fournier 2002-12-04 17:22:20 Re: [GENERAL] PostgreSQL Global Development Group Announces
Previous Message Csaba Nagy 2002-12-04 17:02:06 Re: Efficient Boolean Storage