| From: | Joseph Shraibman <jks(at)selectacast(dot)net> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: like performance w/o wildcards. |
| Date: | 2003-08-04 23:20:52 |
| Message-ID: | 3F2EEA54.9000306@selectacast.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Tom Lane wrote:
> Joseph Shraibman <jks(at)selectacast(dot)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?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Welty | 2003-08-04 23:22:56 | Re: varchar, text and cidr |
| Previous Message | Jenny Zhang | 2003-08-04 22:48:55 | Re: [osdldbt-general] Re: [PERFORM] OSDL Database Test Suite 3 is |