From Mysql documentation it is clearly said that Hash indexes are used
only for equality comparisons that use the = or <=> operators.
I have a small test table:
`CREATE TABLE `test` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` char(20) DEFAULT NULL, PRIMARY KEY (`id`), KEY `name` (`name`) USING HASH ) ENGINE=InnoDB DEFAULT CHARSET=latin1;`
explain select * from test where test.name like 'sun%'
And it shows that it uses index:
explain extended select * from test where test.name like 'sun%'
But it can not be according to documantion. Mysql version: 5.6.32-78.0.