Re: Why queries takes too much time to execute?

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Anderson Boechat Lopes <teouique(at)terra(dot)com(dot)br>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Why queries takes too much time to execute?
Date: 2004-05-10 14:24:24
Message-ID: 409F9098.20700@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Anderson Boechat Lopes 2004-05-10 17:36:39 Re: Why queries takes too much time to execute?
Previous Message Shridhar Daithankar 2004-05-10 14:21:47 Re: Why queries takes too much time to execute?