DROP TABLE TEST_XML;
CREATE TABLE TEST_XML (ID INTEGER, MYXML XMLTYPE);
INSERT INTO TEST_XML SELECT ROWNUM,XMLTYPE('
DATA'||ROWNUM||'
COMMIT;
SELECT ID,T.MYXML FROM TEST_XML T; -- STATEMENT 1
SELECT ID,T.MYXML.GETCLOBVAL() FROM TEST_XML T; -- STATEMENT 2
SELECT ID,T.MYXML.GETSTRINGVAL() FROM TEST_XML T; -- STATEMENT 3
Conclusion: STATEMENT 3 is approx 10 times faster than others.
So Use XMLTYPE instead of CLOB now
No comments:
Post a Comment