Forum Stats

  • 3,851,380 Users
  • 2,263,969 Discussions
  • 7,904,691 Comments

Discussions

SecureFiles

773821
773821 Member Posts: 87
edited May 17, 2011 6:41AM in Advanced Compression
Hello

Can I enable the compression option on a securefiles, after that I had import the data? Thanks

roger

Answers

  • GokhanAtil
    GokhanAtil Member Posts: 1,305
    I haven't tested but I think you should be able to do it:

    ALTER TABLE sample_table MOVE LOB (CLOB_DATA) STORE AS SECUREFILE compressed_lob (COMPRESS HIGH );
  • Pavel.Ruzicka
    Pavel.Ruzicka Member Posts: 12 Blue Ribbon
    The other option could be to use online redefinition (DBMS_REDEFINITION.START_REDEF_TABLE -> DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS -> DBMS_REDEFINITION.FINISH_REDEF_TABLE)

    We have recently tested AC on some CLOBs with XML data and the compression ratios were really interesing.
    SEGMENT_NAME BYTES SEGMENT_SU
    ---------------------------------------- ---------- ----------
    SYS_LOB0000015428C00007$$ 3236954112 ASSM => size before compression; column MESSAGE_CONTENT
    SYS_LOB0000015428C00021$$ 1140850688 ASSM => size before compression; column APPLICATION_CONTEXT
    SYS_LOB0000015433C00007$$ 10485760 SECUREFILE => size after compression; column MESSAGE_CONTENT
    SYS_LOB0000015433C00021$$ 131072 SECUREFILE => size after compression; column APPLICATION_CONTEXT

    Surprisingly, the ALTER TABLE MOVE vs DBMS_REDEFINITION approach showed slightly different compression ratios.

    Regards,
    Pavel
This discussion has been closed.