Re: loading data, creating indexes, clustering, vacuum...

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Alan Hodgson <ahodgson(at)simkin(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: loading data, creating indexes, clustering, vacuum...
Date: 2006-12-08 10:51:15
Message-ID: 20061208105115.GE25912@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Dec 07, 2006 at 02:52:11PM -0800, Alan Hodgson wrote:
> On Thursday 07 December 2006 08:38, "Angva" <angvaw(at)gmail(dot)com> wrote:
> > three commands. For instance I have a hunch that creating the indexes
> > first (as I do now) could slow down the clustering - perhaps the row
> > locations in the indexes all have to be updated as the cluster command
> > shifts their locations? And perhaps vacuuming should be done before
> > clustering so that dead tuples aren't "in the way"?
>
> clustering also removes the dead tuples.
>
> I would just:
>
> - create one index, the one to be clustered
> - cluster the table
> - create the remaining indexes

And then run ANALYSE. No need to vacuum because the cluster did that
already.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Max Bondaruk 2006-12-08 10:58:35 error with Subquery
Previous Message Ragnar 2006-12-08 10:32:20 Re: How to use outer join in update