pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ulrich Wisser <ulrich.wisser@relevanttraffic.se>
To: pgsql-performance@postgresql.org
Cc: bruno@wolff.to
Subject: Re: [GENERAL] How to know which queries are to be optimised?
Date: Thu, 12 Aug 2004 12:37:44 +0200
Message-ID: <411B4878.4090804@relevanttraffic.se> (raw)
In-Reply-To: <20040811162701.GA9992@wolff.to>
References: <4110CFE7.9000202@relevanttraffic.se>
	<20040811162701.GA9992@wolff.to>

Hi Bruno,

>>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.

I do a vacuum full analyze every night.
How can I see if my FSM setting is appropriate?

>>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.

But is there a tool that could compile a summary out of the log? The log 
grows awefully big after a short time.

Thanks

/Ulrich








view thread (7+ messages)  latest in thread

Message-ID: <411B4878.4090804@relevanttraffic.se>
Permalink:  ../411B4878.4090804@relevanttraffic.se/
Also on:    postgresql.org/message-id/411B4878.4090804@relevanttraffic.se

 · 

reply

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: ulrich.wisser@relevanttraffic.se, bruno@wolff.to
  Subject: Re: [GENERAL] How to know which queries are to be optimised?
  In-Reply-To: <411B4878.4090804@relevanttraffic.se>

* 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