Re: [SQL] Yet Another (Simple) Case of Index not used
В списке pgsql-performance по дате отправления:
| От | Stephan Szabo |
|---|---|
| Тема | Re: [SQL] Yet Another (Simple) Case of Index not used |
| Дата | |
| Msg-id | 20030408185412.C57783-100000@megazone23.bigpanda.com обсуждение |
| Ответ на | Re: [SQL] Yet Another (Simple) Case of Index not used ("Denis @ Next2Me" <denis@next2me.com>) |
| Список | pgsql-performance |
On Tue, 8 Apr 2003, Denis @ Next2Me wrote: > The kind of requests that I am really interested in are: > select count(*) from table where table.column like 'pattern%' If you think an index scan should be faster, you can try set enable_seqscan=off; and see if that changes the plan generated by explain and with analyze you can compare the time used. Without information on the estimated selectivity it's hard to say what's right. If it doesn't use the index (ie, it's still using a sequential scan) after the enable_seqscan=off it's likely that you didn't initdb in "C" locale in which case like won't use indexes currently (you can see the archives for long description, but the short one is that some of the locale rules can cause problems with using the index).
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера