Re: Why very high CPU usage

From: Shaun Thomas <sthomas(at)townnews(dot)com>
To: "Samuel J(dot) Sutjiono" <ssutjiono(at)wc-group(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Why very high CPU usage
Date: 2002-05-10 21:41:45
Message-ID: Pine.LNX.4.44.0205101617420.1163-100000@hamster.lee.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

On Fri, 10 May 2002, Samuel J. Sutjiono wrote:

> This is the SQL that I used:

Can't really say much, not knowing the schema you're using. By looking
at this query, I can probably guess it isn't pretty. 7 search columns
instead of a search table? Putting a sort case in the query itself
instead of predetermining the sort order and dynmaically writing the
query? That gigantic group-by isn't helping you, either.

My guess is that your schema could use an overhaul. We of course are
going to ask you the standard questions. I'll list them off, because
you asked your question without listing the obvious elements:

1.) Have you vacuumed/analyzed recently?
2.) What kind of indexes are you using?
3.) Can we see a schema to see what kind of column types you're using?
4.) Can you send an explain plan or two?
5.) Did you try turning off sequence scans?

Do not expect us to help you with something if you can't give us the
proper tools to do so. We're not magical mind-readers.

--
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Shaun M. Thomas INN Database Administrator |
| Phone: (309) 743-0812 Fax : (309) 743-0830 |
| Email: sthomas(at)townnews(dot)com AIM : trifthen |
| Web : www.townnews.com |
| |
| "Most of our lives are about proving something, either to |
| ourselves or to someone else." |
| -- Anonymous |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message grant 2002-05-10 23:19:44 Re: Why very high CPU usage
Previous Message Josh Berkus 2002-05-10 20:52:40 Re: [SQL] Why very high CPU usage

Browse pgsql-sql by date

  From Date Subject
Next Message grant 2002-05-10 23:19:44 Re: Why very high CPU usage
Previous Message Josh Berkus 2002-05-10 20:52:40 Re: [SQL] Why very high CPU usage