| От | Angva |
|---|---|
| Тема | Re: sql indexing suggestions needed |
| Дата | |
| Msg-id | 1174430002.064990.261360@y66g2000hsf.googlegroups.com обсуждение |
| Ответ на | sql indexing suggestions needed (Jonathan Vanasco <postgres@2xlp.com>) |
| Список | pgsql-general |
On Mar 20, 2:54 pm, postg...@2xlp.com (Jonathan Vanasco) wrote: > can anyone suggest an indexing approach that might get pg to use the > indexes ? this is driving me crazy. Have you tried an expression-based index? http://www.postgresql.org/docs/8.1/interactive/indexes-expressional.html I'm assuming the right side of each equals sign is constant for you. Basically, you could create an expression-based index on all these conditions, which would evaluate to true or false for every row in your table. Caveat: If you have heavy updates/inserts this might be a bad idea. Also, the planner may still decide to seq scan, based on your configuration and resultset size. Mark
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера