"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