Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Char columns wasting space in your database? 5

Status
Not open for further replies.

ESquared

Programmer
Dec 23, 2003
6,129
US
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.
 
Hey - star from me, too.

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.
 
A star for the info, Denis.

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.
 
>>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

Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQLBlog.com, Google Interview Questions
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top