Given CLOB not allowing the size of the table cut!

Hi Experts,

Environment: 11.2.0.3. on Solaris 10.

We have a table that contains the CLOB data and this table takes about 111 GB!

SQL > desc INFO_MESSAGES

Name                                      Null?    Type

----------------------------------------- -------- ----------------------------

CLNT_OID NOT NULL VARCHAR2 (16)

USR_OID NOT NULL VARCHAR2 (16)

LAST_client_msg_ID VARCHAR2 (36)

LAST_client_msg_DATE DATE

LAST_client_msg CLOB

LAST_USR_MSG_BOD_ID VARCHAR2 (36)

DATE OF LAST_USR_MSG_DATE

CLOB LAST_USR_MSG

Select * of dba_segments order by bytes DESC;

MIGRTN SYS_LOB0000111131C00008$ $ LOBSEGMENT SAMS DATA1 20690 6 1963 14528000 119013376000 <-the top row

This segment is to table INFO_MESSAGES. I confirmed by joining in ALL_LOBs.

This segment: SYS_LOB0000111131C00008$ $ belong to this column: LAST_USR_MSG

The column LAST_USR_MSG were originally from huge text data, each line having approximately 4 MB in size. To reclaim the space, we have put this column of small as "data truncated" data using an update statement for the half of the rows in the table.

as:

Update INFO_MESSAGES set LAST_USR_MSG = "data truncated" where rownum < 25001 (this where clause was based on other criteria on a real mission but he updated 25000 lines - half of the table).

Now after having done that, the size of the table has not changed!

The table is still 120 GB. So what should he do to recover the space here? Should we export, truncate, and import the table - or can it be reconstructed (without causing locks and allowing application to access it or there at - it other better options?)

Thank you

OrauserN

You must use dbms_redefintion, at the same time, change BASICFILE (have you been to) to SECUREFILE

The latter LOBs will reorganize automatically.

Demo at http://www.morganslibrary.org

-----------

Sybrand Bakker

Senior Oracle DBA

Tags: Database

Similar Questions

Maybe you are looking for