Do extra spaces affect disk space size?

413725 pts.
Tags:
SQL Server database
Storage
I currently have over 147 columns in a SQL Server database (with the majority of them as VARCHAR). This data is imported from our agency and for extra fields, they all include spaces in the field instead of entering an empty string / NULL. I just ran a script that would covert all those columns to NULL but my table storage size remained the same. Don't the spaces take up a ton of disk space? Why didn't I get added space?

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000

    Most database systems will compress large sections on blanks to save disk space. For example if you have a part master file with a 100 char description, you may never use the full 100. If it kept the full space with blanks you would run out of disk very fast. You can tell by the test you ran.

    49,595 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: