pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: dan@langille.org
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: why the big difference on this explain analyze?
Date: Sat, 16 Mar 2002 17:19:32 -0500
Message-ID: <15913.1016317172@sss.pgh.pa.us> (raw)
In-Reply-To: <20020316220751.A5EE73F28@bast.unixathome.org>
References: <20020316220751.A5EE73F28@bast.unixathome.org>

"Dan Langille" <dan@langille.org> writes:
> The difference between the two SQL statements is the inclusion of 
> Ports_Check in the WHERE EXISTS select clause.

Which caused it to do the wrong thing.  I think you'll find this
command set found_in_ports = TRUE in *every* row of Ports_Check.

Reason: the EXISTS clause no longer depends on the outer update,
but evaluates to a constant TRUE.  (Or possibly a constant FALSE,
but that seems unlikely.)

			regards, tom lane



view thread (4+ messages)  latest in thread

Message-ID: <15913.1016317172@sss.pgh.pa.us>
Permalink:  ../15913.1016317172@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15913.1016317172@sss.pgh.pa.us

 · 

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: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dan@langille.org
  Subject: Re: why the big difference on this explain analyze?
  In-Reply-To: <15913.1016317172@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