Re: Performance Anomalies in 7.4.5

From: "Gary Doades" <gpd(at)gpdnet(dot)co(dot)uk>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Performance Anomalies in 7.4.5
Date: 2004-10-21 22:21:35
Message-ID: 4178447F.961.6D7BBB5B@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 21 Oct 2004 at 15:50, Thomas F.O'Connell wrote:

> If not, should I be REINDEXing manually, as well as VACUUMing manually
> after large data imports (whether via COPY or INSERT)? Or will a VACUUM
> FULL ANALYZE be enough?
>

It's not the vacuuming that's important here, just the analyze. If you import any data into
a table, Postgres often does not *know* that until you gather the statistics on the table.
You are simply running into the problem of the planner not knowing how much
data/distribution of data in your tables.

If you have large imports it may be faster overall to drop the indexes first, then insert the
data, then put the indexes back on, then analyze.

Cheers,
Gary.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Joshua Marsh 2004-10-22 03:14:59 Large Database Performance suggestions
Previous Message Jim C. Nasby 2004-10-21 22:18:30 Re: Anything to be gained from a 'Postgres Filesystem'?