From: Bruno Wolff III <bruno@wolff.to>
To: Ulrich Wisser <ulrich.wisser@relevanttraffic.se>
Cc: pgsql-general@postgresql.org
Cc: pgsql-performance@postgresql.org
Subject: Re: How to know which queries are to be optimised?
Date: Wed, 11 Aug 2004 11:27:01 -0500
Message-ID: <20040811162701.GA9992@wolff.to> (raw)
In-Reply-To: <4110CFE7.9000202@relevanttraffic.se>
References: <4110CFE7.9000202@relevanttraffic.se>
On Wed, Aug 04, 2004 at 14:00:39 +0200,
Ulrich Wisser <ulrich.wisser@relevanttraffic.se> wrote:
This topic really belongs on the performance list. I have copied that
list and set followups to go there and copy you.
>
> my web application grows slower and slower over time. After some
> profiling I came to the conclusion that my SQL queries are the biggest
> time spenders (25 seconds). Obviously I need to optimise my queries and
> maybe introduce some new indexes.
This sounds like you aren't doing proper maintainance. You need to be
vacuuming with a large enough FSM setting.
> The problem is, that my application uses dynamic queries. I therefor can
> not determine what are the most common queries.
>
> I have used the postgresql logging ption before. Is there a tool to
> analyze the logfile for the most common and/or most time consuming queries?
You can log queries that run for at least a specified amount of time.
This will be useful in finding what the long running queries are.
You can then use explain analyse to see why they are long running.
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: bruno@wolff.to, ulrich.wisser@relevanttraffic.se, pgsql-general@postgresql.org
Subject: Re: How to know which queries are to be optimised?
In-Reply-To: <20040811162701.GA9992@wolff.to>
* 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