If you want to know how much space is being wasted in a database by using char instead of varchar (or nchar instead of nvarchar), I wrote a full stored procedure for you to do just that which you can get at SQL Waste Land.
Star for all the effort. In SQL server 2008 with rowlevel and page compression this won't really matter since when you turn it on it will treat char as varchar and also compress values
In reference to Denis' comment, my employer, an extremely large financial institution, may get around to installing 2008 sometime in 2018 (but they swear we'll have everything moved over to 2005 by 1/1/2009!), so I can see this of being useful for a while.
Thanks again, E^2!
< M!ke >
[small]Where are we going and why am I in this handbasket?[/small]
Word, Mike. Mine may do so in 2028. (BTW you were absolutely right about the Dilbert manual reference vis a vis "financial institutions". Holy sh*t.)
Phil H.
-----------
A virtual machine ate my accounting data. I transferred it to a physical box, then I beat it to smithereens with a sledgehammer. I feel better.
Alex told me about that compression, which sounds interesting. I'm imagining there is a benefit in terms of disk space and cost, but I'm wondering if the biggest benefit is getting more rows in each page, improving I/O at the expense of a little CPU.
with 8 CPU's it makes sense to take that hit. I am a technical reviewer for a 2008 book so I am under NDA but for some tables there is a lot of improvement. A lot depends on the data in the table itself
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.