Re: Possible solution for LIKE optimization
От | Peter Eisentraut |
---|---|
Тема | Re: Possible solution for LIKE optimization |
Дата | |
Msg-id | Pine.LNX.4.30.0108060335290.11162-100000@peter.localdomain обсуждение исходный текст |
Ответ на | Re: Possible solution for LIKE optimization (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Possible solution for LIKE optimization
|
Список | pgsql-hackers |
Tom Lane writes: > 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). Wait, why isn't that the solution in the first place. Let's build the index with an opclass that uses plain strcmp comparison. Then you can compute the bounds using the method 'foo' <= 'foo%' <= 'fop'. We don't need to trick the locale facilities, we just avoid using them. LIKE is defined in terms of character elements, not collation elements, so that's okay. -- Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
В списке pgsql-hackers по дате отправления: