List:Internals« Previous MessageNext Message »
From:Baron Schwartz Date:September 5 2007 1:49pm
Subject:Re: what does "index map: N" mean?
View as plain text  
Whoops.  I made a classic (for me) mistake with bitmaps... see below. 
Sorry for all the confusion :-(

Baron Schwartz wrote:
> 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.

5     base 10
0101  base 2
4321  position of bits
_3_1  indexes used

*sheepish grin*

I got the math right in the visual explain tool, but I couldn't 
duplicate that feat in this email thread.

Thanks
Baron
Thread
what does "index map: N" mean?Baron Schwartz29 Aug
  • Re: what does "index map: N" mean?Chad MILLER29 Aug
  • Re: what does "index map: N" mean?Sergey Petrunia29 Aug
    • Re: what does "index map: N" mean?Baron Schwartz29 Aug
      • Re: what does "index map: N" mean?Jay Pipes29 Aug
        • Re: what does "index map: N" mean?Baron Schwartz30 Aug
          • Re: what does "index map: N" mean?Hartmut Holzgraefe30 Aug
            • Re: what does "index map: N" mean?Paul DuBois30 Aug
Re: what does "index map: N" mean?Hartmut Holzgraefe3 Sep
  • Re: what does "index map: N" mean?Baron Schwartz3 Sep
    • Re: what does "index map: N" mean?Baron Schwartz5 Sep