[英]Unused Space allocated to table in SQL server
I have a table in my Database which has unused space of about 55GB. 我的数据库中有一个表,其中有约55GB的未使用空间。 How do I reduce this unused space?
如何减少未使用的空间?
Steps that I have tried: 我尝试过的步骤:
Current output: 电流输出:
Desired Output: I want to reduce the Total space so that the Unused space is reduced. 所需的输出:我想减少总空间,以便减少未使用的空间。
Create a new table and then export the data to this new table. 创建一个新表,然后将数据导出到该新表。
SELECT * INTO newtable FROM table -- or copy wizard (by SSMS)
And then, drop the old table, but make you sure that the all data was transferred successfully. 然后,删除旧表,但要确保所有数据都已成功传输。
解:
ALTER INDEX ALL ON MyTable REBUILD WITH (FILLFACTOR = 100);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.