indexing - How does MySQL use ORDER BY when referencing an indexed prefix on VARCHAR? -
i'm curious how handled. have varchar(255)
column named title
has first 10 characters indexed.
if create mysql query orders title, take advantage of index solely, or ignore it, or have issue command use index?
for example let's have 2 title
items named:
this same thing same thing different
the first 10 chars same, how mysql handle that? use prefix index first 10 chars , row row index afterwards?
well, it's said that:
the index can used if order not match index exactly, long of unused portions of index , order columns constants in clause.
but suggest checking query explain, see path optimizer choose.
Comments
Post a Comment