From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephan Szabo <sszabo@megazone.bigpanda.com>
Cc: Phil Endecott <spam_from_postgresql_lists@chezphil.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: Optimisation of INTERSECT expressions
Date: Tue, 23 Mar 2004 10:47:42 -0500
Message-ID: <20715.1080056862@sss.pgh.pa.us> (raw)
In-Reply-To: <20040323071350.Y86816@megazone.bigpanda.com>
References: <20040323141200.34D86D1EC02@svr1.postgresql.org>
<20040323063650.X85869@megazone.bigpanda.com>
<20040323071350.Y86816@megazone.bigpanda.com>
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> Given a non-unique A, C1 as B>5, c2 as C>5 and the data:
> A | B | C
> 1 | 6 | 1
> 1 | 1 | 6
> The intersect gives 1 row, the and query gives 0 AFAICS.
Another way that the queries are not equivalent is that INTERSECT is
defined to remove duplicate output rows (much like DISTINCT) whereas
the AND form of course won't do that.
regards, tom lane
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: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, sszabo@megazone.bigpanda.com, spam_from_postgresql_lists@chezphil.org
Subject: Re: Optimisation of INTERSECT expressions
In-Reply-To: <20715.1080056862@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox