Forum Discussion
dearjitu
Sep 02, 2021Copper Contributor
Shrink a Table
Is it possible to shrink or compress the table after deleting some of records. If yes, could some one provide the suitable query or procedure to shrink the table. Which is the best practice, to shri...
dearjitu
Sep 02, 2021Copper Contributor
The main intention is, I want to save some memory after deleting records of a table. So I need method and procedure to save memory after deleting records from table.
olafhelper
Sep 03, 2021Bronze Contributor
to save memory after deleting records from table.
dearjitu , the used space on disk has not really an effect on the memory (RAM) for the buffer pool.
If you want to reduce the (un)used space on disk, then you can shrink the database (files) with
DBCC SHRINKDATABASE (Transact-SQL) - SQL Server | Microsoft Docs
Olaf