Re: BUG #9552: IndexOnlyScan startup_cost>0, why not equal 0?it's a bug? - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #9552: IndexOnlyScan startup_cost>0, why not equal 0?it's a bug?
Date
Msg-id 14777.1394718995@sss.pgh.pa.us
Whole thread Raw
In response to BUG #9552: IndexOnlyScan startup_cost>0, why not equal 0?it's a bug?  (digoal@126.com)
List pgsql-bugs
digoal@126.com writes:
> I belive index only scan can return tuple direct, it's not need to scan
> heappage, why it's startup_cost equal to index scan?
> I'ts a bug?

No.  Your test case fails to vacuum t11, so although the planner selects
an index-only scan, it's still predicting that all the tuples will require
heap visits to confirm visibility.

The startup cost would not change in any case, since that's about index
descent costs not heap visit costs.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Marko Tiikkaja
Date:
Subject: Re: BUG #9557: Row not visible after receiving notification
Next
From: Tom Lane
Date:
Subject: Re: BUG #9553: why bitmap index scan startup_cost=0? it's a bug?