On Thu, 2 Oct 2025 at 16:21, Tom Lane <[email protected]> wrote:
> I'm wondering if it could be shortened a great deal by
> handling left-input-dummy and EXCEPT-ALL-with-right-input-dummy
> but leaving the EXCEPT-with-right-input-dummy case unimproved.

Good idea. Less code and still get to keep the one that did well in
the benchmark. See attached.

I ended up splitting the patch in two. 0001 for UNION only, then 0002
for the INTERSECT and EXCEPT.

David

Attachment: v2-0001-Teach-UNION-planner-to-remove-dummy-inputs.patch
Description: Binary data

Attachment: v2-0002-Teach-planner-to-short-circuit-EXCEPT-INTERSECT-w.patch
Description: Binary data

Reply via email to