Re: Server load statistics - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Re: Server load statistics
Date
Msg-id 20100725110117.GB28320@depesz.com
Whole thread Raw
In response to Server load statistics  (Torsten Bronger <bronger@physik.rwth-aachen.de>)
List pgsql-general
On Sun, Jul 25, 2010 at 12:15:06PM +0200, Torsten Bronger wrote:
> Hallöchen!
>
> I need statistics about the PG server load.  At the moment, I use
> for this
>
> SELECT tup_returned + tup_fetched + tup_inserted + tup_updated +
>      tup_deleted FROM pg_stat_database WHERE datname='mydb';
>
> However, the figures are absurdly high (> 100.000 rows per second).
> If a "row" is one dataset (one user account, one blog entry, one
> comment etc), I expect two or three orders of magnitude less.  Is my
> SQL statement nevertheless a good way to measure how busy the server
> is?

did you rememebr to substract *previous* value of this select?

Best regards,

depesz

--
Linkedin: http://www.linkedin.com/in/depesz  /  blog: http://www.depesz.com/
jid/gtalk: depesz@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007

pgsql-general by date:

Previous
From: Torsten Bronger
Date:
Subject: Server load statistics
Next
From: Andreas Kretschmer
Date:
Subject: Re: Server load statistics