To be honest I don't think there is to be honest with you, as for the
comparison yeah different datatypes may have an impact in comparison but as
this is the same datatype that can have a fairly uge max I am not sure it
will have an impact.

But I could be wrong.



-----Original Message-----
From: Michael Dinowitz [mailto:[email protected]] 
Sent: Thursday, 6 May 2010 5:02 PM
To: sql
Subject: Re: Is there an optimal varchar size?


I have a messages table with each message sent to the lists. I have a
threads table with the subject of those messages with the one to many
link. Each subject is a varchar. I currently have the subject at a
length of 255 for the reason Maureen gave above.

The question goes to any performance difference between varchar(255),
varchar(300), varchar(400), etc. Is there some esoteric difference
between the sizes.

I remember reading an article recently about how one datatype (like
smalldatetime or tinyint) was less efficient than it's 'bigger'
brother (datetime or int). I should look for the article, but the
point is, under the hood there may be differences in how a varchar
field is indexed or searched based on its size.

I assume there is no real difference and it's just me going off on a
tangent again. :)

--
Michael Dinowitz




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3345
Subscription: http://www.houseoffusion.com/groups/sql/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/sql/unsubscribe.cfm

Reply via email to