| От | Thom Brown |
|---|---|
| Тема | Re: index usage in not like |
| Дата | |
| Msg-id | bddc86151002180400n920f56ah9fa3d68156c6b24a@mail.gmail.com обсуждение |
| Ответ на | index usage in not like (AI Rumman <rummandba@gmail.com>) |
| Ответы |
Re: index usage in not like
|
| Список | pgsql-performance |
On 18 February 2010 11:55, AI Rumman <rummandba@gmail.com> wrote:
> "Not like" operation does not use index.
>
> select * from vtiger_contactscf where lower(cf_1253) not like
> lower('Former%')
>
> I created index on lower(cf_1253).
>
> How can I ensure index usage in not like operation?
> Anyone please help.
>
How many rows do you have in your table? If there are relatively few,
it probably guesses it to be cheaper to do a sequential scan and
calculate lower values on-the-fly rather than bother with the index.
Thom
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера