| От | Greg Stark |
|---|---|
| Тема | Re: Bug? 8.0 does not use partial index |
| Дата | |
| Msg-id | 87hdlkwr5y.fsf@stark.xeocode.com обсуждение исходный текст |
| Ответ на | Re: Bug? 8.0 does not use partial index (John Hansen <john@geeknet.com.au>) |
| Список | pgsql-hackers |
John Hansen <john@geeknet.com.au> writes: > > Thanks, but the behaviour seems identical. :( > > odd tho, that I was never able to get null values indexed (index was > never used) unless I used this approach.... You're mixing up the indexed column with the where clause of a partial index. They behave differently. Null values *are* normally indexed in Postgres. The problem is that the optimizer doesn't recognize IS NULL as an indexable operation, so they don't always help unless you do something like you describe above. But the WHERE clause on partial indexes is another story. The optimizer recognizes IS NULL as being equivalent to IS NULL so it recognizes that the partial index is usable just fine. -- greg
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера