Re: current transaction in productive database

Поиск
Список
Период
Сортировка
От Euler Taveira de Oliveira
Тема Re: current transaction in productive database
Дата
Msg-id 49C3D76C.9040400@timbira.com
обсуждение исходный текст
Ответ на current transaction in productive database  ("ml@bortal.de" <ml@bortal.de>)
Список pgsql-performance
ml@bortal.de escreveu:
> is there a way to find out, how many transactions my currenc productive
> database is doing?
>
If you're looking for number of transactions then you can query the catalogs as:

$ export myq="select sum(xact_commit+xact_rollback) from pg_stat_database"
$ psql -U postgres -c "$myq" && sleep 60 && psql -U postgres -c "$myq"
    sum
-----------
 178992891
(1 row)

    sum
-----------
 178996065
(1 row)

$ bc -q
scale=3
(178996065-178992891)/60
52.900

Depending on your workload pattern, it's recommended to increase the sleep time.


--
  Euler Taveira de Oliveira
  http://www.timbira.com/

В списке pgsql-performance по дате отправления:

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: current transaction in productive database
Следующее
От: Scott Carey
Дата:
Сообщение: Re: Proposal of tunable fix for scalability of 8.4