Numeric keys in MySQL are much faster than string keys. You need to make decimal numbers from any hash.
On the stack I found a solution like this:
Are there more elegant methods for obtaining decimal hash?
PS more elegant methods of maintaining the database so far do not need to offer. The first line is given only for orientation, for example, in length, or so that no objection arises that a hexadecimal number is also a number.