From: Roland Roberts <roland@astrofoto.org>
To: pgsql-php@postgresql.org
Subject: Re: Fw: Sub SELECTS
Date: 27 Sep 2002 13:34:00 -0400
Message-ID: <m2elbfpcaf.fsf@kuiper.rlent.pnet> (raw)
In-Reply-To: <00a701c264a3$05bb4100$705e5ecb@A.GEEKIYANAGE>
References: <00a701c264a3$05bb4100$705e5ecb@A.GEEKIYANAGE>
>>>>> "Waruna" == Waruna Geekiyanage <waruna@nirmani.com> writes:
Waruna> I have a select query with 2 sub selects. When I run that
Waruna> query CPU usage goes to 98% for postgres. Does sub
Waruna> selects eat more resources and slower the queries? Is
Waruna> there any alternatives to sub selects?
You are going to have to give us a clue as to what those sub-selects
are and what they are doing. If there is an "order by" clause
anywhere, that could cause high CPU. If the query is not using
indicies, that might cause a problem. Have you tried EXPLAIN?
roland
--
PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD RL Enterprises
roland@rlenter.com 76-15 113th Street, Apt 3B
roland@astrofoto.org Forest Hills, NY 11375
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-php@postgresql.org
Cc: roland@astrofoto.org
Subject: Re: Fw: Sub SELECTS
In-Reply-To: <m2elbfpcaf.fsf@kuiper.rlent.pnet>
References: <00a701c264a3$05bb4100$705e5ecb@A.GEEKIYANAGE> <m2elbfpcaf.fsf@kuiper.rlent.pnet>
* 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