I have a stored procedure that was working really well for about 3 weeks, than all of a sudden it basically ground to a complete Stop.
This was i believe due to the server creating an additional query plan that was far less efficient.
For whatever reason both of these plans were flushed from the server.
Is there a way to get the Server to recreate the good plan ?
i have a copy of the plan (the graphical format), the query hash and the plan hash but wasn't sure if the plan hash still exists anywhere after being flushed.
"Good" Plan: https://www.brentozar.com/pastetheplan/?id=S1TLgATDo
"Bad" Plan: https://www.brentozar.com/pastetheplan/?id=Hy5cJATwi