Re: Fw: Sub SELECTS

From: Roland Roberts <roland(at)astrofoto(dot)org>
To: <pgsql-php(at)postgresql(dot)org>
Subject: Re: Fw: Sub SELECTS
Date: 2002-09-27 17:34:00
Message-ID: m2elbfpcaf.fsf@kuiper.rlent.pnet
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

>>>>> "Waruna" == Waruna Geekiyanage <waruna(at)nirmani(dot)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(at)rlenter(dot)com 76-15 113th Street, Apt 3B
roland(at)astrofoto(dot)org Forest Hills, NY 11375

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Josh Berkus 2002-09-27 19:05:49 PGSQL-Performance mailing list.
Previous Message Robert Treat 2002-09-27 13:31:41 Re: [PHP] WebDB Developers Wanted