Re: updating all records of a table

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: updating all records of a table
Date: 2011-03-04 03:20:03
Message-ID: 1299208803.670.152.camel@jd-desktop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2011-03-03 at 20:03 -0700, Gauthier, Dave wrote:
> Hi:
>
> I have to update all the records of a table. I'm worried about what
> the table will look like in terms of fragmentation when this is
> finished. Is there some sort of table healing/reorg/rebuild measure I
> should take if I want the resulting table to operate at optimal
> efficiency? What about indexes, should I drop/recreate those?

Well it depends on the size of table but yes it is going to create a lot
of dead space. A cluster or reindex of the table will solve this for
you.

JD

--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering
http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt

In response to

Browse pgsql-general by date

  From Date Subject
Next Message tuanhoanganh 2011-03-04 07:47:44 Pgdump error "invalid page header in block"
Previous Message Gauthier, Dave 2011-03-04 03:03:59 updating all records of a table