What ?? There is a “Ghost” in SQL Server !!!
Yes, itβs a cleanup process available as a part of SQL Server Storage Engine. It runs in background to cleanup ghost records. If you can remember … “When we create a clustered index then it stores actual data/records at the leaf level of the index.” And SQL Server marks/declares a record as a ghost records when they are deleted from leaf level of index. Why just mark and not to delete at once even though SQL Server knows that user does not need that record anymore ?? Well, to achieve better performance SQL Server runs “Ghost Cleanup Task” asynchronously to … Continue reading →