Re: Ignoring index on (A is null), (A is not null) conditions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Ignoring index on (A is null), (A is not null) conditions
Дата
Msg-id 28214.1067527886@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Ignoring index on (A is null), (A is not null) conditions  ("Cestmir Hybl" <cestmirl@freeside.sk>)
Список pgsql-performance
"Cestmir Hybl" <cestmirl@freeside.sk> writes:
>> In fact, I need to filter by expression ((A is null) or (A > const)).

I wonder whether you shouldn't reconsider your data representation.
Perhaps the condition you are using "null" for would be better
represented by setting A to infinity.  (The float and timestamp
datatypes actually have a concept of infinity; for other types you
can fake it with a large positive value.)

            regards, tom lane

В списке pgsql-performance по дате отправления:

Предыдущее
От: Christopher Browne
Дата:
Сообщение: Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine. [ with better indenting ]
Следующее
От: Rob Nagler
Дата:
Сообщение: Re: vacuum locking