Re: Yet another LIKE-indexing scheme

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Erich Stamberger <eberger(at)gewi(dot)kfunigraz(dot)ac(dot)at>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Yet another LIKE-indexing scheme
Date: 2000-10-16 16:53:36
Message-ID: 200010161653.MAA15610@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Any status on this?

> Erich Stamberger <eberger(at)gewi(dot)kfunigraz(dot)ac(dot)at> writes:
> >> Our existing code fails because it generates WHERE name >= 'Czec' AND
> >> name < 'Czed'; it will therefore not find names beginning 'Czech'
> >> because those are in another part of the index, between 'Czeh' and
> >> 'Czei'. But WHERE name >= 'Cze' AND name < 'Czf' would work.
>
> > The Problem is: What tells us, that it is 'f' which sorts
> > after 'e' in that locale?
>
> We keep trying until we find a character that *does* sort after 'e'.
> I did say I was assuming that people had read the previous discussion
> and knew what the existing approach was ;-)
>
> However I've since thought of a different counterexample: if the LIKE
> pattern is 'Czech%' and we strip off the 'h', we lose since we'll be
> looking between 'Czec' and 'Czed' but the desired strings are in the
> index between 'Czeh' and 'Czei'. Back to the drawing board...
>
> regards, tom lane
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-10-16 16:55:17 Re: Yet another LIKE-indexing scheme
Previous Message Tom Lane 2000-10-16 16:53:20 Re: Ответ: [HACKERS] Possible performance improvement: buffer replacement policy