On Tue, Oct 31, 2023 at 3:41 PM Dimitrios Apostolou <jimis@xxxxxxx> 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.