﻿<?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 2008 / SQL Server 2008 - General  / Procedure is taking 15 seconds after service restart but from second time procedure takes 1 sec / 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>Fri, 24 May 2013 07:02:45 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Procedure is taking 15 seconds after service restart but from second time procedure takes 1 sec</title><link>http://www.sqlservercentral.com/Forums/Topic1410969-391-1.aspx</link><description>Ah, I remember the days of DBCC PINTABLE.  Those were the days.Kids, dont try that at home, it doesnt work anymore.</description><pubDate>Mon, 28 Jan 2013 09:45:28 GMT</pubDate><dc:creator>DiverKas</dc:creator></item><item><title>RE: Procedure is taking 15 seconds after service restart but from second time procedure takes 1 sec</title><link>http://www.sqlservercentral.com/Forums/Topic1410969-391-1.aspx</link><description>[quote][b]GilaMonster (1/24/2013)[/b][hr]Very likely has nothing whatsoever to do with the execution plan. 15 seconds is far longer than SQL takes to compile anything other than a ridiculously complex query.Restarting cleared the data cache, the cache of data pages. After the restart queries have to read the data from disk (slow), not cache (fast). Hence the first run of any query will be slower than the second or third or subsequent runs[/quote]+101st Run = Disk --&amp;gt; RAM --&amp;gt; Client2nd Run = RAM --&amp;gt; Client</description><pubDate>Fri, 25 Jan 2013 03:16:29 GMT</pubDate><dc:creator>Sean Pearce</dc:creator></item><item><title>RE: Procedure is taking 15 seconds after service restart but from second time procedure takes 1 sec</title><link>http://www.sqlservercentral.com/Forums/Topic1410969-391-1.aspx</link><description>Very likely has nothing whatsoever to do with the execution plan. 15 seconds is far longer than SQL takes to compile anything other than a ridiculously complex query.Restarting cleared the data cache, the cache of data pages. After the restart queries have to read the data from disk (slow), not cache (fast). Hence the first run of any query will be slower than the second or third or subsequent runs</description><pubDate>Thu, 24 Jan 2013 04:49:53 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: Procedure is taking 15 seconds after service restart but from second time procedure takes 1 sec</title><link>http://www.sqlservercentral.com/Forums/Topic1410969-391-1.aspx</link><description>[quote][b]nishantshende-532951 (1/24/2013)[/b][hr]I think the execution plan is taking much time, so can anyone tell me how to save the execution plan. So that the procedure will take 1 second even after restarting the SQL Server service. Or please share the solution if any.[/quote] your sql restart flushed all the plan  from  buffer thats y when  the SP got executed first time it toook longer time and next time since it found the exec plan available SP got executed faster.memory mangement manage the  exec plan storage in buffer cache. thats sql server internal , you dont need to take care of this. but yes right amount of memory(RAM) should be there.</description><pubDate>Thu, 24 Jan 2013 01:27:57 GMT</pubDate><dc:creator>Bhuvnesh</dc:creator></item><item><title>Procedure is taking 15 seconds after service restart but from second time procedure takes 1 sec</title><link>http://www.sqlservercentral.com/Forums/Topic1410969-391-1.aspx</link><description>Hi,I have one store procedure which is taking 15 seconds after restarting the SQL Server Service. But when I try to execute the stored procedure from 2nd time, it takes only 0.8 to 1 second.I think the execution plan is taking much time, so can anyone tell me how to save the execution plan. So that the procedure will take 1 second even after restarting the SQL Server service. Or please share the solution if any.Thanks in Advance,Nishant Shende </description><pubDate>Thu, 24 Jan 2013 01:06:15 GMT</pubDate><dc:creator>nishantshende-532951</dc:creator></item></channel></rss>