2 is an integer
'2' is considered as string
if you compare a column of type varchar with an int mysql needs to do a type conversion for the compariosn to work
if you compare a column of type intwith an string mysql needs to do a type conversion for the compariosn to work
as type conversions cost time... i giuess you got it 🙂