pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
To: Anderson Boechat Lopes <teouique@terra.com.br>
Cc: pgsql-performance@postgresql.org
Subject: Re: Why queries takes too much time to execute?
Date: Mon, 10 May 2004 22:24:24 +0800
Message-ID: <409F9098.20700@familyhealth.com.au> (raw)
In-Reply-To: <00b901c43697$333ec5d0$5f00a8c0@suport01>
References: <00b901c43697$333ec5d0$5f00a8c0@suport01>

>     Well, i have a very large database, with vary tables and very 
> registers. Every day, too many operations are perfomed in that DB, with 
> queries that insert, delete and update. Once a week some statistics are 
> collected using vacuum analyze.

Have vacuum analyze running once an HOUR if it's very busy.  If you are 
using 7.4, run the pg_autovacuum daemon that's in contrib/pg_autovacuum.

>     The problem is after a period of time (one month, i think), the 
> queries takes too much time to perform. A simple update can take 10 
> seconds or more to perform.

If running vacuum analyze once an hour doesn't help, try running a 
vacuum full once a week or something to fix the problem.

Also, try upgrading to 7.4 which has indexes that won't suffer from bloat.

Chris




view thread (6+ messages)  latest in thread

Message-ID: <409F9098.20700@familyhealth.com.au>
Permalink:  ../409F9098.20700@familyhealth.com.au/
Also on:    postgresql.org/message-id/409F9098.20700@familyhealth.com.au

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: chriskl@familyhealth.com.au, teouique@terra.com.br
  Subject: Re: Why queries takes too much time to execute?
  In-Reply-To: <409F9098.20700@familyhealth.com.au>
  References: <00b901c43697$333ec5d0$5f00a8c0@suport01> <409F9098.20700@familyhealth.com.au>

* 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