In our application we have a few elements in our schema where we have not set limits on the number of occurences. For these particular elements, the maxOccurs attribute is set to "unbounded".
Does this have any performance effect on any XML indexes that we may add later to improve performance? Does it slow anything down internally in SQL Server when performing any DML operations on our stored XML?
It does not make a difference to XML indexing whether maxOccurs is set to unbounded or a fixed value (> 1, say 6). A separate entry is created in the XML index for each occurrence of the element. So index lookup and other other optimizations will occur the same way. There should be no performance difference between the two choices.
If maxOccurs is 1, then you should set it to 1.
Thank you,
Shankar Pal, Program Manager, SQL Server
No comments:
Post a Comment