Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: what does "index map: N" mean?

From: Baron Schwartz <baron(at)xaprb.com>
Date: Mon Sep 03 2007 - 16:55:56 EDT


Hartmut Holzgraefe wrote:
> Michael Widenius wrote:

>> Hartmut, what information are you missing ?
>>
>> The above is as quite good way to describe it without going to pseudo 
>> code.
>>
>> The only things I can see that could be added are:
>>
>> - Indexes are numbered from 1 uppwards, in the same order as given
>>   by SHOW CREATE TABLE or SHOW INDEX
>>
>> - The index map is a bitmap that shows which index we will use for
>>   checking if we can use an index to retrieve the rows with either the
>>   range or index_merge methods.  Ie, the value 5 (= 1 + 4 ) would
>>   tell you that mysqld will try to use index 1 and 3 for this.

>
> that is exactly what was missing: the explanation of "N"
> in the "(index map: N)" part ... which lead to all the
> guessing (both right and wrong) in this thread ...
>

Now I'm MORE confused. Is this a typo? My interpretation of the value 5 is indexes one and four are used, not one and three. From http://dev.mysql.com/sources/doxygen/mysql-5.1/sql__select_8cc-source.html:

14452           {
14453             char buf[MAX_KEY/8+1];
14454             extra.append(STRING_WITH_LEN("; Range checked for each "
14455                                          "record (index map: 0x"));
14456             extra.append(tab->keys.print(buf));
14457             extra.append(')');
14458           }

tab->keys seems to be a Bitmap< 64 >, if the Doxygen-ized source is linked right.

I also think the index map might be redundant to possible_keys. I haven't found a case where they differ, though they don't seem to come from the same code. Can anyone confirm whether this is true? Perhaps the index map is a subset (but not a proper subset) of possible_keys?

Thanks
Baron

PS I'm not sure this is 'urgent' for Monty -- it's not urgent for me -- but I appreciate everyone's time very much.

-- 
MySQL Internals Mailing List
For list archives: 
http://lists.mysql.com/internals
To unsubscribe:    
http://lists.mysql.com/internals?unsub=lists@pantek.com
Received on Mon Sep 3 16:56:15 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 07:59:18 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library