From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Jean-Luc Lachance <jllachan@sympatico.ca>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org, Frank van Vugt <ftm.van.vugt@foxi.nl>
Subject: Re: *very* inefficient choice made by the planner (regarding
Date: Thu, 10 Jun 2004 10:14:36 -0700 (PDT)
Message-ID: <20040610101410.X21002@megazone.bigpanda.com> (raw)
In-Reply-To: <20040610100332.D20710@megazone.bigpanda.com>
References: <200406101624.21739.ftm.van.vugt@foxi.nl>
<40C881FE.5000301@sympatico.ca>
<25304.1086883145@sss.pgh.pa.us>
<40C892BA.8080704@sympatico.ca>
<20040610100332.D20710@megazone.bigpanda.com>
On Thu, 10 Jun 2004, Stephan Szabo wrote:
>
> On Thu, 10 Jun 2004, Jean-Luc Lachance wrote:
>
> > I agree, but it should be a simple rewrite. No?
>
> It's NULLs inside the subselect that are the issue.
>
> select 1 in (select a from foo)
> select exists ( select 1 from foo where a=1)
>
> If foo.a contains a row with NULL but no rows containing a 1, the above
> give different results (unknown and exists) and IIRC, exists cannot
Erm that exists should have been false
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: sszabo@megazone.bigpanda.com, jllachan@sympatico.ca, tgl@sss.pgh.pa.us, ftm.van.vugt@foxi.nl
Subject: Re: *very* inefficient choice made by the planner (regarding
In-Reply-To: <20040610101410.X21002@megazone.bigpanda.com>
* 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