bitmap scan and explain analyze

Started by Tatsuo Ishiiover 20 years ago5 messages
#1Tatsuo Ishii
t-ishii@sra.co.jp

I noticed that explain analyze emits a little bit funny reslut for
bitmap scans:

BitmapOr (cost=157.36..157.36 rows=18894 width=0) (actual time=9.406..9.406 rows=0 loops=1)

Why actual rows=0?
--
Tatsuo Ishii

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Tatsuo Ishii (#1)
Re: bitmap scan and explain analyze

Tatsuo Ishii <t-ishii@sra.co.jp> writes:

Why actual rows=0?

I couldn't think of any reasonably cheap way to count the actual rows
(especially in the presence of lossy bitmaps), so I just punted.

regards, tom lane

#3Tatsuo Ishii
t-ishii@sra.co.jp
In reply to: Tom Lane (#2)
Re: bitmap scan and explain analyze

Why actual rows=0?

I couldn't think of any reasonably cheap way to count the actual rows
(especially in the presence of lossy bitmaps), so I just punted.

I see.

BTW is it possible to let BitmapHeapScan fetch tuples by TID order? It
would make heap acccess in sequential manner and would boost disk
access performance.
--
Tatsuo Ishii

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Tatsuo Ishii (#3)
Re: bitmap scan and explain analyze

Tatsuo Ishii <t-ishii@sra.co.jp> writes:

BTW is it possible to let BitmapHeapScan fetch tuples by TID order?

It already does ...

regards, tom lane

#5Tatsuo Ishii
t-ishii@sra.co.jp
In reply to: Tom Lane (#4)
Re: bitmap scan and explain analyze

BTW is it possible to let BitmapHeapScan fetch tuples by TID order?

It already does ...

Oh great. It seems tbm_begin_iterate() does the trick...
--
Tatsuo Ishii