I've got a database field which stores customer usernames, which I limit to a maximum of 50 characters. At present I'm using a TINYTEXT field to store them, but this morning decided to switch to VARCHAR(50), because I thought it would speed things up.
Now, I carried out a very rough speed test to see whether I'd got any improvement. What I did was go into PHPMyAdmin, go to my table and click on 'Browse' and made a note of how long it took to load the table's data. I did this 5 times and took a simple average.
Now, when my data was stored as TINYTEXT I got an average time of 0.54ms but when I changed it to VARCHAR it went up to 1.32ms - more than double.
Can anyone explain what's going on and which data type I should use?