Skip site navigation (1) Skip section navigation (2)

Re: Finding slow queries?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jessica Dalman <jessica_dalman(at)yahoo(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Finding slow queries?
Date: 2004-03-11 18:37:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Jessica Dalman <jessica_dalman(at)yahoo(dot)com> writes:
> I am trying to find which
> queries are the slowest from a web site which runs on
> top of postgres 7.4.1.  I'm not sure what I need to
> do, though.  I set the log_min_duration_statement to
> 10000, but I don't see anything new being logged to
> the pg.log.

Are you sure that you have any queries that take more than 10 seconds?
Maybe you need a smaller value of log_min_duration_statement.

Another thought: did you remember to SIGHUP the postmaster (or
equivalently "pg_ctl reload") after changing the config file?
It won't notice your change unless nudged.  You can check whether
the change has taken effect by psql'ing in and doing a SHOW on
the variable.

			regards, tom lane

In response to

pgsql-novice by date

Next:From: Hari BhanujanDate: 2004-03-11 21:18:12
Subject: Startup script
Previous:From: Jessica DalmanDate: 2004-03-11 17:48:12
Subject: Finding slow queries?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group