Re: database speed

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Chris Stokes <ChrisS(at)BassSoftware(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: database speed
Date: 2003-10-31 01:55:12
Message-ID: 20031031015512.GA22009@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Oct 31, 2003 at 11:54:55AM +1100, Chris Stokes wrote:
> Hi all,
>
> WE currently use PG for the local database on our POS workstations in
> shops. Data is then extracted and sent back to head office. Also product
> updates etc are regularly sent to the shops. I have noticed over time that
> the shop PG databases get slower and slower. If I do a pg_dump, recreate
> the database and then restore the data - all speed problems are gone and
> the database folder shrinks in size substantially.
>
> >From this information could anyone tell me what are the likely causes and
> >what we may or may not be doing in our extractions and updates that are
> >not good PG insert, update, delete procedures

The three important steps for maintainence of a postgresql database:

1. ANALYZE
2. VACUUM [FULL]
3. REINDEX

Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> "All that is needed for the forces of evil to triumph is for enough good
> men to do nothing." - Edmond Burke
> "The penalty good people pay for not being interested in politics is to be
> governed by people worse than themselves." - Plato

In response to

Browse pgsql-general by date

  From Date Subject
Next Message mailinglists 2003-10-31 01:56:24 Tsearch2 indexing question....
Previous Message Doug McNaught 2003-10-31 01:23:44 Re: Best Perl Option?