Question

I'm looking for the best way to store XMLs in a Oracle Database. Currently we use a BLOB type column but I'm pushing to move this column to a XMLType or an XMLType schema based column. I've just found this article XML: To CLOB or Object? from Oracle and read it but I haven't made up my mind yet.

So has anybody experienced this same question before? Also the idea is that the XML will be fetched completely into a Flash client through a Red5 server, so what I'm looking for here is the best throughput. From what I see in the data they provide CLOB loads faster into the database but the XMLSchema based is faster for retrieval.

Thanks, Joaquín.

Was it helpful?

Solution

Working with objects in Oracle implies multiple SQL/PLSQL context switches that may affect performance.

If you don't do anything with XML on Oracle side, then keep in as LOBs.

"Excellent DML performance" listed there is, um, an overstatement (when speaking of putting/retrieving unprocessed XML, i. e. byte stream)

In fact, if your server will process less than 10 queries per second, you will hardly notice any difference at all.

OTHER TIPS

If you are going to select or update just parts of the XML than object relational storage is the way to go. The only disadvantages is that since the xml is shredded internally, white spaces and formatting is removed, but as the document says it still conforms to DOM.

If you are going to use the database as a storage only and all the XML manipulation is going to happen on the client side go with the LOB storage option.

If you are using 11g, it now has an XMLIndex which hugely improves performance when updating/selecting XMLType fields stored with LOB option.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top