Forum Discussion
riyanto
Mar 14, 2025Copper Contributor
SQL Server does not reduce the size of MDF and LDF
I am a SQL Server 2017 user, I deleted a table that had too many records, but after the delete process, the size of the MDF and LDF files did not decrease, but increased. I have shrunk the file but t...
olafhelper
Mar 17, 2025Bronze Contributor
the size of the MDF and LDF files did not decrease,
Of course not, SQL Server never decrease the file size on it's own, it's an expensive IO operation.
Run a DBCC SHRINKFILE (Transact-SQL) - SQL Server | Microsoft Learn