I have a SQL Server table with 39 million rows. I changed the data type of existing columns as follows:
-
Col A -> tinyint -> bit
-
Col B -> tinyint -> bit
-
Col C -> tinyint -> bit
-
Col D -> tinyint -> bit
-
Col E -> tinyint -> bit
-
Col F -> smallint -> tinyint
-
Col G -> smallint -> tinyint
The table size was supposed to have shrunk, however, the size increased from 11gb to 18gb.
I tried the following:
- Rebuild all indexes
- DBCC SHRINKDATABASE ('DBName')
however it did not work.
Any idea where to look for the problem?
Best Answer
If it's me, I may try the following steps