Re: Fw: Sub SELECTS - Mailing list pgsql-php

From Roland Roberts
Subject Re: Fw: Sub SELECTS
Date
Msg-id m2elbfpcaf.fsf@kuiper.rlent.pnet
Whole thread Raw
In response to Fw: Sub SELECTS  ("Waruna Geekiyanage" <waruna@nirmani.com>)
List pgsql-php
>>>>> "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

pgsql-php by date:

Previous
From: Markus Bertheau
Date:
Subject: Re: WebDB Developers Wanted
Next
From: Josh Berkus
Date:
Subject: PGSQL-Performance mailing list.