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: Monday, July 7, 2014 6:22 AM
Points: 231, Visits: 721
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: Today @ 10:26 AM
Points: 13,884, Visits: 28,278
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
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

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

Add to briefcase

Permissions Expand / Collapse