Hello,
> Bitmap index scan need sort the indexenrty by heap_page_id
> first, then out put the sorted heappageid to next node, but why
> bitmap index scan node's startup_cost=0?
I don't understand what you mean by 'heap_page_id sort' but it is
also not a bug.
The bitmap index scan is a mere part of bitmap heap scan and the
startup costs of the underlying bitmap index scans are not needed
to estimate the cost of the whole index heap scan.
Additionally, total cost of index scan doesn't include final
startup cost (which includes disable_cost) perhaps intentionally
to avoid enable_indexscan = false from affecting bitmap index
scans. As the result, the bare startup cost calculated
amcostestimate is not stored anywhere. The startup costs shows up
in the bitmap index scans are actually incorrect precisely but
does no harm.
# Correct?
regards,
--
Kyotaro Horiguchi
NTT Open Source Software Center