From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Elliott Groszek <elliott.groszek@navy.mil>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5755: Query Optimzer Bug
Date: Wed, 17 Nov 2010 20:37:42 +0200
Message-ID: <4CE420F6.7070003@enterprisedb.com> (raw)
In-Reply-To: <27568.1290009930@sss.pgh.pa.us>
References: <201011162239.oAGMd7ZR045353@wwwmaster.postgresql.org>
<27568.1290009930@sss.pgh.pa.us>
On 17.11.2010 18:05, Tom Lane wrote:
> "Elliott Groszek"<elliott.groszek@navy.mil> writes:
>> The following SQL statements produce different query plans even though
>> "phone" is not reference in the SQL!
>
>> explain update customer set login_name =
>> (select "NESSOuserName" from person,phone
>> where person.cac_cert=customer.cac_cert);
>
>> explain update customer set login_name =
>> (select "NESSOuserName" from person
>> where person.cac_cert=customer.cac_cert);
>
> That's not a bug.
Particularly, note that they produce different results if "phone" table
is empty.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: heikki.linnakangas@enterprisedb.com, tgl@sss.pgh.pa.us, elliott.groszek@navy.mil
Subject: Re: BUG #5755: Query Optimzer Bug
In-Reply-To: <4CE420F6.7070003@enterprisedb.com>
References: <201011162239.oAGMd7ZR045353@wwwmaster.postgresql.org> <27568.1290009930@sss.pgh.pa.us> <4CE420F6.7070003@enterprisedb.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