﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / SQL Server 2005 Performance Tuning  / Execution context and Procedure Cache / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 18 May 2013 14:14:58 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Execution context and Procedure Cache</title><link>http://www.sqlservercentral.com/Forums/Topic1312130-360-1.aspx</link><description>find this,an execution context is derived. An execution context is what is "executed" to produce query results. Execution contexts are also cached and reused.http://technet.microsoft.com/library/Cc966425</description><pubDate>Mon, 21 Jan 2013 05:05:06 GMT</pubDate><dc:creator>mauleshmevada</dc:creator></item><item><title>RE: Execution context and Procedure Cache</title><link>http://www.sqlservercentral.com/Forums/Topic1312130-360-1.aspx</link><description>[quote][b]GilaMonster (6/6/2012)[/b][hr]Execution contexts aren't reused, they're specific to a single query's execution.[/quote]Hmmm... Guess it's not true. From [url=http://msdn.microsoft.com/en-us/library/ee343986(v=sql.100).aspx]here[/url]:[quote]Suppose that a batch B contains an "if" statement. When B begins execution, an execution context for B is generated. Suppose that during this first execution, the "true" branch of the "if" is taken. Further, suppose that B was submitted again by another connection during the first execution. Because the only execution context existing at that moment was in use, a second execution context is generated and given to the second connection. Suppose that the second execution context takes the "false" branch of the "if". [b]After[/b] both executions [b]complete[/b], B is submitted [b]by a third [u]connection[/u][/b]. Supposing that the third execution of B chooses the "true" branch, the execution [u]will complete slightly faster[/u] if SQL Server chose the first execution context of B for that connection rather than the second execution context.[/quote]If, as you wrote, execution contexts was "structure-for-one-execution-only" no "slightly faster" execution can be possible in principle - agree?</description><pubDate>Mon, 20 Aug 2012 10:59:53 GMT</pubDate><dc:creator>Shcherbunov Neil</dc:creator></item><item><title>RE: Execution context and Procedure Cache</title><link>http://www.sqlservercentral.com/Forums/Topic1312130-360-1.aspx</link><description>The compile parameters are stored with the plan because they help show how the plan was created. You also get the ANSI settings stored with the plan. Other than that, I'm not sure what you're calling "execution context." Certainly the execution parameter values are not stored with plans. You can see them when you capture an actual execution, but only because you're capturing that execution yourself. Those values are not stored.</description><pubDate>Thu, 07 Jun 2012 05:55:29 GMT</pubDate><dc:creator>Grant Fritchey</dc:creator></item><item><title>RE: Execution context and Procedure Cache</title><link>http://www.sqlservercentral.com/Forums/Topic1312130-360-1.aspx</link><description>Execution contexts aren't reused, they're specific to a single query's execution. The memory space gets reused, not the contents.</description><pubDate>Wed, 06 Jun 2012 13:12:22 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>Execution context and Procedure Cache</title><link>http://www.sqlservercentral.com/Forums/Topic1312130-360-1.aspx</link><description>Not sure whether i m thinking the right way...I know Sql server stores execution context information in Execution plan but what if the parameter values change consistently in my application, then i don't find any advantage of storing Execution context in Execution Plan, I m simply wasting memory for storing all the parameter information in memory....I find it more advantage to store just query plan in the Execution plan rather than storing Execution context...Is there any method in Sql Server to force it not to store Execution context information in  Procedure Cache </description><pubDate>Wed, 06 Jun 2012 12:56:14 GMT</pubDate><dc:creator>PradeepVallabh</dc:creator></item></channel></rss>