| От | momjian@svr1.postgresql.org (Bruce Momjian) |
|---|---|
| Тема | pgsql-server/doc/src/sgml/ref create_index.sgml |
| Дата | |
| Msg-id | 20040420010027.6ED90D1DD86@svr1.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
CVSROOT: /cvsroot
Module name: pgsql-server
Changes by: momjian@svr1.postgresql.org 04/04/19 22:00:27
Modified files:
doc/src/sgml/ref: create_index.sgml
Log message:
> >> My question is whether postgres can index null values, and if not, do I
> >> have to accept a full table scan when locating records.
> >
> > It indexes them, but "is null" is not an indexable operator, so you
> > can't directly solve the above with a 3-column index. What you can do
> > instead is use a partial index, for instance
> >
> > create index i on CUSTOMER.WCCustOrderStatusLog (WCOrderStatusID)
> > where Acknowledged is null and Processing is null;
>
> That's a very nifty trick and exactly the sort of answer I was after!
Add CREATE INDEX doc mention of using partial indexes for IS NULL
indexing; idea from Tom.
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера