Sql Server Interview question: Data deletion / Size reduction

Question: When you delete data from a table, is SQL Server reducing immediately the size of that table?

Answer:No, When data is deleted from any table, SQL Server does not reduce the size of the table right away.

It marks those pages as free pages, showing that they belong to the table. When new data is inserted, they are put into those free pages first.

Once those pages are filled up, SQL Server will allocate new pages. If you wait for some time, the background process de-allocates the pages, finally reducing the page size.

Thanks  for reading  this  article,

Next steps :

1.  Share this with your colleagues because Sharing  is Learning

        2. Comment below if you need any assistance

Powered by CodeReview – Let’s make it Better!