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" <[EMAIL PROTECTED]>
To: "Heather Johnson" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
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,  [EMAIL PROTECTED]
pgp:crimelabs.net/bpalmer.pgp5
>


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to