Re: Estimates on partial index - Mailing list pgsql-performance

From Tom Lane
Subject Re: Estimates on partial index
Date
Msg-id 766.1471528570@sss.pgh.pa.us
Whole thread Raw
In response to Estimates on partial index  (Victor Yegorov <vyegorov@gmail.com>)
Responses Re: Estimates on partial index
List pgsql-performance
Victor Yegorov <vyegorov@gmail.com> writes:
> Settings:
>     random_page_cost     2.5      ¤
>     seq_page_cost        1        ¤

> Question is — why IndexScan over partial index is estimated less than
> BitmapHeap + BitmapIndex scan. And how can I tell Planner, that IndexScan
> over 1/3 of table is not a good thing — IndexScan is touching 10x more
> pages and in a typical situation those are cold.

In that case you've got random_page_cost too far down.  Values less than
the default of 4 are generally only appropriate if the bulk of your
database stays in RAM.

            regards, tom lane


pgsql-performance by date:

Previous
From: Victor Yegorov
Date:
Subject: Estimates on partial index
Next
From: Jeff Janes
Date:
Subject: Re: Estimates on partial index