From: Gregory Stark <stark@enterprisedb.com>
To: Heikki Linnakangas <heikki@enterprisedb.com>
Cc: Campbell\, Lance <lance@uiuc.edu>
Cc: pgsql-performance@postgresql.org
Subject: Re: SQL Monitoring
Date: Tue, 09 Oct 2007 20:00:06 +0100
Message-ID: <878x6ccdvt.fsf@oxford.xeocode.com> (raw)
In-Reply-To: <470B994F.1040405@enterprisedb.com>
References: <B10E6810AC2A2F4EA7550D072CDE8760197DA7@SAB-FENWICK.sab.uiuc.edu>
<470B994F.1040405@enterprisedb.com>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: stark@enterprisedb.com, heikki@enterprisedb.com, lance@uiuc.edu
Subject: Re: SQL Monitoring
In-Reply-To: <878x6ccdvt.fsf@oxford.xeocode.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox