XML storage

XML documents you insert into columns of type XML can reside either in the default storage object, or directly in the base table row. Base table row storage is under your control and is available only for small documents; larger documents are always stored in the default storage object.

The decision to store documents in the base table row depends on your storage and performance requirements, and on accepted trade-offs.

XML storage object
This is the default method of storing XML documents. Documents that require more than 32 KB of storage space, or larger than the page size, are always stored in the default storage object, regardless of your storage choice. Storage in the default storage object allows you to insert and retrieve XML documents up to 2 gigabytes in size.
Base table row storage
For XML documents that require less than 32 KB of storage space, you can choose to store your XML documents directly in the base table row. This option can increase performance for any operation that queries, inserts, updates, or deletes XML documents, because fewer I/O operations are required.

If you enable data row compression for the table, XML documents that are stored in the default XML storage object and in the base table row are subject to compression. Compression can improve I/O efficiency for operations on XML documents as well as reduce storage space requirements.