RE: Possible solution for LIKE optimization - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject RE: Possible solution for LIKE optimization
Date
Msg-id EKEJJICOHDIEMGPNIFIJOEDIFBAA.Inoue@tpf.co.jp
Whole thread Raw
In response to Re: Possible solution for LIKE optimization  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Possible solution for LIKE optimization
RE: Possible solution for LIKE optimization
List pgsql-hackers
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> 
> Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> >> Peter Eisentraut <peter_e@gmx.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). 

And ORDER BY ?

> Which is not great, but I think we've
> finally seen the light: a locale-sorted index is just plain not useful
> for LIKE.

I'm not familiar with non_ASCII locale.
Is 'ss'  always guaranteed to be LIKE 's%'  for example ?

regards,
Hiroshi Inoue


pgsql-hackers by date:

Previous
From: "Hiroshi Inoue"
Date:
Subject: RE: Re: AW: Re: OID wraparound: summary and proposal
Next
From: Tom Lane
Date:
Subject: Re: Possible solution for LIKE optimization