bitmap conversion in explain plan [message #295876] |
Wed, 23 January 2008 15:51 |
agemaia
Messages: 11 Registered: January 2008
|
Junior Member |
|
|
hi friends,
I'm trying to understand the explain plan with queries in my oracle 9.2 database. I have read something about but it is difficult to me to understand why the optimizer uses "bitmap conversion [to rowids]", "bitmap and" and "bitmap conversion [from rowids]". I'm not sure if this is a good or a bad signal. Probably is just I always find bitmap conversion when I'm not happy with queries results timin.
I have not bitmap indexes created in my database, and perhaps is it suggesting me to create them?
Thanks for answers.
|
|
|
|
Re: bitmap conversion in explain plan [message #295897 is a reply to message #295894] |
Wed, 23 January 2008 20:35 |
rleishman
Messages: 3728 Registered: October 2005 Location: Melbourne, Australia
|
Senior Member |
|
|
It's not necessarily a bug - it might be a good plan.
The example Michel shows includes an OR statement. If the two alternates in the OR both have good access paths, then it can be efficient to find the matching rows in two passes of the data.
One way of doing that is to effectively rewrite the OR as a UNION. Oracle is able to do this internally. Michel's second example demonstrates this.
Another way to do it is with bitmaps. Oracle retrieves a preliminary result set of rows from each access-path (either side of the OR), converts the results to bit-strings (ie. a bitmap) then performs a bitwise OR of the results. This give a single resultant bit-string that Oracle then reverse-engineers into a list of ROWIDs in order to lookup the resultant rows in the table.
This bitmap conversion is just an efficient alternative to UNION for query optimisation. It in no way implies that a bitmap index would be useful on the table.
Ross Leishman
|
|
|