Does having strongly typed XML speed up xml queries?

  • Hey guys,

    I'm looking to serialize some NVP data into an XML blob. I plan to put a primary xml index on the column, but my question is, would putting an XSD on the column speed up any queries, or would it just ensure format? I know that with selective xml indices, you can do things like specify the datatype associated with the xpath which can further optimize retrieval.

    Executive Junior Cowboy Developer, Esq.[/url]

  • I don't have quantifiable measures on this, but yes, I'm pretty sure that having an enforced structure will help to speed the queries. But, they still won't be "fast" because XML queries are pretty memory intensive. Also, be cautious about the syntax used. Wild cards or vague XML paths can seriously negatively impact performance there.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply