MSSQL: There is a daily partitioned table which was 2 GB and we needed to compress this table by page compression. After compression, the table size got smaller if I check from the table properties – storage. But the disk space didn't change a bit after this compression. I need to gain some space on the disc and wonder if shrinking any kind (file, database) would help.
I would like to hear your advises.
Thanks
Best Answer
In order to reclaim disk space, you would have to use
SHRINKFILE
. The usual caveats about incurred data fragmentation and the need to rebuild indexes to resolve that fragmentation apply.Here is a sample query to determine which partitions are on which filegroups. (Borrowed from Determining Filegroup for a Table)