Re: Vacuuming

From: Paul Lambert <paul(dot)lambert(at)autoledgers(dot)com(dot)au>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Vacuuming
Date: 2007-05-08 02:58:51
Message-ID: 463FE76B.6030009@autoledgers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
>
> The only thing a vacuum would do for you there is set the commit hint
> bits on the newly-inserted rows. Which might be worth doing if you want
> to get the table into a totally "clean" state, but it's probably a bit
> excessive. SELECTs on the table will set the hint bits anyway as
> they visit not-yet-hinted rows, so it's really a matter of do you want
> to pay that overhead all at once or spread-out.
>
> What you *do* want to do in this situation is an ANALYZE.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org/
>
>

Thanks Tom.

Should the ANALYZE be done before or after indexes are built? Or is that
irrelevant? Should I not even bother rebuilding indexes when I do these
loads?

Currently I:
1) Drop Indexes
2) Truncate and copy in new data
3) Vacuum - now changed to analyze.
4) Create indexes

I add steps one and four on the assumption that adding 40 million
records in one hit might get the indexes confused - but if they are
pretty stable I can remove these steps.

P.

--
Paul Lambert
Database Administrator
AutoLedgers

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mariano Mara 2007-05-08 03:06:58 Re: Anyone know a good opensource CRM that actually installs with Posgtres?
Previous Message Rich Shepard 2007-05-08 02:49:25 Re: Date Math