pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heather Johnson <hjohnson@nypost.com>
To: bpalmer <bpalmer@crimelabs.net>
Cc: pgsql-admin@postgresql.org
Cc: Harry Ford <hford@globix.com>
Cc: Serge Canizares <serge@enluminaire.com>
Cc: Marie Musacchio <marie@nypost.com>
Subject: Re: problems doing sub-selects on PostgreSQL 7.1.3 and Solaris 7
Date: Tue, 11 Dec 2001 09:47:41 -0500
Message-ID: <01e401c18252$c9449a10$510b10ac@sephie> (raw)
References: <Pine.BSO.4.40.0112101732130.12851-100000@mizer.>

Thanks Brandon---that's a very good idea. I'd still like to know why my x86
box can handle the less effecient query better than an E-450, but this is
what I'll do until I can get my curiosity satisfied. ;)

Heather

----- Original Message -----
From: "bpalmer" <bpalmer@crimelabs.net>
To: "Heather Johnson" <hjohnson@nypost.com>
Cc: <pgsql-admin@postgresql.org>
Sent: Monday, December 10, 2001 5:34 PM
Subject: Re: [ADMIN] problems doing sub-selects on PostgreSQL 7.1.3 and
Solaris 7


> >     SELECT count(*) FROM users WHERE id NOT IN ( SELECT users_id FROM
users_demographics );
>
> I'm not sure about the difference in speed,  but try the following for a
> much faster query:
>
> SELECT count(id)
> FROM users
>
> EXCEPT
>
> SELECT users_id
> FROM  users_demographics
>
> Should be a great deal faster.
>
> - Brandon
>
>
>
> --------------------------------------------------------------------------
--
>  c: 646-456-5455                                            h:
201-798-4983
>  b. palmer,  bpalmer@crimelabs.net
pgp:crimelabs.net/bpalmer.pgp5
>




view thread (8+ messages)  latest in thread

Message-ID: <01e401c18252$c9449a10$510b10ac@sephie>
Permalink:  ../01e401c18252$c9449a10$510b10ac@sephie/
Also on:    postgresql.org/message-id/01e401c18252$c9449a10$510b10ac@sephie

 · 

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 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-admin@postgresql.org
  Cc: hjohnson@nypost.com, bpalmer@crimelabs.net, hford@globix.com, serge@enluminaire.com, marie@nypost.com
  Subject: Re: problems doing sub-selects on PostgreSQL 7.1.3 and Solaris 7
  In-Reply-To: <01e401c18252$c9449a10$510b10ac@sephie>
  References: <Pine.BSO.4.40.0112101732130.12851-100000@mizer.> <01e401c18252$c9449a10$510b10ac@sephie>

* 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