From: Tomas Vondra <tv@fuzzy.cz>
To: pgsql-performance@postgresql.org
Subject: Re: how to know slowly query in lock postgre
Date: Mon, 20 Jun 2011 21:09:34 +0200
Message-ID: <4DFF9AEE.8080009@fuzzy.cz> (raw)
In-Reply-To: <821517.42508.qm@web77309.mail.sg1.yahoo.com>
References: <821517.42508.qm@web77309.mail.sg1.yahoo.com>
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
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: tv@fuzzy.cz
Subject: Re: how to know slowly query in lock postgre
In-Reply-To: <4DFF9AEE.8080009@fuzzy.cz>
* 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