A lesson in performance

time to read 1 min | 143 words

A while ago I posted a performance analysis of Sending arrays to SQL Server: Xml vs. Comma Separated Values. The context for that was sending large number of parameters to the server to be processed in an IN expression. We have hit the 2,100 parameters limit of SQL server a few times, and that became critical.

The reason that we had so many items to send to the IN expression was that we do both caching and calculation on the code, and then we need to get the data from that.

As it turned out, I got a call today that said that the String Split method was causing performance issues. Conversely, the XmlIn method had no issue. This happens when the server is under load. I am not sure why this is happening, but the change was very quick & painless.