Re: updating all records of a table - Mailing list pgsql-general

From Joshua D. Drake
Subject Re: updating all records of a table
Date
Msg-id 1299208803.670.152.camel@jd-desktop
Whole thread Raw
In response to updating all records of a table  ("Gauthier, Dave" <dave.gauthier@intel.com>)
List 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


pgsql-general by date:

Previous
From: "Gauthier, Dave"
Date:
Subject: updating all records of a table
Next
From: tuanhoanganh
Date:
Subject: Pgdump error "invalid page header in block"