I need help figuring out why my database server crashes when I perform the following query:
SELECT T.COLLECTION_ID, T.CYCLE_ID, T.PHASE_ID, EXTRACT(T.XML_DOCUMENT, '/')
FROM THINGS T
WHERE T.COLLECTION_ID = 1668 AND T.CYCLE_ID = 26601 AND T.DELETED = 0
ORDER BY T.COLLECTION_ID, T.CYCLE_ID, T.PHASE_ID
Additional details:
- The CLOB in the above XML_DOCUMENT column for this record is 780kb
- The database is Oracle 10g
- The XML in the CLOB is well-formed
If there is nothing obvious in the PLSQL above that can be changed to avoid freezing up the database, does anyone have any ideas on how/if I could tweak my server or database to avoid crashes from these types of queries in general?
Any potential solutions or advice is highly valued, thanks!
Upgrading to Oracle 11g has solved our issue. 11g handles XML operations more efficiently than 10g, and handles faults a lot better too.
Another person on Oracle forums has made a similar conclusion using different XML operations, so it’s probably safe to assume the upgrade was the appropriate solution here.