<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Recompile Stored Procedure at Run Time</title>
	<atom:link href="http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/</link>
	<description>SQL, SQL Server, MySQL, Big Data and NoSQL</description>
	<lastBuildDate>Wed, 19 Jun 2013 08:01:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Andrei</title>
		<link>http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/#comment-467596</link>
		<dc:creator><![CDATA[Andrei]]></dc:creator>
		<pubDate>Thu, 02 May 2013 06:44:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8011#comment-467596</guid>
		<description><![CDATA[I noticed a strange behavior: I had a SP that called a table-valued function whose execution took 10 seconds.
After I used WITH RECOMPILE option the execution of the SP took only 1-2 seconds.

But without this option I tried to compile (right click -&gt; Modify -&gt; Execute) the function before I ran the SP: this led to 1-2 seconds for the SP which was really great. My question was: why did I need to recompile the function before running the SP in order to get better execution time ?

If I ran the SP directly, it took me 10 seconds.

Thanks,
Andrei]]></description>
		<content:encoded><![CDATA[<p>I noticed a strange behavior: I had a SP that called a table-valued function whose execution took 10 seconds.<br />
After I used WITH RECOMPILE option the execution of the SP took only 1-2 seconds.</p>
<p>But without this option I tried to compile (right click -&gt; Modify -&gt; Execute) the function before I ran the SP: this led to 1-2 seconds for the SP which was really great. My question was: why did I need to recompile the function before running the SP in order to get better execution time ?</p>
<p>If I ran the SP directly, it took me 10 seconds.</p>
<p>Thanks,<br />
Andrei</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #017 &#124; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/#comment-426026</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #017 &#124; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 23 Feb 2013 01:30:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8011#comment-426026</guid>
		<description><![CDATA[[...] Recompile Stored Procedure at Run Time The RECOMPILE hint is used with a query and recompiles only that particular query. However, if the parameters are used in many statements in the stored procedure and we want to recompile all the statements, then instead of using the RECOMPILE option with all the queries, we have one better option that uses WITH RECOMPILE during stored procedure creation or execution. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Recompile Stored Procedure at Run Time The RECOMPILE hint is used with a query and recompiles only that particular query. However, if the parameters are used in many statements in the stored procedure and we want to recompile all the statements, then instead of using the RECOMPILE option with all the queries, we have one better option that uses WITH RECOMPILE during stored procedure creation or execution. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brynjar</title>
		<link>http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/#comment-401918</link>
		<dc:creator><![CDATA[Brynjar]]></dc:creator>
		<pubDate>Mon, 31 Dec 2012 15:54:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8011#comment-401918</guid>
		<description><![CDATA[Pinal: Where I work we have a proc that is run in rapid succession (several hundred times) once a day and sometimes it performs really bad.
We have not been able to identify any reason for this and about 80% of the time a simple sp_recompile does the trick but occasionally we actually have to run an ALTER PROC.

We&#039;ve monitored db activity with the DBA to identify outside factors but without luck.
Can you think of an idea why sp_recompile isn&#039;t enough (or anything else that could help)?

(this is on SQL2000)]]></description>
		<content:encoded><![CDATA[<p>Pinal: Where I work we have a proc that is run in rapid succession (several hundred times) once a day and sometimes it performs really bad.<br />
We have not been able to identify any reason for this and about 80% of the time a simple sp_recompile does the trick but occasionally we actually have to run an ALTER PROC.</p>
<p>We&#8217;ve monitored db activity with the DBA to identify outside factors but without luck.<br />
Can you think of an idea why sp_recompile isn&#8217;t enough (or anything else that could help)?</p>
<p>(this is on SQL2000)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhu</title>
		<link>http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/#comment-377280</link>
		<dc:creator><![CDATA[madhu]]></dc:creator>
		<pubDate>Tue, 20 Nov 2012 09:25:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8011#comment-377280</guid>
		<description><![CDATA[thanks for article.]]></description>
		<content:encoded><![CDATA[<p>thanks for article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Varinder Sandhu</title>
		<link>http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/#comment-275053</link>
		<dc:creator><![CDATA[Varinder Sandhu]]></dc:creator>
		<pubDate>Wed, 11 Apr 2012 09:11:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8011#comment-275053</guid>
		<description><![CDATA[Refer this - http://www.varindersandhu.in/2011/11/15/sql-server-stored-procedure-with-recompile/]]></description>
		<content:encoded><![CDATA[<p>Refer this &#8211; <a href="http://www.varindersandhu.in/2011/11/15/sql-server-stored-procedure-with-recompile/" rel="nofollow">http://www.varindersandhu.in/2011/11/15/sql-server-stored-procedure-with-recompile/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Cases When Stored Procedure RECOMPILE &#8211; Quiz &#8211; Puzzle &#8211; 14 of 31 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/#comment-237698</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Cases When Stored Procedure RECOMPILE &#8211; Quiz &#8211; Puzzle &#8211; 14 of 31 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sun, 15 Jan 2012 01:31:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8011#comment-237698</guid>
		<description><![CDATA[[...]  Stored Procedure are Compiled on First Run – SP taking Longer to Run First Time  Recompile Stored Procedure at Run Time  Encrypted Stored Procedure and Activity Monitor  Stored Procedure and [...]]]></description>
		<content:encoded><![CDATA[<p>[...]  Stored Procedure are Compiled on First Run – SP taking Longer to Run First Time  Recompile Stored Procedure at Run Time  Encrypted Stored Procedure and Activity Monitor  Stored Procedure and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 13 of 31 Journey to SQLAuthority</title>
		<link>http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/#comment-147836</link>
		<dc:creator><![CDATA[SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 13 of 31 Journey to SQLAuthority]]></dc:creator>
		<pubDate>Wed, 13 Jul 2011 01:30:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8011#comment-147836</guid>
		<description><![CDATA[[...] This method is not recommended for large stored procedures because the recompilation of so many statements may outweigh the benefit of a better execution plan. (Read more here) [...]]]></description>
		<content:encoded><![CDATA[<p>[...] This method is not recommended for large stored procedures because the recompilation of so many statements may outweigh the benefit of a better execution plan. (Read more here) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/#comment-105950</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Wed, 15 Dec 2010 11:56:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8011#comment-105950</guid>
		<description><![CDATA[You need to give more informations on what you want to acheive]]></description>
		<content:encoded><![CDATA[<p>You need to give more informations on what you want to acheive</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hululala</title>
		<link>http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/#comment-105040</link>
		<dc:creator><![CDATA[hululala]]></dc:creator>
		<pubDate>Mon, 13 Dec 2010 09:09:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8011#comment-105040</guid>
		<description><![CDATA[plz gys tell me the procedure about how to generate the stored procedure at runtime of all tables.


will be thankful to you.........]]></description>
		<content:encoded><![CDATA[<p>plz gys tell me the procedure about how to generate the stored procedure at runtime of all tables.</p>
<p>will be thankful to you&#8230;&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: happpy</title>
		<link>http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/#comment-67102</link>
		<dc:creator><![CDATA[happpy]]></dc:creator>
		<pubDate>Tue, 27 Apr 2010 09:02:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8011#comment-67102</guid>
		<description><![CDATA[my name is happy , plz tell me use of stored procedure. becuase query is important about table , then what is use of stored procedure plz define ..

thankyou]]></description>
		<content:encoded><![CDATA[<p>my name is happy , plz tell me use of stored procedure. becuase query is important about table , then what is use of stored procedure plz define ..</p>
<p>thankyou</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/#comment-61912</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Sun, 28 Feb 2010 02:20:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8011#comment-61912</guid>
		<description><![CDATA[Link is fixed!]]></description>
		<content:encoded><![CDATA[<p>Link is fixed!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allen McGuire</title>
		<link>http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/#comment-61909</link>
		<dc:creator><![CDATA[Allen McGuire]]></dc:creator>
		<pubDate>Sun, 28 Feb 2010 01:28:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8011#comment-61909</guid>
		<description><![CDATA[Grammer = grammer... I&#039;m fired.]]></description>
		<content:encoded><![CDATA[<p>Grammer = grammer&#8230; I&#8217;m fired.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allen McGuire</title>
		<link>http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/#comment-61908</link>
		<dc:creator><![CDATA[Allen McGuire]]></dc:creator>
		<pubDate>Sun, 28 Feb 2010 01:27:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8011#comment-61908</guid>
		<description><![CDATA[Neither does your grammer ;-)

word = work?]]></description>
		<content:encoded><![CDATA[<p>Neither does your grammer ;-)</p>
<p>word = work?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramin Kermani</title>
		<link>http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/#comment-61897</link>
		<dc:creator><![CDATA[Ramin Kermani]]></dc:creator>
		<pubDate>Sat, 27 Feb 2010 19:10:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8011#comment-61897</guid>
		<description><![CDATA[Hey, Thanks for article but the link given does not word]]></description>
		<content:encoded><![CDATA[<p>Hey, Thanks for article but the link given does not word</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/#comment-61517</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Sat, 20 Feb 2010 05:39:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8011#comment-61517</guid>
		<description><![CDATA[Thanks Ritesh,

It is fixed now!]]></description>
		<content:encoded><![CDATA[<p>Thanks Ritesh,</p>
<p>It is fixed now!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ritesh Shah</title>
		<link>http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/#comment-61510</link>
		<dc:creator><![CDATA[Ritesh Shah]]></dc:creator>
		<pubDate>Sat, 20 Feb 2010 02:00:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8011#comment-61510</guid>
		<description><![CDATA[Good Morning Champ, the link given in first paragraph is not working.]]></description>
		<content:encoded><![CDATA[<p>Good Morning Champ, the link given in first paragraph is not working.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allen McGuire</title>
		<link>http://blog.sqlauthority.com/2010/02/20/sql-server-recompile-stored-procedure-at-run-time/#comment-61509</link>
		<dc:creator><![CDATA[Allen McGuire]]></dc:creator>
		<pubDate>Sat, 20 Feb 2010 01:41:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8011#comment-61509</guid>
		<description><![CDATA[Why would someone want to force a recompile every time?  The execution plan should really be indicative of a typical call - it&#039;s only rare circumstances where it is incorrect.  Perhaps updating statistics or doing some table/index maintenance would be the place to start before you start recompiling your sprocs every time they are called.

Just a thought.]]></description>
		<content:encoded><![CDATA[<p>Why would someone want to force a recompile every time?  The execution plan should really be indicative of a typical call &#8211; it&#8217;s only rare circumstances where it is incorrect.  Perhaps updating statistics or doing some table/index maintenance would be the place to start before you start recompiling your sprocs every time they are called.</p>
<p>Just a thought.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
