Compact blob Oracle data, compacting tables with BLOB objects

BLOBs tables with different tablespaces in the remainder of the table, have a somewhat different treatment.

We will prepare a test environment:

We create two tablespaces with:

Source   
CREATE SMALLFILE TABLESPACE "TS_PFIRMA_DATOS" LOGGING DATAFILE  '/u01/app/oracle/oradata/PRUEBA/TS_PFIRMA_DATOS.dbf' SIZE 10M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
CREATE SMALLFILE TABLESPACE "TS_PFIRMA_BLOB" LOGGING DATAFILE '/u01/app/oracle/oradata/PRUEBA/TS_PFIRMA_BLOB.dbf' SIZE 10M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

Continue reading

Oracle compact table

Surely more than once have deleted records from a table in large quantities, perhaps millions. Once this is done it expected would be a reduction of the space used in the tablespaces, but it does not. Extensions but remain free to use the given table, can not use another table.

After the removal of millions of records, you must compact the table to return to tablespace free space once done we can even reduce the size of the datafiles without meeting the limitation imposed by the HIGH WATER MARK (maximum size reached by the objects within a datafile).

Suppose the table:

Continue reading