Re: Inefficient query plan for SELECT ... EXCEPT ...

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Inefficient query plan for SELECT ... EXCEPT ...
Дата
Msg-id CAKFQuwYQUiqx5v96Xq6nAOf9sSwXntP8hwnPBjwiQbJjGiLPMA@mail.gmail.com
обсуждение исходный текст
Ответ на Inefficient query plan for SELECT ... EXCEPT ...  (Dimitrios Apostolou <jimis@gmx.net>)
Список pgsql-general
On Tue, Oct 31, 2023 at 3:41 PM Dimitrios Apostolou <jimis@gmx.net> wrote:

Is this worth a bug report? I can file one if the issue is not known.
Or am I misunderstanding the implications of the SELECT-EXCEPT query?

In the meantime I have replaced the query with a LEFT OUTER JOIN which
performs much better,

I'd expect a NOT EXISTS query would also perform well and more accurately reflect what you seem to be wanting here.

I could see maybe optimizing away the second independent query if the first produces zero rows but it also doesn't seem like that productive an optimization to attempt.

David J.

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

Предыдущее
От: Dimitrios Apostolou
Дата:
Сообщение: Inefficient query plan for SELECT ... EXCEPT ...
Следующее
От: David Rowley
Дата:
Сообщение: Re: Inefficient query plan for SELECT ... EXCEPT ...