In MySQL, hash indices are only supported by the MEMORY
storage engine. By using this engine, data is stored in RAM, not on the hard disk, so it will be lost when MySQL is restarted.
Also, according to this link : hash index, it showed that hash indices are ineffective when data is stored on hard disk. But for practical usage for storing in RAM, Redis (other in-memory structures, .... ), may be a better choice than the MEMORY
engine with MySQL.
So which use cases are valid for MEMORY
storage engine and hash indices?