The Integer index is faster than the varchar index, because an integer takes up less space in the database than varchar. Therefore, it is much faster to find an integer than to find a varchar string, because caching an integer index requires less memory. The smaller the data type, the more records can fit into index blocks. The more records that fit into each index block, the fewer records are required to search for records.
source share