Re: Vacuuming - Mailing list pgsql-general

From Paul Lambert
Subject Re: Vacuuming
Date
Msg-id 463FE76B.6030009@autoledgers.com.au
Whole thread Raw
In response to Re: Vacuuming  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Vacuuming
List 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


pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Re: Date Math
Next
From: Mariano Mara
Date:
Subject: Re: Anyone know a good opensource CRM that actually installs with Posgtres?