Re: Getting time-dependent load statistics - Mailing list pgsql-general

From Bill Moran
Subject Re: Getting time-dependent load statistics
Date
Msg-id 20090220113402.4f1c7ace.wmoran@potentialtech.com
Whole thread Raw
In response to Getting time-dependent load statistics  (Torsten Bronger <bronger@physik.rwth-aachen.de>)
List pgsql-general
In response to Torsten Bronger <bronger@physik.rwth-aachen.de>:

> Hallöchen!
>
> Yesterday I ported a web app to PG.  Every 10 minutes, a cron job
> scanned the log files of MySQL and generated a plot showing the
> queries/sec for the last 24h.  (Admittedly queries/sec is not the
> holy grail of DB statistics.)
>
> But I still like to have something like this.  At the moment I just
> do the same with PG's log file, with
>
>     log_statement_stats = on
>
> But to generate these plots is costly (e.g. I don't need all the
> lines starting with !), and to interpret them is equally costly.  Do
> you have a suggestion for a better approach?

Turn on stats collection and have a look at the various pg_stat* tables.
They'll have stats that you can quickly access with considerably lower
overhead.

Doing it the way you're doing is driving from Pittsburgh to Maine to
get to Ohio.

--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/

pgsql-general by date:

Previous
From: Torsten Bronger
Date:
Subject: Getting time-dependent load statistics
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Getting time-dependent load statistics