Does anyone one know when does SQL Server 2008 rebuild query execution plan? How long do they get cached for? Any info would be appreciated?
This is a very broad topic that would take a very long, very detailed answer to be accurate - the best thing would be to read through this whitepaper on technet which provides a very good overview on compilation, caching, different levels of caching, things that affect what is cached and for how long, etc., etc. If you have any specific questions after reading through that (i.e. in terms of how to interpret something specific, or a scenario that is causing you a problem), repost with the details and we could certainly give you more specific guidance.