public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: David Rowley <[email protected]>
Cc: ma lz <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Why not do distinct before SetOp
Date: Tue, 05 Nov 2024 18:09:41 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAApHDvod=mg8xKbBTFTu7HPWzLk+UhHVdXXwQEj9eNh5buVaiQ@mail.gmail.com>
References: <TYCPR01MB63514B9C70EF2A80F0D43394F2512@TYCPR01MB6351.jpnprd01.prod.outlook.com>
	<CAApHDvqdDwEXxhZLTwsHkWnvpvVSYT2OXSzfxRrs2p5xudr9fw@mail.gmail.com>
	<[email protected]>
	<CAApHDvod=mg8xKbBTFTu7HPWzLk+UhHVdXXwQEj9eNh5buVaiQ@mail.gmail.com>

David Rowley <[email protected]> writes:
> On Tue, 5 Nov 2024 at 04:18, Tom Lane <[email protected]> wrote:
>> A different idea that occurred to me while looking at this is:
>> why have we got all this machinery to add and check a flag
>> column, rather than arranging things so that the two input
>> relations are "outer" and "inner" children of the SetOp?

> I've no idea why it's not like that. The current design is quite
> strange and feels dated. It might be worth making that change as even
> if we gave joins better support for IS NOT DISTINCT FROM and made
> INTERSECT use INNER JOIN instead and EXCEPT use anti join, we'd still
> need nodeSetOp.c for INTERSECT ALL and EXCEPT ALL.

Yeah.  We'd still need it, and besides which it seems like a fairly
small project, unlike the other thing which could take multiple
years to get to an acceptable state.

Of course, I might be overestimating the performance benefit we'd get.
But I'm tempted to give it a try.

			regards, tom lane






view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Why not do distinct before SetOp
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox