Re: Performance Anomalies in 7.4.5 - Mailing list pgsql-performance

From Gary Doades
Subject Re: Performance Anomalies in 7.4.5
Date
Msg-id 4178447F.961.6D7BBB5B@localhost
Whole thread Raw
In response to Re: Performance Anomalies in 7.4.5  (Thomas F.O'Connell <tfo@sitening.com>)
List 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.


pgsql-performance by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Anything to be gained from a 'Postgres Filesystem'?
Next
From: Joshua Marsh
Date:
Subject: Large Database Performance suggestions