Unix Technical Forum

bitmap scan and explain analyze

This is a discussion on bitmap scan and explain analyze within the pgsql Hackers forums, part of the PostgreSQL category; --> 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 ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 04:41 AM
Tatsuo Ishii
 
Posts: n/a
Default bitmap scan and explain analyze

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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 04:41 AM
Tom Lane
 
Posts: n/a
Default 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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-11-2008, 04:44 AM
Tatsuo Ishii
 
Posts: n/a
Default 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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-11-2008, 04:44 AM
Tom Lane
 
Posts: n/a
Default 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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-11-2008, 04:44 AM
Tatsuo Ishii
 
Posts: n/a
Default 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

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:59 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com