Re: How to get total count of queries hitting DB per day or per hour?
| От | Andy Colson |
|---|---|
| Тема | Re: How to get total count of queries hitting DB per day or per hour? |
| Дата | |
| Msg-id | 559EB911.4020100@squeakycode.net обсуждение исходный текст |
| Ответ на | How to get total count of queries hitting DB per day or per hour? ("Sheena, Prabhjot" <Prabhjot.Singh@classmates.com>) |
| Список | pgsql-general |
On 7/9/2015 1:04 PM, Sheena, Prabhjot wrote:
> Guys
>
> Is there a way to get total count of queries hitting
> Postgresql DB(verison 9.3) per day or per hour ? I cannot turn on
> log_statement=all coz that’s too much logging for our log file to
> handle. Is there another way to do that.
>
> Thanks
>
> Prabhjot
>
My collectd config:
<Plugin postgresql>
<Query ttlbackends>
Statement "SELECT sum(numbackends) AS count, sum(xact_commit)
as ttlcommit FROM pg_stat_database;"
<Result>
Type "pg_numbackends"
ValuesFrom "count"
</Result>
<Result>
Type "pg_xact"
ValuesFrom "ttlcommit"
</Result>
</Query>
<Database postgres>
#Interval 60
Host "/tmp"
Port "5432"
SSLMode "disable"
Query ttlbackends
</Database>
</Plugin>
В списке pgsql-general по дате отправления: