Quantcast
Channel: SQL Server Manageability forum
Viewing all articles
Browse latest Browse all 1519

Lost Execution Plans

$
0
0

My application's database has a single stored procedure (out of hundreds) that seems to loose its "good" execution plan weekly. How can I prevent my stored procedure from loosing the execution plan after it has a "good" one stored?

The stored procedure is executed multiple times a day, every day. My issue is this, about once a week, when the stored procedure is executed, the CPU usage spikes and remains spiked until I run an ALTER on the stored procedure. Afterwards, the CPU usage on this server is fine.

When I view the Activity Monitor, the stored procedure is listed as an expensive query. When I view the Execution Plan, I see that it is doing an index scan. When the stored procedure is running without issue, the stored procedure is doing an index seek.


Viewing all articles
Browse latest Browse all 1519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>