views:

371

answers:

1

I am using Entity Framework with my website. To improve performance, I have started to use compiled queries wherever I can, either directly with CompiledQuery.Compile or using ESQL.

The performance now is fantastic, that's it, once the queries are compiled. Compiling them takes quite a bit of time on some pages apparently, so the first hit is always really bad.

That should not be a problem as once it is compiled it should be good as long as the website is up and running. However, in reality, this is not the case. After a certain period of inactivity on a page, it feels as if the query is recompiled (when I access it again).

It is possible? Does IIS (v6) clears the cache of compiled queries? Can I prevent it from doing so? Can I actually confirm that this is the cause of the problem?

Thanks, AD

+3  A: 

I think they are recompiled when your application pool is destroyed because of inactivity. You can tune application pools using MMC Console of IIS 6.0.

Guide is here

Aen Sidhe