Re: Queries running the longest?

From: Ashish Karalkar <ashish(dot)karalkar(at)netcore(dot)co(dot)in>
To: Machiel Richards <machielr(at)rdc(dot)co(dot)za>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Queries running the longest?
Date: 2010-08-19 08:06:26
Message-ID: 4C6CE602.2080700@netcore.co.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

You can decide a threshold response time for all queries which you want
to investigate .

Lets say you want to investigate all queries which take more than 200ms
then set log_min_duration to 200 in postgresql.conf and it will start
logging all queries taking more time than ther threshold in the server log.

--Ashish

On 08/19/2010 01:28 PM, Machiel Richards wrote:
> Good day everyone.
>
>
> Firstly I would like to thank everyone in advance for all
> the help over the last couple of weeks on this mailing list as it has
> helped me out a lot in my efforts to try and understand Postgresql better.
>
> I am however once again here with some more questions which
> I hope someone can assist me with as I can not seem to find good
> documentation on this as yet...
>
>
> As part of our daily health checks and efforts to assist our
> client to improve their performance on their postgresql databases, we
> need to look at the queries that takes the longest to run and then use
> explain or other methods to try and improve the queries, add indexes
> where required, etc...
>
>
> However, I am trying to find out how I will be able to
> track / see these queries in order for me to be able to investigate these.
>
> the client have a total of 100 databases and to manually
> monitor these will be too time consuming considering that we have many
> clients to look after each day.
>
>
> Can anyone perhaps point me in the right direction here, even if
> it is in the form of documentation that will assist me in this.
>
>
> Regards
> Machiel

--

With Regards
Ashish Karalkar

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Thom Brown 2010-08-19 08:12:45 Re: Queries running the longest?
Previous Message Machiel Richards 2010-08-19 07:58:49 Queries running the longest?