datatypes and speed

admin

Administrator
Staff member
Hi,

I'm trying to decide between the (var)char and int datatypes for a primary key column. I'll be referencing this column often for table joins and such. I've heard that MySQL can reference integers faster than strings, however I'm still leaning towards using the char datatype because it will allow me to eliminate the need for a few table joins later on.

Is there a compelling reason why I should use an int datatype for the primary key instead?

Thanks,

setic
 
Back
Top