Re: problems maintaining boolean columns in a large table

From: John R Pierce <pierce(at)hogranch(dot)com>
To: Ben Campbell <ben(at)scumways(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: problems maintaining boolean columns in a large table
Date: 2010-02-11 17:49:08
Message-ID: 4B744314.7030301@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ben Campbell wrote:
> I _think_ the reason it takes so long is that postgresql doesn't
> modify rows in place - it creates an entry for the modified row and
> zaps the old one. So by touching _every_ row I'm basically forcing it
> to rebuild my whole database... I've got about 2 million rows in
> 'articles'.
> There are a few indexes on columns in 'articles' which obviously will
> slow things down too.

at the expense of disk space, try setting fill_factor for that table to
something like 70 instead of the default 100.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-02-11 18:17:26 Re: questions about a table's row estimates
Previous Message Chris Barnes 2010-02-11 17:47:23 Truncate and delete adds wal logs for slave to process.