Re: Possible solution for LIKE optimization

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Possible solution for LIKE optimization
Date: 2001-08-06 14:16:00
Message-ID: 21329.997107360@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
>> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Wait, why isn't that the solution in the first place. Let's build the
> index with an opclass that uses plain strcmp comparison.

> Do we have to make 2 indexes for non_ASCII text field ?

You would if you want to use indexscans for both LIKE and "x < 'FOO'"
(ie, locale-aware comparisons). Which is not great, but I think we've
finally seen the light: a locale-sorted index is just plain not useful
for LIKE.

This discussion has restored my faith in index opclasses; finally we
have a real-world application of 'em that we can point to ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2001-08-06 14:35:00 Re: Question about todo item
Previous Message Tom Lane 2001-08-06 14:08:35 Re: AW: partial index