Re: SQL/XML functions slow down queries?
Date: Wed, 3 Sep 2008 11:51:30 -0700 (PDT)
xmltype is a clob, so it is very expensive (direct writes) to create a large table of xmltype.
If you can live with a single xml document, then this will be less expensive.
xmlelement("XML",xmlagg(xmlElement("ROW",xmlForest(col1,col2)))) into x, l_xml
from bigtable order by col1,col2;
dbms_output.put_line('count=>'|| x) ;
PL/SQL procedure successfully completed. Elapsed: 00:01:15.66 Received on Wed Sep 03 2008 - 13:51:30 CDT