Re: updating all records of a table

From: Willy-Bas Loos <willybas(at)gmail(dot)com>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>, ray <ray(at)aarden(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: updating all records of a table
Date: 2011-03-05 23:42:45
Message-ID: AANLkTikOLaPZi3ZOc_BtbyrX7Tdr5ssVmviZvTOLqago@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

you might consider lowering the fillfactor a bit. It will consume more
space, but it will make updates and inserts faster.

http://www.postgresql.org/docs/8.4/interactive/sql-createtable.html :
fillfactor (integer)

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. This parameter
cannot be set for TOAST tables.
--
"Patriotism is the conviction that your country is superior to all others
because you were born in it." -- George Bernard Shaw

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mike Christensen 2011-03-06 00:40:57 Re: Web Hosting
Previous Message Willy-Bas Loos 2011-03-05 23:25:40 Re: Why count(*) doest use index?