Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Is there a way to force recompilation of already running query based on plan handle Expand / Collapse
Author
Message
Posted Monday, January 28, 2013 9:51 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, December 3, 2014 11:49 AM
Points: 231, Visits: 723
Hi,

Is there any way to force the recompilation of an already running query based on plan handle?

Thanks.
Post #1412746
Posted Tuesday, January 29, 2013 3:56 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 8:22 AM
Points: 14,205, Visits: 28,534
Not for a query that is running, no. You can use the plan handle to recompile a query in cache, but if it's actively running, it will have to complete. Any other calls against the same plan in cache will get a new plan, but that existing execution will have to complete.

----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server Query Performance Tuning
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1412876
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse