Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group