Re: Questions on 7.2.1 query plan choices

From: Ed Loehr <pggeneral(at)bluepolka(dot)net>
To: Curt Sampson <cjs(at)cynic(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Ed Loehr <pggeneral(at)bluepolka(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Questions on 7.2.1 query plan choices
Date: 2002-04-18 18:05:55
Message-ID: 3CBF0B03.4090002@bluepolka.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Curt Sampson 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.

Interesting. I analyzed immediately prior to running explain and the
queries, so that is not the source. It is repeatable.

Ed

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vaclav Kulakovsky 2002-04-18 18:23:49 How to find backend which blocking ?
Previous Message Ed Loehr 2002-04-18 18:02:18 [GENERAL/OFF-TOPIC]: identifying runaway DB clients