Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

xmltype as secure file with compress

user10447332May 8 2009 — edited May 8 2009
i am using 11g

CREATE TABLE EX_COMPRESS
( id NUMBER, xml_document XMLType
) XMLTYPE COLUMN xml_document STORE AS SECUREFILE BINARY XML(COMPRESS HIGH)




CREATE TABLE EX_NOCOMPRESS
( id NUMBER, xml_document XMLType
) XMLTYPE COLUMN xml_document STORE AS SECUREFILE BINARY XML(NOCOMPRESS)




SELECT segment_name, bytes
FROM user_segments
WHERE segment_name IN('EX_COMPRESS','EX_NOCOMPRESS')



BEGIN
FOR i IN 1 .. 1000 LOOP

INSERT INTO EX_COMPRESS
VALUES (I,
XMLType(bfilename('MYDIRECT', 'purchaseorder.xml'),
nls_charset_id('AL32UTF9')));


INSERT INTO EX_NOCOMPRESS
VALUES (I,
XMLType(bfilename('MYDIRECT', 'purchaseorder.xml'),
nls_charset_id('AL32UTF9')));
END LOOP;
COMMIT;


END;



SELECT segment_name, bytes
FROM user_segments
WHERE segment_name IN('EX_COMPRESS','EX_NOCOMPRESS')


o/p is

segment_name BYTES
........................
EX_COMPRESS 917504
EX_NOCOMPRESS 720896

in the o/p for compress no bytes for compress is more comapre to nocompress why it happend?

normally for compress no bytes less compare to nocompress
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 5 2009
Added on May 8 2009
4 comments
1,964 views