March 9, 2010 at 10:01 pm
Why do we want to keep field datatypes as small as possible in SQL Server 2005?
Thanks
Kala
March 9, 2010 at 10:14 pm
Because even if you don't use complete space for particular data types it will allocate and reserve the maximum size, you will be wasting resources.
March 10, 2010 at 5:40 pm
GTR (3/9/2010)
Because even if you don't use complete space for particular data types it will allocate and reserve the maximum size, you will be wasting resources.
I don't believe that's true for variable character length datatypes.
--Jeff Moden
Change is inevitable... Change for the better is not.
March 11, 2010 at 12:27 am
kaladharreddy15 (3/9/2010)
Why do we want to keep field datatypes as small as possible in SQL Server 2005?
We do this in order to fit the maximum number of fields on a data/index page.
Dense data can be processed more efficiently.
August 5, 2010 at 1:08 am
but if we are using varchar datatype sql s. will reserve space as much required for actual value.Any say??
August 5, 2010 at 7:41 pm
Sanjay-940444 (8/5/2010)
but if we are using varchar datatype sql s. will reserve space as much required for actual value.Any say??
Yep... how many bytes does it take to store the number -2000000000 as a VARCHAR? As an INT?
How many bytes does it take to store 10 Jan 2010 15:30 as a VARCHAR. As a DATETIME?
And that's before we get into all of the other disadvantages.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply