Home Forums Programming XML openxml on table with indexed xml column RE: openxml on table with indexed xml column

  • N_Muller (11/20/2014)


    As far as I know there are two ways of reading XML using SQL, either openxml or XQuery. There's a lot of debate on which is better or faster. Certainly, openxml makes the code easier to read. I know I can use XQuery and take advantage of the XML indexes in tables. I wanted to know if there is such possibility using openxml.

    Sorry I didn't phrase the question properly, meant to ask if there where any technical limitations or requirements forcing the use of openxml.

    Back to the initial question, XML index cannot be created on a variable and it is unlikely that an XML index is going to be helpful for openxml, I strongly recommend using XQuery with the nodes function instead.

    😎