From: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
To: Orion Henry <orion@trustcommerce.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: database profiling
Date: Wed, 21 Jan 2004 08:24:55 +0800
Message-ID: <400DC6D7.1040705@familyhealth.com.au> (raw)
In-Reply-To: <1074628029.1563.521.camel@orthanc>
References: <1074628029.1563.521.camel@orthanc>
> 1) Statistics kept on all the tables and indexes showing the number of
> times and the number of milliseconds spent sequential scanning / index
> scanning them. You could easily identify an index that's not being used
> or a table that's being sequential scanned too often. Also supply a
> database command to reset the statistic gather to zero.
Enable the stats collector in your postgresql.conf, and then look at the
pg_stat_* views. They are your friend.
> 2) Statics that show count/total times to insert into/updating/deleting
> from a table with time times spent in table and index separated so you
> could see how much the indexes are effecting the write performance on
> the table.
Lots of that is in the pg_statio_* tables (if you have the collector
running)
> 3) The ability to view the current running time, plan and SQL text of
> all currently running queries.
That's in the pg_stat_activity table.
There's also a new postgresql.conf setting in 7.4 that lets you log any
query that runs more than a certain number of milliseconds - which is
very useful for tracking down your slow queries.
Chris
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-performance@postgresql.org
Cc: chriskl@familyhealth.com.au, orion@trustcommerce.com
Subject: Re: database profiling
In-Reply-To: <400DC6D7.1040705@familyhealth.com.au>
References: <1074628029.1563.521.camel@orthanc> <400DC6D7.1040705@familyhealth.com.au>
* 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