Re: Why is a sort required for this query? (IS NULL predicate on leading key column)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Why is a sort required for this query? (IS NULL predicate on leading key column)
Дата
Msg-id 2027067.1705504277@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Why is a sort required for this query? (IS NULL predicate on leading key column)  (Jerry Brenner <jbrenner@guidewire.com>)
Список pgsql-performance
Jerry Brenner <jbrenner@guidewire.com> writes:
> I'm wondering why a sort is required for this query, as the index should be
> providing the required ordering to satisfy the ORDER BY clause.  Does it
> have to do with the IS NULL predicate on the leading key column in the
> index?

IS NULL is not seen as an equality condition, no.  It's pretty much
of a hack that makes it an indexable condition at all, and we don't
really do any advanced optimization with it.

            regards, tom lane



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

Предыдущее
От: Jerry Brenner
Дата:
Сообщение: Re: Why is a sort required for this query? (IS NULL predicate on leading key column)
Следующее
От: Jean-Christophe Boggio
Дата:
Сообщение: I don't understand that EXPLAIN PLAN timings