Re: High CPU Load

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Dave Dutcher <dave(at)tridecap(dot)com>
Cc: 'Jérôme BENOIS' <benois(at)argia-engineering(dot)fr>, pgsql-performance(at)postgresql(dot)org
Subject: Re: High CPU Load
Date: 2006-09-14 15:56:52
Message-ID: 1158249411.24726.17.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, 2006-09-14 at 10:02, Dave Dutcher wrote:
> > -----Original Message-----
> > From: pgsql-performance-owner(at)postgresql(dot)org
> > [mailto:pgsql-performance-owner(at)postgresql(dot)org] On Behalf Of
> > Jérôme BENOIS
> >
> explain analyze select distinct
> > INTEGER_VALUE,DATE_VALUE,EI_ID,VALUE_TYPE,FLOAT_VALUE,ID,TEXT_
> > VALUE,CATEGORY_ID,STRING_VALUE,CATEGORYATTR_ID,NAME from (((
> > select distinct ei_id as EIID from mpng2_ei_attribute as
> > reqin1 where reqin1.CATEGORYATTR_ID = 0 AND reqin1.TEXT_VALUE
> > ilike '' and ei_id in ( select distinct ei_id as EIID from
> > mpng2_ei_attribute as reqin2 where reqin2.CATEGORYATTR_ID = 0
> > AND reqin2.TEXT_VALUE ilike '' and ei_id in ( select distinct
> > ei_id as EIID from mpng2_ei_attribute as reqin3 where
> > reqin3.NAME = '' AND reqin3.STRING_VALUE = '' ) ) ) ) ) as
> > req0 join mpng2_ei_attribute on req0.eiid =
> > mpng2_ei_attribute.ei_id order by ei_id asc;
>
>
> That is a lot of distinct's. Sorts are one thing that can really use up
> CPU. This query is doing lots of sorts, so its not surprising the CPU usage
> is high.

I'm gonna make a SWAG here and guess that maybe your 7.4 db was initdb'd
with a locale of C and the new one is initdb'd with a real locale, like
en_US. Can Jérôme confirm or deny this?

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Evgeny Gridasov 2006-09-14 16:47:39 Re: High CPU Load
Previous Message Francisco Reyes 2006-09-14 15:23:01 Vacuums on large busy databases