Showing posts with label elements. Show all posts
Showing posts with label elements. Show all posts

Wednesday, March 28, 2012

Performance effect of using maxOccurs="unbounded"

Hello,

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

Friday, March 23, 2012

Performance Counters on Service Broker Transmission Queue

Hello,

is there built-in support for monitoring the number of elements in the transmission queue via performance counters?

Thanks,

There's no perfmon counter. Something like count () or sp_spaceused would be required to query the count. The message send perfmon counters probably are a better indication of what's happening at the connection level - depending on what you're trying to measure.|||

No performance counter. See this post for an efficient query to return the number of rows in the hidden table that represents the transmission queue: http://blogs.msdn.com/remusrusanu/archive/2006/11/08/fast-way-to-check-message-count.aspx

HTH,
~ Remus

|||Thank you both