From: Jim C. Nasby <jim@nasby.net>
To: Bill Moran <wmoran@collaborativefusion.com>
Cc: Matthew Schumacher <matt.s@aptalaska.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Problems with inconsistant query performance.
Date: Thu, 28 Sep 2006 11:15:49 -0500
Message-ID: <20060928161549.GN34238@nasby.net> (raw)
In-Reply-To: <20060928112843.0b6e3715.wmoran@collaborativefusion.com>
References: <451AC4E2.90106@aptalaska.net>
<1c9501c6e2fb$91e30200$0c67a8c0@maniek>
<451BE7CD.3060807@aptalaska.net>
<20060928112843.0b6e3715.wmoran@collaborativefusion.com>
On Thu, Sep 28, 2006 at 11:28:43AM -0400, Bill Moran wrote:
> In response to Matthew Schumacher <matt.s@aptalaska.net>:
> >
> > What I really need is a way to profile my proc when it runs slow so that
> > I can resolve which of the queries is really slow. Anyone with an idea
> > on how to do this?
>
> You could turn on statement logging and duration logging. This would
> give you a record of when things run and how long they take. A little
> work analyzing should show you which queries are running when your
> favorite query slows down.
By default, that doesn't help you debug what's happening inside a
function, because you only get the call to the function. I don't know if
you can increase verbosity to combat that.
Something else to consider is that gettimeofday() on some platforms is
painfully slow, which could completely skew all your numbers.
--
Jim Nasby jim@nasby.net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: jim@nasby.net, wmoran@collaborativefusion.com, matt.s@aptalaska.net
Subject: Re: Problems with inconsistant query performance.
In-Reply-To: <20060928161549.GN34238@nasby.net>
* 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