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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-sql by date

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