Re: Selects query stats?

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Selects query stats?
Дата
Msg-id 1148420837.2755.196.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: Selects query stats?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
On Tue, 2006-05-23 at 15:55 -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > OTOH ISTM it would be easy to modify Postgres so as to count statements
> > in the stat collector, by turning pgstat_report_activity into a routine
> > that sent a count (presumably always 1) instead of the query string, and
> > then just add the count to a counter on receiving.
>
> You wouldn't have to change the backends at all, just modify the
> collector to count the number of report_activity messages received.
> Might have to play some games with ignoring "<IDLE>" messages, but
> otherwise simple (and simplistic...)

The OP wanted statements/sec rather than just a total.

Having stats logged by time would be very useful, but I wouldn't limit
that just to numbers of statements in each time period.

stats_logging_interval = 60 by default, 0 to disable, range 5-3600

--
  Simon Riggs
  EnterpriseDB          http://www.enterprisedb.com


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

Предыдущее
От: "Guillaume Smet"
Дата:
Сообщение: Re: Selects query stats?
Следующее
От: Mischa Sandberg
Дата:
Сообщение: Re: Selects query stats?