Re: Server load statistics
От | Andreas Kretschmer |
---|---|
Тема | Re: Server load statistics |
Дата | |
Msg-id | 20100725114827.GA16051@tux обсуждение исходный текст |
Ответ на | Server load statistics (Torsten Bronger <bronger@physik.rwth-aachen.de>) |
Список | pgsql-general |
Torsten Bronger <bronger@physik.rwth-aachen.de> 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°
В списке pgsql-general по дате отправления: