Search Postgresql Archives

Re: Server load statistics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Torsten Bronger <bronger@xxxxxxxxxxxxxxxxxxxxx> 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).

Do you know, that you have to call pg_stat_reset() to restart all the
counters? And yes, a update is a delete and a insert. With your query
you get 3 rows per one singel update (tup_updated + tup_deleted +
tup_inserted). That's maybe not that what you expected.

Not to mention, every operation affects the system-tables, so one single
update, for instance, procude more than 3 table-operations.


Andreas
-- 
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."   (unknown)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux