Monday, March 16, 2009

Improve SQL performance

I’m using Microsoft SQL Server 2008 Enterprise Edition on my developer machine. I used to work with SQL Server 2005 Developer Edition before.

I recognized that my machine replied unusually slowly with version 2008. The solution was setting a memory limit and processor affinity for the server. Now it is limited to 400 MB RAM and I assigned the IO and computation to different cores. It works fine and the performance has increased.

PS: If you are using Entity Framework, consider the warm-up time of the framework. Just like .NET, the first queries will be ~10 times slower and the subsequent queries will be much faster.