Re: query is taking longer time after a while

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: query is taking longer time after a while
Date: 2009-09-30 06:48:42
Message-ID: 20090930064842.GA5154@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In response to tomrevam :
>
>
>
> Scott Marlowe-2 wrote:
> >
> > Just wondering, what version of pgsql are you running? I noticed a
> > lot less degradation from heavily updated tables when I went to 8.3
> > and set the fill % for tables / indexes to 90% or so. If you're
> > running an older version, the upgrade to 8.3 may well be worth the
> > effort.
> >
>
> I'm using version 8.3, but I don't know what you meant by fill %.

Copy&Paste from the doc:
( http://www.postgresql.org/docs/8.4/interactive/sql-createtable.html )

The fillfactor for a table is a percentage between 10 and 100. 100
(complete packing) is the default. When a smaller fillfactor is
specified, INSERT operations pack table pages only to the indicated
percentage; the remaining space on each page is reserved for updating
rows on that page. This gives UPDATE a chance to place the updated copy
of a row on the same page as the original, which is more efficient than
placing it on a different page. For a table whose entries are never
updated, complete packing is the best choice, but in heavily updated
tables smaller fillfactors are appropriate.

You can set this with this command:

alter table foo set (fillfactor=90);

Regards, Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mark Morgan Lloyd 2009-09-30 08:31:05 Re: Delphi connection ?
Previous Message tomrevam 2009-09-30 06:32:45 Re: query is taking longer time after a while