Simple datatype performance Question....

ss7thirty

Well-known member
Joined
Jun 14, 2005
Messages
455
Location
New Jersey, US
Programming Experience
5-10
How much of a performance issue is it if you use VarChar(255) in every field rather than using integers for integers and varchar(10) for fields that will not be longer than 10, etc. Meaning if you only use that data-type how big of a deal is it performance-wise (i know that validation-wise it is not good) but how about speed of queries, etc?
 
It's not really possible to answer this question. Integer comparison will always be faster than string comparison. Shufling data into and out of strings to do things like integer math also, is slower. Exactly how much, is hard to say. I would certainly say dont do it, because to do anything useful you have to convert it back to its data type (like DateTime; storing those as a string is a very dumb idea)
 
Back
Top