tags:

views:

235

answers:

2

Hi! 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.

+2  A: 

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 in 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.

Quassnoi
A: 

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 manipultation is going to happen on the client side go with the LOB storage option.

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

Igor Zelaya