Re: like performance w/o wildcards. - Mailing list pgsql-general

From Joseph Shraibman
Subject Re: like performance w/o wildcards.
Date
Msg-id 3F2EEA54.9000306@selectacast.net
Whole thread Raw
In response to Re: like performance w/o wildcards.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: like performance w/o wildcards.
List pgsql-general
Tom Lane wrote:
> Joseph Shraibman <jks@selectacast.net> writes:
>
>>>The index is for non-LIKE comparisons, like = and >.
>>>
>>
>>My point is what is the difference?  If the index is done char by char then LIKE ought to
>>be able to use the index to find 'F*', no matter what the locale is.  What can't you
>>figure out what is before/after a given char?  Don't you have that information?  Don't you
>>need it to create the index in the first place?
>
>
> <yawn>  Read the archives.  We would love to use locale-sorted indexes
> for LIKE, but we *can't*.  There are too many bizarre sorting rules.
> (Hint: almost no locale does its sorting purely "char by char".)
>
>             regards, tom lane

What percentage of locales have this problem?  Does latin1 have this problem?

And what about my original idea, can LIKE be turned into an = when there are no wildcards?


pgsql-general by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: [osdldbt-general] Re: [PERFORM] OSDL Database Test Suite 3 is
Next
From: Richard Welty
Date:
Subject: Re: varchar, text and cidr