January 14, 2013 at 9:41 pm
Comments posted to this topic are about the item Ghost Cleanup
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
January 14, 2013 at 10:04 pm
Thanks Wayne. Got to learn something new today 🙂
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
January 14, 2013 at 10:18 pm
I got it right for wrong reasons ;
Learned something.. thanks for the question..
~ demonfox
___________________________________________________________________
Wondering what I would do next , when I am done with this one :ermm:
January 14, 2013 at 11:13 pm
Thanks Wayne
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
January 15, 2013 at 12:10 am
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]
January 15, 2013 at 12:35 am
Great question Wayne, thanks. Definately learned something.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
January 15, 2013 at 12:49 am
Good question Wayne - thanks
-------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
I would never join a club that would allow me as a member - Groucho Marx
January 15, 2013 at 1:33 am
Interesting!
Thanks!
🙂
January 15, 2013 at 2:45 am
Great question. I needed to know. Lost a point but worth the knowledge.
January 15, 2013 at 2:55 am
Nice question, thanks.
January 15, 2013 at 5:21 am
This was removed by the editor as SPAM
January 15, 2013 at 6:06 am
okbangas (1/15/2013)
But, there has not been any scan between the marking of ghost records and Ghost Cleanup Task, hence it has nothing to do.
I think that's a scan that's carried out by the ghost cleanup task itself, not a random scan that's done as part of a SELECT statement. May be wrong on that, but that's how I read it!
January 15, 2013 at 6:52 am
Good question Wayne. Thanks!
January 15, 2013 at 7:06 am
paul.knibbs (1/15/2013)
okbangas (1/15/2013)
But, there has not been any scan between the marking of ghost records and Ghost Cleanup Task, hence it has nothing to do.
I think that's a scan that's carried out by the ghost cleanup task itself, not a random scan that's done as part of a SELECT statement. May be wrong on that, but that's how I read it!
+1
Great question Wayne, thanks.
_____________________________________________________________________
[font="Comic Sans MS"]"The difficult tasks we do immediately, the impossible takes a little longer"[/font]
January 15, 2013 at 7:53 am
okbangas (1/15/2013)
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.
I agree with you that in this scenario the scan was not done, so nothing was done, but that is not relevant for the explanation: the page will never be completely deleted by the Ghost Cleanup Task, even if it would have been scanned before. As far as I can see that was the important lesson to be learned here.
Viewing 15 posts - 1 through 15 (of 30 total)
You must be logged in to reply to this topic. Login to reply