Re: BUG #18442: Unnecessary Sort operator in indexScan Plan

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: BUG #18442: Unnecessary Sort operator in indexScan Plan
Дата
Msg-id CAMbWs4-jV8sr7pR3wzhe0YngYjuqbxXkbfbRqTnaZ1iikcPgCQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #18442: Unnecessary Sort operator in indexScan Plan  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-bugs

On Mon, Apr 22, 2024 at 9:53 AM David Rowley <dgrowleyml@gmail.com> wrote:
Presumably, if a=b is strict then effectively nothing could match as
the strict qual ensures NULLs never match and the IS NULL only allows
NULLs.

Yeah, in this case the two restrictions are self-inconsistent and that
makes the relation dummy and need not be scanned.  I think the planner
would figure that out in relation_excluded_by_constraints when the GUC
constraint_exclusion is on, but in a different way than ECs.

Thanks
Richard

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #18442: Unnecessary Sort operator in indexScan Plan
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #15954: Unable to alter partitioned table to set logged