Re: Fw: Sub SELECTS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



>>>>> "Waruna" == Waruna Geekiyanage <waruna@xxxxxxxxxxx> 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@xxxxxxxxxxx                     76-15 113th Street, Apt 3B
roland@xxxxxxxxxxxxx                       Forest Hills, NY 11375


[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux