| От | Tom Lane |
|---|---|
| Тема | Re: index scan with functional indexes |
| Дата | |
| Msg-id | 24060.1075224781@sss.pgh.pa.us обсуждение |
| Ответ на | index scan with functional indexes (Dave Cramer <pg@fastcrypt.com>) |
| Ответы |
Re: index scan with functional indexes
|
| Список | pgsql-hackers |
Dave Cramer <pg@fastcrypt.com> writes:
> create index r_url_idx on url( fn_strrev(url));
> explain select * from url where url like fn_strrev('%beta12.html');
> QUERY PLAN
> ---------------------------------------------------------
> Seq Scan on url (cost=0.00..13281.70 rows=1 width=454)
> Filter: ((url)::text ~~ 'lmth.21ateb%'::text)
> Is it possible to get the planner to use an index scan ?
Sure, but not that way. Try "fn_strrev(url) like something".
You have to compare the indexed value to something...
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера