<?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; Stored Procedure are Compiled on First Run &#8211; SP taking Longer to Run First Time</title>
	<atom:link href="http://blog.sqlauthority.com/2009/11/08/sql-server-stored-procedure-are-compiled-on-first-run-sp-taking-longer-to-run-first-time/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2009/11/08/sql-server-stored-procedure-are-compiled-on-first-run-sp-taking-longer-to-run-first-time/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Mon, 13 Feb 2012 15:11:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<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/2009/11/08/sql-server-stored-procedure-are-compiled-on-first-run-sp-taking-longer-to-run-first-time/#comment-237697</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:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7164#comment-237697</guid>
		<description><![CDATA[[...] Server Interview Questions and Answers ISBN: 1466405643 Page#99  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 [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Server Interview Questions and Answers ISBN: 1466405643 Page#99  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 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manish</title>
		<link>http://blog.sqlauthority.com/2009/11/08/sql-server-stored-procedure-are-compiled-on-first-run-sp-taking-longer-to-run-first-time/#comment-222870</link>
		<dc:creator><![CDATA[Manish]]></dc:creator>
		<pubDate>Wed, 21 Dec 2011 12:16:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7164#comment-222870</guid>
		<description><![CDATA[I believe till 2008R2 there is not any way to enforce the existence of the DB objects inside a stored procedure.

The other way around is, you can check using IFExist() for any DB objects and proceed accordingly.

Thanks
Manish]]></description>
		<content:encoded><![CDATA[<p>I believe till 2008R2 there is not any way to enforce the existence of the DB objects inside a stored procedure.</p>
<p>The other way around is, you can check using IFExist() for any DB objects and proceed accordingly.</p>
<p>Thanks<br />
Manish</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manish</title>
		<link>http://blog.sqlauthority.com/2009/11/08/sql-server-stored-procedure-are-compiled-on-first-run-sp-taking-longer-to-run-first-time/#comment-222869</link>
		<dc:creator><![CDATA[Manish]]></dc:creator>
		<pubDate>Wed, 21 Dec 2011 12:14:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7164#comment-222869</guid>
		<description><![CDATA[I believe till 2008R2 there is not any way to enforce the existence of the DB objects in SQL SERVER.

Thanks
Manish]]></description>
		<content:encoded><![CDATA[<p>I believe till 2008R2 there is not any way to enforce the existence of the DB objects in SQL SERVER.</p>
<p>Thanks<br />
Manish</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marce</title>
		<link>http://blog.sqlauthority.com/2009/11/08/sql-server-stored-procedure-are-compiled-on-first-run-sp-taking-longer-to-run-first-time/#comment-98272</link>
		<dc:creator><![CDATA[Marce]]></dc:creator>
		<pubDate>Sun, 07 Nov 2010 00:09:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7164#comment-98272</guid>
		<description><![CDATA[Camilo, you can ask if the table exists direcly. This is the same approach for every object in the db....]]></description>
		<content:encoded><![CDATA[<p>Camilo, you can ask if the table exists direcly. This is the same approach for every object in the db&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Camilo Maldonado</title>
		<link>http://blog.sqlauthority.com/2009/11/08/sql-server-stored-procedure-are-compiled-on-first-run-sp-taking-longer-to-run-first-time/#comment-78905</link>
		<dc:creator><![CDATA[Camilo Maldonado]]></dc:creator>
		<pubDate>Tue, 06 Jul 2010 09:08:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7164#comment-78905</guid>
		<description><![CDATA[Hi Pinal.

is there a way to enforce that the objects related in a stored procedure exists?

for example, i want that this script fail when i execute it.  Not when runs the stored procedure the first time.

CREATE PROCEDURE TEST_SP_OBJECT_DOESNT_EXIST
AS
BEGIN

	SELECT * FROM TABLE_THAT_DOESNT_EXIST
END
GO

Thank you]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal.</p>
<p>is there a way to enforce that the objects related in a stored procedure exists?</p>
<p>for example, i want that this script fail when i execute it.  Not when runs the stored procedure the first time.</p>
<p>CREATE PROCEDURE TEST_SP_OBJECT_DOESNT_EXIST<br />
AS<br />
BEGIN</p>
<p>	SELECT * FROM TABLE_THAT_DOESNT_EXIST<br />
END<br />
GO</p>
<p>Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://blog.sqlauthority.com/2009/11/08/sql-server-stored-procedure-are-compiled-on-first-run-sp-taking-longer-to-run-first-time/#comment-77647</link>
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Fri, 25 Jun 2010 13:52:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7164#comment-77647</guid>
		<description><![CDATA[Pinal Dave,

Can you explain what is meant by &quot;compiled&quot;? Does it simply mean the execution plan is cached? The stored procedure is not compiled in the way that I&#039;d consider a C# program compiled, right?

Thanks.]]></description>
		<content:encoded><![CDATA[<p>Pinal Dave,</p>
<p>Can you explain what is meant by &#8220;compiled&#8221;? Does it simply mean the execution plan is cached? The stored procedure is not compiled in the way that I&#8217;d consider a C# program compiled, right?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2009/11/08/sql-server-stored-procedure-are-compiled-on-first-run-sp-taking-longer-to-run-first-time/#comment-59487</link>
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Fri, 08 Jan 2010 19:06:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7164#comment-59487</guid>
		<description><![CDATA[Hello Kishor,

Output parameter is best way to get a value into a variable out of a stored procedure.
For example if you want to return a value like &quot;YourName&quot;  from a stored procedure into a variable @YourName. Here you have three options:
1. In the stored procedure store the value in some user table and out of stored procedure select the stored value in variable.
2.  Use an insert into statement with a table variable and insert the result of EXEC yourSP and then set the value in your variable from table variable. 
3. Easiest is assign the value to an output parameter.

Regards,
Pinal dave]]></description>
		<content:encoded><![CDATA[<p>Hello Kishor,</p>
<p>Output parameter is best way to get a value into a variable out of a stored procedure.<br />
For example if you want to return a value like &#8220;YourName&#8221;  from a stored procedure into a variable @YourName. Here you have three options:<br />
1. In the stored procedure store the value in some user table and out of stored procedure select the stored value in variable.<br />
2.  Use an insert into statement with a table variable and insert the result of EXEC yourSP and then set the value in your variable from table variable.<br />
3. Easiest is assign the value to an output parameter.</p>
<p>Regards,<br />
Pinal dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kishor</title>
		<link>http://blog.sqlauthority.com/2009/11/08/sql-server-stored-procedure-are-compiled-on-first-run-sp-taking-longer-to-run-first-time/#comment-59472</link>
		<dc:creator><![CDATA[kishor]]></dc:creator>
		<pubDate>Fri, 08 Jan 2010 12:33:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7164#comment-59472</guid>
		<description><![CDATA[Hi Pinal

What is the advantage of Output Parameter ?]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal</p>
<p>What is the advantage of Output Parameter ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deepak</title>
		<link>http://blog.sqlauthority.com/2009/11/08/sql-server-stored-procedure-are-compiled-on-first-run-sp-taking-longer-to-run-first-time/#comment-57675</link>
		<dc:creator><![CDATA[Deepak]]></dc:creator>
		<pubDate>Tue, 17 Nov 2009 20:22:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7164#comment-57675</guid>
		<description><![CDATA[I have the same question as Rakesh.... Please can someone explain?

Cheers - DV]]></description>
		<content:encoded><![CDATA[<p>I have the same question as Rakesh&#8230;. Please can someone explain?</p>
<p>Cheers &#8211; DV</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rakesh</title>
		<link>http://blog.sqlauthority.com/2009/11/08/sql-server-stored-procedure-are-compiled-on-first-run-sp-taking-longer-to-run-first-time/#comment-57599</link>
		<dc:creator><![CDATA[Rakesh]]></dc:creator>
		<pubDate>Fri, 13 Nov 2009 15:00:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7164#comment-57599</guid>
		<description><![CDATA[Is dynamic Query in SP complied Everytime ?

how it complied the SP when it take Parameter ?]]></description>
		<content:encoded><![CDATA[<p>Is dynamic Query in SP complied Everytime ?</p>
<p>how it complied the SP when it take Parameter ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kuldip.Bhatt</title>
		<link>http://blog.sqlauthority.com/2009/11/08/sql-server-stored-procedure-are-compiled-on-first-run-sp-taking-longer-to-run-first-time/#comment-57536</link>
		<dc:creator><![CDATA[Kuldip.Bhatt]]></dc:creator>
		<pubDate>Thu, 12 Nov 2009 04:59:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7164#comment-57536</guid>
		<description><![CDATA[Nice explanation sir.
All the best for Pune Session.]]></description>
		<content:encoded><![CDATA[<p>Nice explanation sir.<br />
All the best for Pune Session.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vijaya Kadiyala</title>
		<link>http://blog.sqlauthority.com/2009/11/08/sql-server-stored-procedure-are-compiled-on-first-run-sp-taking-longer-to-run-first-time/#comment-57433</link>
		<dc:creator><![CDATA[Vijaya Kadiyala]]></dc:creator>
		<pubDate>Sun, 08 Nov 2009 19:18:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7164#comment-57433</guid>
		<description><![CDATA[thanks buddy for sharing this inforamtion.]]></description>
		<content:encoded><![CDATA[<p>thanks buddy for sharing this inforamtion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vijayakumar</title>
		<link>http://blog.sqlauthority.com/2009/11/08/sql-server-stored-procedure-are-compiled-on-first-run-sp-taking-longer-to-run-first-time/#comment-57425</link>
		<dc:creator><![CDATA[Vijayakumar]]></dc:creator>
		<pubDate>Sun, 08 Nov 2009 10:44:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7164#comment-57425</guid>
		<description><![CDATA[Very nice stuff...]]></description>
		<content:encoded><![CDATA[<p>Very nice stuff&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

