Re: Estimates on partial index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Victor Yegorov <vyegorov(at)gmail(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Estimates on partial index
Date: 2016-08-18 13:56:10
Message-ID: 766.1471528570@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Victor Yegorov <vyegorov(at)gmail(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff Janes 2016-08-18 15:59:27 Re: Estimates on partial index
Previous Message Victor Yegorov 2016-08-18 13:52:11 Estimates on partial index