• Very cool concept ....

    For all interested in performance aspect, XML data types are powerful but expensive. For XML queries, execution plan means very little. As the XML payload/ nodes increase or node iteration increases, LOB parsing becomes extremely heavy. Processing raw XML without indexes or schema applied on it, is similar to a heap in concept but worse because XML parsing adds a heavy layer. Schema helps with the read-aheads and Iops. Adding indexes helps with the lookup. Caveat with the indexes, needs sufficient head room for growth. Some of the benchmarks from my a prior project, the index size is roughly 10-12 times the data size for a 500+ node XML. Here is a sample benchmark, 200 node XML of roughly 69K size has a 810K index size. The size of the data matters as well.

    Without taking away the spotlight from Divya's cool technique, if there are numerous XML nodes I would

    1. pin the XML data to physical table and column

    2. create a schema and apply it on the XML column

    3. make the table transient to save on disk space. This means maintenance to defrag

    4. apply primary and at least secondary PATH index

    5. maintain a seperate LUN for the table, if using the second example to split numerous rows in the table