A numeric value will be faster in most cases. The reason being that a
comparison between two numbers at most takes 1 comparison... but a
comparison for a char at most takes n comparisons (n being the length of the
field/string). In addition a numeric value would take less space... all
around its a good deal faster.

ryan

----- Original Message -----
From: "Goran Krajacic" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 07, 2001 9:33 AM
Subject: Speed (char or integer)


I have a table with (char)Username attribute which is the primary key of the
table and also acts as a  foreign key in many other tables.

My question is if the queries would be faster if i used a numeric value for
the primary key?



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to