Hi all,

consider I want to compare one field stored in two tables (the field
being a key in both tables), like

SELECT table1.field FROM table1, table2 WHERE table1.field=table2.field

I have the choice (I'm developping the datamodel right now) to define
this field as an INT(6) or as an VARCHAR(6).

The question is: if I only store numerical values in this field, what
definition (INT or VARCHAR) will be the fastest in the query above? More
general: are INT-fields faster of slower in this kind of comparisons?

PS. The reason I'm considering VARCHAR is that it might be possible I
need to store characters in the field, in stead of only figures.



Thanks,
Maarten
The Netherlands
--------------------------------------------------------------
Zie ook/see also: http://www.knmi.nl/maildisclaimer.html 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to