Home > database >  Columns of composite index in front of fuzzy query shows key_len length problem
Columns of composite index in front of fuzzy query shows key_len length problem

Time:10-22

Field ` 2 ` int (11)
Field ` 4 ` char (255)
Field ` ` 2 and 4 ` ` composite index, composite index total length key_len=773,
(1) ` 2 ` in front, and 2 ` ` fuzzy query, ley_len=5, not the total length,
(2) the ` 4 ` ahead, 4 ` ` fuzzy query, ley_len=773, is the total length, rather than the field 4 indexes of length 768,
Behind the second case, the fuzzy query result in a composite index of the column index fails, but according to the total length of,

  • Related