Skip site navigation (1) Skip section navigation (2)

Re: Tuning

From: "Peter Kovacs" <maxottovonstirlitz(at)gmail(dot)com>
To: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
Cc: Jack <jdetate(at)gmail(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Tuning
Date: 2008-03-26 12:24:31
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
tkprof generates performance characteristics for an arbitrary number
of SQL statements. The output includes measurements for the individual
SQL statements as well as cumulated values for the sequence of SQL
statements being measured. Data is presented in a two dimensional
format with the first dimension being the type of operation (parsing,
compiling, executing, fetching) and the second dimension being the
time spent in CPU or IO. You can see a sample output here: .

The trick is that the Oracle code is instrumented to track all the
information necessary for these measurements. When tracing is enabled,
the measure values are output sequentially and this output is the
post-processed by tkprof. The raw (tracing) output is also fairly
readable, so if you want to dig deeper than the tkprof output, you can
use it (eventually post-processing it in your own way).

I am not familiar with PostgreSQL's explain analyze method, but as far
as I remember, it can be used only for one SQL statement and requires
a significant amount of practice to interpret easily.

BTW, I had a bookmark for a good tutorial on explain analyze, but the
page is no longer available: .
Can you suggest a good tutorial?


On Tue, Mar 25, 2008 at 4:29 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> wrote:
> On Mon, Mar 24, 2008 at 4:56 PM, Jack <jdetate(at)gmail(dot)com> wrote:
>  >
>  >
>  >
>  >
>  > Is there a Postgres equivalent of tkprofs for tuning?
>  you might want to provide an explanation of what tkprofs is and which
>  parts you're interested in emulating in pgsql.
>  Have you read up on explain, explain analyze, and the various
>  pg_stat_* tables?  Do any of those help?
>  --
>  Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
>  To make changes to your subscription:

In response to

  • Re: Tuning at 2008-03-25 15:29:36 from Scott Marlowe


  • Re: Tuning at 2008-03-26 12:39:00 from Milen A. Radev

pgsql-admin by date

Next:From: Milen A. RadevDate: 2008-03-26 12:39:00
Subject: Re: Tuning
Previous:From: EnricoDate: 2008-03-26 08:45:33
Subject: Re: migration of 7.4 to 8.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group