Explanation:
I need to do a lot of searches for 64 character Strings (varchar 64) in a MySQL database table. this might happen in a while/for loop of 1000 times each time (obv different strings each time):
Example:
// Every 2 hours:
for($i=1;$i<1000;$i++){...
SELECT id FROM table WHERE string1='$string1' AND string2='$string2'
string1 column is a
uniquevarchar(64) , and string2 is anot uniquevarchar(35)
This InnoDB table might have 1-10 million rows over time.
Questions:
Is it enough for performance to index the table (joint indexing string1 and string2 together)?
Is it better for MySQL search performance If I convert these varchar(64) strings to large integers based on their characters? (I was thinking Length will be larger ofcource, but it will be Integer and better for search)
If converting them is better which algorithm should I use to convert them so that
string1would remainUnique?Any better Ideas?