pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
how to know slowly query in lock postgre
3+ messages / 3 participants
[nested] [flat]

* how to know slowly query in lock postgre
@ 2011-06-20 07:57  Didik Prasetyo <prasetyodidik62@yahoo.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Didik Prasetyo @ 2011-06-20 07:57 UTC (permalink / raw)
  To: pgsql-performance

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


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: how to know slowly query in lock postgre
@ 2011-06-20 09:45  Claudio Freire <klaussfreire@gmail.com>
  parent: Didik Prasetyo <prasetyodidik62@yahoo.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Claudio Freire @ 2011-06-20 09:45 UTC (permalink / raw)
  To: Didik Prasetyo <prasetyodidik62@yahoo.com>; +Cc: pgsql-performance

Something like this[0] ?

[0] http://archives.postgresql.org/pgsql-hackers/2007-04/msg01037.php

On Mon, Jun 20, 2011 at 9:57 AM, Didik Prasetyo
<prasetyodidik62@yahoo.com> wrote:
> 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
>



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: how to know slowly query in lock postgre
@ 2011-06-20 19:09  Tomas Vondra <tv@fuzzy.cz>
  parent: Didik Prasetyo <prasetyodidik62@yahoo.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Tomas Vondra @ 2011-06-20 19:09 UTC (permalink / raw)
  To: 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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2011-06-20 19:09 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-06-20 07:57 how to know slowly query in lock postgre Didik Prasetyo <prasetyodidik62@yahoo.com>
2011-06-20 09:45 ` Claudio Freire <klaussfreire@gmail.com>
2011-06-20 19:09 ` Tomas Vondra <tv@fuzzy.cz>

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