• As far as I understand it, there is something missing from the explanation. If we assume that only what's written in the scenario has happened, the scenario is as follows:

    * Table is created

    * Records are inserted

    * Records are deleted -> Marked as ghost

    * Ghost Cleanup Task is running (every 5 seconds).

    But, there has not been any scan between the marking of ghost records and Ghost Cleanup Task, hence it has nothing to do.

    The ghost cleanup task doesn't just start up when it's told to – it starts up in the background every 5 seconds and looks for ghost records to cleanup. Remember that it won't be told to go cleanup a specific page by a delete operation – it's a subsequent scan that does it, if a scan happens.

    http://www.sqlskills.com/blogs/paul/inside-the-storage-engine-ghost-cleanup-in-depth/[/url]



    Ole Kristian Velstadbråten Bangås - Virinco - Facebook - Twitter

    Concatenating Row Values in Transact-SQL[/url]