Re: Execute query with EXCEPT, INTERSECT as anti-join, join?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Colin 't Hart" <colin(at)sharpheart(dot)org>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Execute query with EXCEPT, INTERSECT as anti-join, join?
Date: 2013-11-11 14:16:45
Message-ID: 16566.1384179405@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Colin 't Hart" <colin(at)sharpheart(dot)org> writes:
> On 11 November 2013 14:34, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> No, and it probably won't ever be, since the semantics aren't the same.
>> EXCEPT/INTERSECT imply duplicate elimination.

> Can't we just use DISTINCT for that?

If you have to do a DISTINCT it's not clear to me that you're going to get
much win.

(The bigger picture here is that pretty much zero optimization effort has
been spent on EXCEPT/INTERSECT, because they're just not used that much
compared to other places where we could put that effort.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2013-11-11 14:24:34 Re: pg_dump and pg_dumpall in real life
Previous Message Ishaya Bhatt 2013-11-11 14:11:28 Datatyp of a column