pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steve Lane <slane@moyergroup.com>
To: pgsql-admin@postgresql.org
Subject: Re: Interpreting query debug output
Date: Tue, 18 May 2004 22:08:42 -0500
Message-ID: <BCD039EA.11799%slane@moyergroup.com> (raw)
In-Reply-To: <10080.1084928803@sss.pgh.pa.us>



> From: Tom Lane <tgl@sss.pgh.pa.us>
> Date: Tue, 18 May 2004 21:06:43 -0400
> To: Steve Lane <slane@moyergroup.com>
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Interpreting query debug output
> 
> Steve Lane <slane@moyergroup.com> writes:
>> I have a database that is exhibiting sluggishness under load. Suspecting
>> that some queries may be poorly optimized, I turned on a fair amount of
>> debugging output in the logs. But I could use some help interpreting it.
> 
> I think you're going at this all wrong.  EXPLAIN ANALYZE should be the
> first tool you turn to, not low-level stats.  Browsing the archives of
> the pgsql-performance mailing list may help you get started.
> 
> regards, tom lane
> 

Hmm. When I do a process listing I can see that there are postgres processes
occupying large chunks of CPU, sometimes in the 60-99% range, for long
enough to be noticeable in the process list. I'd like to capture those
process IDs and then correlate them with the stats captured in the log to
see why they take so much CPU.

If I want to EXPLAIN ANALYZE, I have to pick individual queries. The query
logic of the application is distributed across many source files. I'd have
to do quite some combing to recover a list of all queries the system runs. I
figure distilling the log output might be the best approach.

Given these points, is this still the wrong approach? Even if so, I'd still
love to know how to read the debug output.

-- sgl




view thread (3+ messages)

Message-ID: <BCD039EA.11799%slane@moyergroup.com>
Permalink:  ../BCD039EA.11799%25slane@moyergroup.com/
Also on:    postgresql.org/message-id/BCD039EA.11799%slane@moyergroup.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: slane@moyergroup.com
  Subject: Re: Interpreting query debug output
  In-Reply-To: <BCD039EA.11799%slane@moyergroup.com>
  References: <10080.1084928803@sss.pgh.pa.us> <BCD039EA.11799%slane@moyergroup.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox