Re: BUG #9552: IndexOnlyScan startup_cost>0, why not equal 0?it's a bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: digoal(at)126(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #9552: IndexOnlyScan startup_cost>0, why not equal 0?it's a bug?
Date: 2014-03-13 13:56:35
Message-ID: 14777.1394718995@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

digoal(at)126(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2014-03-13 14:05:05 Re: BUG #9553: why bitmap index scan startup_cost=0? it's a bug?
Previous Message Marko Tiikkaja 2014-03-13 13:55:44 Re: BUG #9557: Row not visible after receiving notification