pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Keary Suska <hierophant@pcisys.net>
To: Postgres-PHP <pgsql-php@postgresql.org>
Subject: Re: Fw: Sub SELECTS
Date: Wed, 25 Sep 2002 09:08:46 -0600
Message-ID: <B9B72D9E.13803%hierophant@pcisys.net> (raw)
In-Reply-To: <00a701c264a3$05bb4100$705e5ecb@A.GEEKIYANAGE>

on 9/25/02 8:51 AM, waruna@nirmani.com purportedly said:

I have a select query with 2 sub selects.
When I run that query CPU usage goes to 98% for postgres.
Does sub selects eat more resources and slower the queries?
Is there any alternatives to sub selects?

That high CPU usage seems odd. I wouldn't think that even extremely complex
queries would effect CPU that much, unless there are other factors such as
low memory that would contribute.

If any case, if you post the query and table schemas we might be able to
make suggestions. Sub-selects are generally fairly efficient unless the
results from the sub-selects are particularly large. Postgres may not be
able to use indexes on sub-select results, I am not sure.

Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"

view thread (3+ messages)  latest in thread

Message-ID: <B9B72D9E.13803%hierophant@pcisys.net>
Permalink:  ../B9B72D9E.13803%25hierophant@pcisys.net/
Also on:    postgresql.org/message-id/B9B72D9E.13803%hierophant@pcisys.net

 · 

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-php@postgresql.org
  Cc: hierophant@pcisys.net
  Subject: Re: Fw: Sub SELECTS
  In-Reply-To: <B9B72D9E.13803%hierophant@pcisys.net>
  References: <00a701c264a3$05bb4100$705e5ecb@A.GEEKIYANAGE> <B9B72D9E.13803%hierophant@pcisys.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