Hello,
Recently we've application update and after it our DB grown to over 600 Gb, and inside DB there is over 200Gb of free space.
I've tried to reclaim some space and I ran shrink DB process in small chunks (several times I've tried to release 1Mb up to 10Mb ) but I've noticed that this process is taking a lot of time. To eliminate any external (application) interference I've also switched DB to "single mode" and even when I was only single user on DB I was unable to free up disk space).
For your reference I've ran shrink process of 1Mb, and I have waited several hours till process ended.During this process I've checked in Sql the status of my query (looked for DbccFilesCompact process) and this was in "suspended" state withPAGEIOLATCH_SH wait_type.
The system wasn't heavily loaded (no locks, high cpu,ram,IO).
So I wondered if shrink process is taking so much time, if this could be somehow connected with heavily fragmented indexes in DB ? There are many (over 100) tables where fragmentation exceeded 99% and many more where pragmentation is over 30%
P.s I know that I should avoid shrink process as much as I can because it will heavily fragment my table indexes but still this will be one time action and after it I will reorganize/rebuild indexes.
Thanks!
Mac