ORACLE solves the problem of high water mark
-- method one.
ALTER TABLE table_name MOVE;-- rebuilding the table
ANALYZE TABLE table_name COMPUTE STATISTICS;-- Statistical analysis
-- method two.
ALTER TABLE table_name ENABLE ROW MOVEMENT;-- Activation Line Migration
ALTER TABLE table_name SHRINK SPACE;-- activation table contraction
ANALYZE TABLE table_name COMPUTE STATISTICS;-- Statistical analysis
Disadvantages: if it is a partition table, after activation, the table data will update the disk physical location (ROWID) because of the update partition field.
Method 3:
CREATE TABLE table_name_1 AS SELECT * FROM table_name
TRUNCATE TABLE table_name
INSERT INTO table_name SELECT * FROM table_name_1
Disadvantages: troublesome, time-consuming
Method 4:
Create a new temporary table, copy the data to the temporary table, drop the source table, and rename the temporary table to the name of the source table.
Malpractice, primary key. Indexes and other objects that depend on this table need to be rebuilt.
Check method:
Through the analysis of the table block before and after the deletion of data occupation changes.
SELECT num_rows, blocks, empty_blocks FROM dba_tables WHERE owner='SDBMGR' AND table_name = 'TABLE_NAME'