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

Re: Profiling postgresql queries

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Profiling postgresql queries
Date: 2008-07-09 08:41:08
Message-ID: 20080709084108.GC6426@a-kretschmer.de (view raw or flat)
Thread:
Lists: pgsql-sql
am  Wed, dem 09.07.2008, um 10:22:09 +0200 mailte Nacef LABIDI folgendes:
> Hi all,
> I was wondering if there is any GUI or command line based tool running on
> windows that could help me to profile PostgreSQL queries performance. It should

You can use EXPLAIN ANALYSE to analyse your queries (if they use
indexes, execution plan, estimated versus real rows etc.)


> be able to do live profiling since I want to profile the accesses that my
> application is doing on the Postgres database.

You can log slow queries with a setting in your postgresql.conf:

log_min_duration_statement = N

with N means the duration time in ms, it loggs all queries with an
execution time more than that.


Regards, Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

In response to

pgsql-sql by date

Next:From: Ivan Sergio BorgonovoDate: 2008-07-09 09:45:50
Subject: selecting N record for each group
Previous:From: Nacef LABIDIDate: 2008-07-09 08:22:09
Subject: Profiling postgresql queries

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