I'm using SQL Server 2012 with all the latest updates. For a DB I'm using, I altered an existing table with a lot of data in it to add an addition column, type INT, with a default value of -1. That made the storage requirement for the DB on the disk
a bit larger, but not much. I then UPDATEd the values in the new column from -1 to other numbers ranging from 0 to over 500,000, and this added several 10s of GB of storage requied for the DB on the disk. I'm baffled by this--wouldn't the full space for
an INT column be allocated on the disk when the column is added to the table and not when the value of the data is changed?
↧