Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
Ghost Records
24 posts, Page 1 of 3
1
2
3
»
»»
Ghost Records
Rate Topic
Display Mode
Topic Options
Author
Message
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Wednesday, June 01, 2011 8:04 PM
SSC-Dedicated
Group: Administrators
Last Login: Today @ 3:30 PM
Points: 31,436,
Visits: 13,751
Comments posted to this topic are about the item
Ghost Records
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #1118482
Peter Trast
Peter Trast
Posted Wednesday, June 01, 2011 8:05 PM
Mr or Mrs. 500
Group: General Forum Members
Last Login: Friday, March 15, 2013 10:35 AM
Points: 594,
Visits: 654
First to answer and got it right! Never heard of it but the right answer was perfectly logical.
Great question!
Peter Trast
Microsoft Certified ...(insert many literal strings here)
Microsoft Design Architect with Alexander Open Systems
Post #1118483
mohammed moinudheen
mohammed moinudheen
Posted Wednesday, June 01, 2011 10:49 PM
SSCrazy
Group: General Forum Members
Last Login: Today @ 7:43 PM
Points: 2,174,
Visits: 3,586
I remember reading about this in an article.
Mohammed Moinudheen
Post #1118504
khullargirish02
khullargirish02
Posted Thursday, June 02, 2011 12:43 AM
Old Hand
Group: General Forum Members
Last Login: Monday, February 18, 2013 10:54 PM
Points: 371,
Visits: 110
When rows are marked as deleted after a DML operation and the transaction is committed, the rows become Ghost records.
I got it right :)
Post #1118534
Kwex
Kwex
Posted Thursday, June 02, 2011 2:17 AM
SSC Veteran
Group: General Forum Members
Last Login: Friday, October 12, 2012 7:03 AM
Points: 249,
Visits: 224
Nice to know! DB2 behaves quite differently, because it just re-uses the page after records have been marked as deleted. It doesn't need an extra background process (ghost exorciser) to make a physical delete.
Not sure why SQL Server adopted this approach
Kwex.
Post #1118560
dave.clark
dave.clark
Posted Thursday, June 02, 2011 5:49 AM
SSC Rookie
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 2:51 PM
Points: 42,
Visits: 351
I believe it is done for performance reasons. Deleting data can occur faster and rollbacks would be faster. Then a process can later update clear up the ghost records.
Post #1118659
cfradenburg
cfradenburg
Posted Thursday, June 02, 2011 9:00 AM
SSCommitted
Group: General Forum Members
Last Login: Thursday, May 16, 2013 7:44 AM
Points: 1,559,
Visits: 1,925
As to why something goes through and cleans up the ghost records instead of just allowing the space get reused, that way the data doesn't remain on disk so it doesn't accidentally read by something. Or purposefully read by someone for that matter.
Post #1118808
GilaMonster
GilaMonster
Posted Thursday, June 02, 2011 9:14 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 4:11 PM
Points: 37,741,
Visits: 30,020
cfradenburg (6/2/2011)
As to why something goes through and cleans up the ghost records instead of just allowing the space get reused, that way the data doesn't remain on disk so it doesn't accidentally read by something. Or purposefully read by someone for that matter.
Ghost cleanup doesn't overwrite the ghosted rows. A direct read of the data file can see deleted data well after the ghosted rows are removed.
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #1118819
cfradenburg
cfradenburg
Posted Thursday, June 02, 2011 9:17 AM
SSCommitted
Group: General Forum Members
Last Login: Thursday, May 16, 2013 7:44 AM
Points: 1,559,
Visits: 1,925
Interesting. What does the ghost cleanup process do then?
Post #1118824
SQLRNNR
SQLRNNR
Posted Thursday, June 02, 2011 9:19 AM
SSCoach
Group: General Forum Members
Last Login: Today @ 10:25 AM
Points: 18,754,
Visits: 12,337
GilaMonster (6/2/2011)
cfradenburg (6/2/2011)
As to why something goes through and cleans up the ghost records instead of just allowing the space get reused, that way the data doesn't remain on disk so it doesn't accidentally read by something. Or purposefully read by someone for that matter.
Ghost cleanup doesn't overwrite the ghosted rows. A direct read of the data file can see deleted data well after the ghosted rows are removed.
Sounds like a fun experiment...
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1118825
« Prev Topic
|
Next Topic »
24 posts, Page 1 of 3
1
2
3
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.