This content has been marked as final. Show 3 replies
DBMS_XMLPARSER and DBMS_XMLDOM are from at least the 8i days (back then called XMLParse and XMLDOM). XMLType and all the other features we now know did not start appearing until 22.214.171.124. DOM loads the entire XML document into memory before parsing and the newer features can avoid this by streaming the XML when parsing it. This prevents the entire XML content from being loaded into memory at once. This is the general direction Oracle has been going for some time now and so their performance/improvement efforts have been in those newer areas.1 person found this helpful
Depending upon your version, if it is >= 10.2, you would want to use XMLTable or XMLQuery to retrieve data from the XML.
So in other words, ignore the DBMS_XMLPARSER and DBMS_XMLDOM functionality for now and use the newer functionality Oracle provides.
Note: This is only the observation of an outsider as I do not work for Oracle nor speak for them.
Thanks for giving clear picture on the same with version details also.
DOM loads the entire XML document into memory before parsing and the newer features can avoid this by streaming the XML when parsing it+
Could you please explain this sentence +"specially streaming the xml means"+ as this will help us to get more idea on this.
Edited by: vikram (959352) on 18-Dec-2012 21:46
Where I was thinking with that sentence is the "streaming evaluation" that Oracle now offers. This option is available when XML is stored in an XMLType column of SECUREFILE BINARY format (introduced in 126.96.36.199 and default for XMLType columns in 188.8.131.52) and that data is queried/accessed.
You can find some information on it here
(Search for "streaming")
and here as well
Streaming is basically reading the data as Oracle scans past it since it knows, based on the binary storage format, what the XML looks like, so it does not need to create the whole document to find the sections the XPath/XQuery specifies. You can see that a SQL statement is using streaming evaluation when "XPATH EVALUATION" shows up in the explain plan as shown by
This option is only available when the XML is stored in the DB in the correct format. If the XML is stored in a PL/SQL variable, Oracle cannot use streaming evaluation on it.