Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Worth recycling records in SQL Server
Message
 
 
À
12/08/2019 18:16:57
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
01670046
Message ID:
01670048
Vues:
53
>>> Does SQL Server recycle records on its own? Or do you think it is still worth recycling the records in the SQL Server table?
>
>Last time I checked: SQL Server initially marks a deleted record as de-allocated. Then a "Ghost cleanup" wakes every few seconds to check for resulting ghost records and free-up space. It limits itself to a few pages at a time to avoid swamping the system so if you delete (say) 10000 records the ghost records might be freed up over some seconds or minutes.
>
>Short answer is that usually there's not much to gain from rolling your own record recycling.
>
>Some people also advocate regularly Shrinking the database- but Shrink is NOT equivalent to Pack. Shrink can eliminate unused pages but won't free deleted record space if the page is still in use by other records. There's also argument re situations where Shrink is a bad idea- worth a quick internet search.

Thank you for your message.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform