From: Michelle Murrain <tech@murrain.net>
To: Thomas F.O'Connell <tfo@sitening.com>
Cc: CHRIS HOOVER <CHRIS.HOOVER@companiongroup.com>
Cc: sad@bankir.ru
Cc: pgsql-sql@postgresql.org
Subject: Re: help on a query
Date: Fri, 08 Oct 2004 11:19:21 -0400
Message-ID: <4166AFF9.1000603@murrain.net> (raw)
In-Reply-To: <B26D13E6-193B-11D9-936A-000D93AE0944@sitening.com>
References: <NYe01121-06b74e7b@companiongroup.com>
<B26D13E6-193B-11D9-936A-000D93AE0944@sitening.com>
Thomas F.O'Connell wrote:
> I think the OUTER JOIN version is probably more efficient, but EXPLAIN
> would tell you.
Well, this all makes me feel better. For everyone's edification:
select registration_id FROM registrations
where registration_id not in (select registration_id from receipts);
Generates 0 rows
The OUTER JOIN version is quite a bit more efficient (by an order of
magnitude) than the option with WHERE NOT EXISTS subquery.
Thanks all for the help. Saved my butt again!!
--
.Michelle
--------------------------
Michelle Murrain
mmurrain at dbdes dot com
413-222-6350 ph
617-889-0929 ph
952-674-7253 fax <--- new
Page: pageme@murrain.net
AIM:pearlbear0 ICQ:129250575
Skype: pearlbear
Jabber: pearlbear@transactim.net
"I see all the different religious traditions as paths for the
development of inner peace, which is the true foundation of world peace.
These ancient traditions come to us as a gift from our common past. Will
we continue to cherish it as a gift and hand it over to the future
generations as a legacy of our shared desire for peace?" - His Holiness
the Dalai Lama
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: tech@murrain.net, tfo@sitening.com, CHRIS.HOOVER@companiongroup.com, sad@bankir.ru
Subject: Re: help on a query
In-Reply-To: <4166AFF9.1000603@murrain.net>
* 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