码迷,mamicode.com
首页 > 其他好文 > 详细

delete rows from a heap

时间:2016-05-23 21:10:55      阅读:158      评论:0      收藏:0      [点我收藏+]

标签:

In additin to space on pages, not being reclaimed, empty pages in heaps frequently can not be reclaimed. Even if you delete all the rows from a heap, sql server does not mark the mepty pages as unallocated, so the space is not available for other objects to uses.

One way to avoid this problem is to request a table lock when the delete is being performed. If this problem has already occurred and you are showing more space belonging to a table than it really has, you can rebuild the table using the alter table rebuild command, or you can build as clustered index on the table to reorganize the space and the drop the index if desired.

delete rows from a heap

标签:

原文地址:http://www.cnblogs.com/ljhdo/p/4988092.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!