从表中删除数据后,Oracle的可用空间 [英] Oracle free space after deleting data from tables

查看:154
本文介绍了从表中删除数据后,Oracle的可用空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近从数据库中的某些表中删除了大量数据.现在,我希望释放该数据所占用的空间.之后,我想重建索引. 释放空间的最佳方法是什么?

I recently deleted a big chunk of data from some tables in the database. Now I wish to free up the space that was being held by that data. After that I would like to rebuild indexes. What is the best way to free up the space?

推荐答案

释放空间"是什么意思?删除数据时,块中的空间已释放.现在,该空间可用于从中删除数据的表中的后续插入(或更新).这通常就足够了,因为该表通常会在将来再次增长.

What do you mean by "free up the space"? When you deleted the data, space was freed up in the blocks. That space is now available for subsequent inserts (or updates) in the table you deleted data from. That's normally sufficient because the table will normally grow again in the future.

如果要减小表段的大小并使该空间可用于同一表空间中的其他段,则可以收缩表

You could shrink the table if you want to decrease the size of the table segment and make the space available to other segments in the same tablespace

ALTER TABLE table_name ENABLE ROW MOVEMENT;

ALTER TABLE table_name SHRINK SPACE CASCADE;

通常不需要重建索引.

这篇关于从表中删除数据后,Oracle的可用空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆