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

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: BUG #18442: Unnecessary Sort operator in indexScan Plan
Дата
Msg-id CAApHDvrX8AUj=5O-frg6nAEwa_CTzgsnSg80Cz3ReS7d7B94og@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #18442: Unnecessary Sort operator in indexScan Plan  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Mon, 22 Apr 2024 at 14:25, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> (A question closely related to this is whether IS NOT DISTINCT FROM
> could be optimized more like regular equality.  I'm not convinced
> about the use-case there either, although perhaps it's worth looking
> into.)

This came up for me recently when adjusting the UNION planner to allow
the use of Merge Append.  I'd considered taking that work further to
expand it into INTERSECT and EXCEPT to transform those to INNER and
ANTI joins. I quickly realised that we'd need to have better
optimisation of joins with IS NOT DISTINCT FROM to make this a
worthwhile transformation.  The join transformation cannot be done
with simple equality conditions as that would eliminate NULLs. I was
unexcited about only making it work for non-nullable Vars as it seemed
like a backwater within a backwater.

David



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #15954: Unable to alter partitioned table to set logged
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #15954: Unable to alter partitioned table to set logged