I have statistical math functions that use intense sql queries and run in an sql assembly. I just increased the RAM on my db server (IIS 6, SQL Server 2005) but my queries still suck up 100% of my CPU for the 5 minutes I allow for the assemblies to run. Is there any way to allow the assemblies to cap their CPU? At 100% the server becomes unresponsive. Any sql tuning would help too.
Share
SQLServer 2008 has a resource governor that allows you to throttle the CPU and/or I/O based on the db username that is used for a given connection. If upgrading to SQL Server 2008 is an option for you, your stats assembly could use a dedicated database username that allows it to consume 100% of the CPU unless another db connection needs CPU, then it yields to the other processes.
This works very well. We have queries and reports that do complex statistical analysis of thousands of data points. It too is CPU intensive. Before we upgraded to SQL Server 2008, we have all sorts of performance issues. Now everything runs smooth. The other new features of 2008 are nice, but the resource governor is the real reason we upgraded.