Re: Questions on 7.2.1 query plan choices - Mailing list pgsql-general

From Curt Sampson
Subject Re: Questions on 7.2.1 query plan choices
Date
Msg-id Pine.NEB.4.43.0204181548060.457-100000@angelic.cynic.net
Whole thread Raw
In response to Re: Questions on 7.2.1 query plan choices  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Thu, 18 Apr 2002, Tom Lane wrote:

> Curt Sampson's nearby remarks about partial indexes are not a bad
> suggestion.

I just tried this out, and the disk space savings alone were pretty
stunning.  On a 300,000 row table with about 1750 TRUE values and
the rest FALSE, the full index was over 5 MB and the partial was
less than 50K.

But it turns out that the analyzer's stats were good enough that
it made little difference to performance. Once I analyzed the table,
even with the full index postgres figured out that the index scan
(estimating 1300 values, in this case) would be faster.

So I guess it's key correlation thing that did it, or perhaps he
just had not analzyed the table.

cjs
--
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org
    Don't you know, in this new Dark Age, we're all light.  --XTC


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Questions on 7.2.1 query plan choices
Next
From: Lee Kindness
Date:
Subject: determining database size