Re: How to get total count of queries hitting DB per day or per hour? - Mailing list pgsql-general

From Andy Colson
Subject Re: How to get total count of queries hitting DB per day or per hour?
Date
Msg-id 559EB911.4020100@squeakycode.net
Whole thread Raw
In response to How to get total count of queries hitting DB per day or per hour?  ("Sheena, Prabhjot" <Prabhjot.Singh@classmates.com>)
List 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 by date:

Previous
From: Andy Colson
Date:
Subject: Re: Index Only Scan vs Cache
Next
From: Vick Khera
Date:
Subject: Re: How to test SSL cert from CA?