Re: SQL Monitoring - Mailing list pgsql-performance

From Gregory Stark
Subject Re: SQL Monitoring
Date
Msg-id 878x6ccdvt.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: SQL Monitoring  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
List pgsql-performance
"Heikki Linnakangas" <heikki@enterprisedb.com> writes:

> Campbell, Lance wrote:
>> I have noticed a slight spike in the amount of CPU usage in the last few
>> weeks.  I am sure it has to do with a change or two that was made to
>> some queries.  What is the best way to log the SQL that is being
>> executed?
>
> Take a look at statement_timeout and log_statement configuration variables.

I suspect he meant log_min_duration_statement which lets you log only queries
which take too long and not statement_timeout which would actually kill your
query if it took too long.


--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

pgsql-performance by date:

Previous
From: "Heikki Linnakangas"
Date:
Subject: Re: SQL Monitoring
Next
From: "Radhika S"
Date:
Subject: Postgres running Very slowly