From: Andreas Kretschmer <akretschmer@spamfence.net>
To: pgsql-performance@postgresql.org
Subject: Re: Common slow query reasons - help with a special log
Date: Sat, 10 Dec 2011 18:25:43 +0100
Message-ID: <20111210172543.GA21157@tux> (raw)
In-Reply-To: <CACffM9E1d9bR=xdWYoAPF2Y2NMpfE4gpRQf6vjV3QXQ5SSSLbw@mail.gmail.com>
References: <CACffM9E1d9bR=xdWYoAPF2Y2NMpfE4gpRQf6vjV3QXQ5SSSLbw@mail.gmail.com>
Daniel Cristian Cruz <danielcristian@gmail.com> wrote:
> Hi all,
>
> I'm trying to figure out some common slow queries running on the server, by
> analyzing the slow queries log.
>
> I found debug_print_parse, debug_print_rewritten, debug_print_plan, which are
> too much verbose and logs all queries.
>
> I was thinking in something like a simple explain analyze just for queries
> logged with log_min_duration_statement with the query too.
>
> Is there a way to configure PostgreSQL to get this kind of information, maybe
> I'm missing something? Is it too hard to hack into sources and do it by hand? I
> never touched PostgreSQL sources.
Consider auto_explain, it's a contrib-modul, see
http://www.postgresql.org/docs/9.1/interactive/auto-explain.html
Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
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: akretschmer@spamfence.net
Subject: Re: Common slow query reasons - help with a special log
In-Reply-To: <20111210172543.GA21157@tux>
* 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