| От | Richard Huxton |
|---|---|
| Тема | Re: LIKE and INDEX |
| Дата | |
| Msg-id | 40992E96.5090301@archonet.com обсуждение исходный текст |
| Ответ на | LIKE and INDEX ("Jie Liang" <jie@stbernard.com>) |
| Список | pgsql-performance |
Jie Liang wrote: > All, > This is old topic, when I use: > select url from urlinfo where url like 'http://www.lycos.de%'; > it uses the index, good! > > but if I use: > select url from urlinfo where url like 'http://%.lycos.de'; > it won't use index at all, NOT good! > is there any way I can force secon query use index??? I've seen people define a reverse(text) function via plperl or similar then build a functional index on reverse(url). Of course, that would rely on your knowing which end of your search pattern has the % wildcard. -- Richard Huxton Archonet Ltd
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера