2009-06-05

Slow sqlserver express

I got informed of something somewhat strange the other day.  Microsoft SQLServer Express runs (connects) faster if you have a query window to the database already.

Like this:

Have a freshly booted machine with only Visual studio running and your web application of choice.  The time for a refresh of you web page might take 5 seconds.

Now start Management Studio and open a query window.  Let it stay open.
Refresh your page and you are down to a second.

The figures might of course change but they are what I have on a dual core 2GHz 4MB machine for a project of size X and database of size Y.

----

I haven't checked if the same thing happens with another script editor like for instance AnySQLMaestro but guess it does.  I guess it has to do with connections - as long as there is a connection to SQLExpress, it doesn't close.  If so, it corresponds with the product's raison d'être, a database for applications.

----

I have noticed a correspondence between debug-start-delay and quality of code.  I say that every second wasted waiting on debug start makes the developer unwilling to test more thoroughly and leads to more bugs in the product.

----

Another trick to make web debug start faster here.

No comments: