Sql-server – Possible to add KEEPFIXED PLAN option to reduce the recompile in SQL Server 2005 in Production Env

best practicesperformancesql-server-2005stored-procedures

I'm not sure if it is good to enable the KEEPFIXED PLAN to reduce the impact of recompilation in the Production Env?

I'd know if we may gain performance after that or on the other hand it will be even worse.

For my case, I have a batch of stored procedures running in SQL Server 2005 and some one of need to run in a fixed loop condition.

Thanks!

Vance

Best Answer

Personally, I wouldn't use it.

There are better ways on managing this with asynchronous statistics or plan guides nowadays. I've only ever seen this hint used on some old trading database that was geared towards Sybase/very old SQL Server.

Also, you now have statement level recompilation that may fit your use case better

But really, you'll have to try it and find out in your situation...