Re: Server load statistics

Поиск
Список
Период
Сортировка
Искать
От
Sam Mason
Тема
Re: Server load statistics
Дата
Msg-id
20100726104753.GG7584@samason.me.uk
Ответ на
Server load statistics (Torsten Bronger)
Список
Дерево обсуждения
Server load statistics Torsten Bronger <bronger@physik.rwth-aachen.de>
Re: Server load statistics hubert depesz lubaczewski <depesz@depesz.com>
Re: Server load statistics Andreas Kretschmer <akretschmer@spamfence.net>
Re: Server load statistics Sam Mason <sam@samason.me.uk>
On Sun, Jul 25, 2010 at 12:15:06PM +0200, Torsten Bronger wrote:
> 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?

Yes, but I don't think it's measuring what you think it is.
"tup_returned" gives the number of tuples read during sequential scans,
so you've probably got some queries that are touching many more rows
than you're expecting.

-- 
  Sam  http://samason.me.uk/
В списке pgsql-general по дате отправления
От: Artur Dabrowski
Дата:
От: AlannY
Дата:
FAQ