From: Gary Doades <gpd@gpdnet.co.uk>
To: pgsql-performance@postgresql.org
Subject: Re: Performance Anomalies in 7.4.5
Date: Thu, 21 Oct 2004 23:21:35 +0100
Message-ID: <4178447F.961.6D7BBB5B@localhost> (raw)
In-Reply-To: <D25853EB-23A2-11D9-8068-000D93AE0944@sitening.com>
References: <D307B888-23A0-11D9-8068-000D93AE0944@sitening.com>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: gpd@gpdnet.co.uk
Subject: Re: Performance Anomalies in 7.4.5
In-Reply-To: <4178447F.961.6D7BBB5B@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox