From: Richard Huxton <dev@archonet.com>
To: Bill Moran <wmoran@potentialtech.com>
To: pgsql-performance@postgresql.org
Subject: Re: Relation of indices to ANALYZE
Date: Thu, 17 Jul 2003 17:14:06 +0100
Message-ID: <200307171714.06993.dev@archonet.com> (raw)
In-Reply-To: <3F16B68F.7060207@potentialtech.com>
References: <3F16B68F.7060207@potentialtech.com>
On Thursday 17 Jul 2003 3:45 pm, Bill Moran wrote:
> Hello all,
>
> I'm putting together a database that has me wondering about the interaction
> of ANALYZE with indices. I guess the basic question is: are indices
> affected by the results of ANALYZE.
>
> The particular application I've got is doing a batch insert of lots of
> records. For performance, I'm dropping the indexes on the table, doing the
> inserts, then recreating the indexes a then doing a VACUUM ANALYZE.
> Specifically, I'm wondering if I should do the ANALYZE before or after I
> recreate the indexes, or whether it matters.
I don't think it matters - the analyse looks at the data, and then when you
run a query the planner estimates how many rows each clause will require and
checks if there is an index that will help.
--
Richard Huxton
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: dev@archonet.com, wmoran@potentialtech.com
Subject: Re: Relation of indices to ANALYZE
In-Reply-To: <200307171714.06993.dev@archonet.com>
References: <3F16B68F.7060207@potentialtech.com> <200307171714.06993.dev@archonet.com>
* 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