Re: building a performance test suite - Mailing list pgsql-performance

From Greg Smith
Subject Re: building a performance test suite
Date
Msg-id Pine.GSO.4.64.0710102252570.23235@westnet.com
Whole thread Raw
In response to building a performance test suite  (Kevin Kempter <kevin@kevinkempterllc.com>)
List pgsql-performance
On Wed, 10 Oct 2007, Kevin Kempter wrote:

> should I be looking at others like pg_statio or pg_stat_all_tables ? If
> so, what should I look for in these (or other) tables?

There are a good set of monitoring scripts for performance-oriented things
included with the dbt2 benchmarking package,
http://sourceforge.net/projects/osdldbt

You can just use the SVN browse to take a look at the data collected by
that; see /trunk/dbt2/bin/pgsql/dbt2-pgsql-db-stat.in for some good things
to get started with.  For example, here's the pg_statio info they save:

SELECT relid, relname, heap_blks_read, heap_blks_hit, idx_blks_read,
idx_blks_hit FROM pg_statio_user_tables ORDER BY relname;

SELECT relid, indexrelid, relname, indexrelname, idx_blks_read,
idx_blks_hit FROM pg_statio_user_indexes ORDER BY indexrelname;

Pretty much everything in pg_stat_user_tables is worth collecting.  And
you probably want to use the user oriented views rather than the all ones
(pg_stat_user_tables instead of pg_stat_all_tables) so you don't clutter
your results with what's going on in the system tables--unless your test
incudes lots of table modifications that is.  Look at both of them and
you'll see what I mean.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD

pgsql-performance by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: Shared Buffer setting in postgresql.conf
Next
From: Ow Mun Heng
Date:
Subject: Re: Query taking too long. Problem reading explain output.