我尝试压缩吊球片段:
ALTER TABLE "MA_USER"."TEST_CLOB_COMPRESS3" MODIFY
LOB("RTDM_RESPONSE_XML") (
compress high
);
但是此查询报告“bytes”列具有相同的值:
select S.BYTES/1024/1024/1024,S.* from dba_segments S where segment_name in (select segment_name from dba_lobs where lower(TABLE_NAME) = 'test_clob_compress3');
我应该如何压缩吊球片以收回空间?
答案 0 :(得分:0)
试试这个 -
ALTER TABLE <table_name> MODIFY LOB (<lob_column>) (SHRINK SPACE);
答案 1 :(得分:0)
作为问题解决方案,您可以尝试对LOB列上的ALTER TABLE命令使用MOVE(即,不修改)子句,并指定压缩程度,例如:
ALTER TABLE table_name MOVE lob(lob_column_name) STORE AS SECUREFILE ( DISABLE storage in row TABLESPACE tablespace_name COMPRESS HIGH CACHE )
因为仅通过压缩修改LOB即可将其空间增加2倍:
alter table contracts_sec modify lob(orig_file) (compress HIGH)
答案 2 :(得分:0)
对于每个https://oracle-base.com/articles/misc/alter-table-shrink-space-online,缩小安全文件LOB段的正确解决方案如下:
ALTER TABLE TABLE_NAME MOVE LOB (LOB_COLUMN_NAME) STORE AS (NOCOMPRESS);
对于我来说,这确实有所帮助,与ALTER TABLE TABLE_NAME MODIFY LOB (LOB_COLUMN_NAME) (SHRINK SPACE CASCADE)
一样,后者没有回收可用空间。