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