Re: Possible solution for LIKE optimization
| От | Tom Lane |
|---|---|
| Тема | Re: Possible solution for LIKE optimization |
| Дата | |
| Msg-id | 7133.997052509@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Possible solution for LIKE optimization (Peter Eisentraut <peter_e@gmx.net>) |
| Ответы |
Re: Possible solution for LIKE optimization
|
| Список | pgsql-hackers |
Peter Eisentraut <peter_e@gmx.net> writes:
> I have had an idea how the LIKE optimization problem could be solved.
Hmm ... so in a non-ASCII locale, we'd have to look for an index on
strxfrm(A) rather than directly on A. And the index would need to
use a nonstandard operator set --- ie, *non* locale aware comparison
operators (which might be useful for other purposes anyway).
Interesting thought. I'm not entirely sure how we'd teach the planner
to do this, but that's probably solvable.
A more significant problem is that I'm still not convinced this gets the
job done, because of the problem of multi-character collation elements.
If "A LIKE 'FOOS%'" should match FOOSS, but SS is treated specially by
the collation rules, does this scheme work?
regards, tom lane
В списке pgsql-hackers по дате отправления: