Re: how to know slowly query in lock postgre

From: Tomas Vondra <tv(at)fuzzy(dot)cz>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: how to know slowly query in lock postgre
Date: 2011-06-20 19:09:34
Message-ID: 4DFF9AEE.8080009@fuzzy.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Dne 20.6.2011 09:57, Didik Prasetyo napsal(a):
> hai friend i have problem with performance database in postgre, how to
> know slowly query in postgre,
> i want kill or stop query to make postgre slowly, on the server status
> on the admin pg, sometimes the query and how long the query runs do not
> appear
>
> Thanks for solution

Killing long running queries probably is not a good idea (at least the
users usually think that).

You should try to identify the slow queries and optimize them first. The
"log_min_duration_statement" can do that - the queries that take longer
will be written to the postgresql log.

http://www.postgresql.org/docs/8.3/static/runtime-config-logging.html

regards
Tomas

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jon Nelson 2011-06-20 19:31:05 Re: bad plan: 8.4.8, hashagg, work_mem=1MB.
Previous Message Tomas Vondra 2011-06-20 19:01:35 Re: sequential scan unduly favored over text search gin index