<?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; Comparison : Similarity and Difference  #TempTable vs @TempVariable</title>
	<atom:link href="http://blog.sqlauthority.com/2007/07/03/sql-server-comparison-similarity-and-difference-temptable-vs-tempvariable/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/07/03/sql-server-comparison-similarity-and-difference-temptable-vs-tempvariable/</link>
	<description>Notes of a SQL Server MVP and Database Administrator</description>
	<lastBuildDate>Sat, 21 Nov 2009 05:54:09 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: jc</title>
		<link>http://blog.sqlauthority.com/2007/07/03/sql-server-comparison-similarity-and-difference-temptable-vs-tempvariable/#comment-54984</link>
		<dc:creator>jc</dc:creator>
		<pubDate>Tue, 18 Aug 2009 17:51:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/03/sql-server-comparison-similarity-and-difference-temptable-vs-tempvariable/#comment-54984</guid>
		<description>Dave,

We have a procedure that is ran evry 2 minutes in a windows service.  The procedure uses a table variable.  It appears tha after a couple hours of execution the server that this service is running on starts to take a performance hit.  We have also seen a tremendous increase in timeouts since the implementation of this stored procedure.  Is ti possible that the table variable is not being released from memeory?</description>
		<content:encoded><![CDATA[<p>Dave,</p>
<p>We have a procedure that is ran evry 2 minutes in a windows service.  The procedure uses a table variable.  It appears tha after a couple hours of execution the server that this service is running on starts to take a performance hit.  We have also seen a tremendous increase in timeouts since the implementation of this stored procedure.  Is ti possible that the table variable is not being released from memeory?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQLAuthority News - Best Articles on SQLAuthority.com Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/07/03/sql-server-comparison-similarity-and-difference-temptable-vs-tempvariable/#comment-47226</link>
		<dc:creator>SQLAuthority News - Best Articles on SQLAuthority.com Journey to SQL Authority with Pinal Dave</dc:creator>
		<pubDate>Tue, 24 Feb 2009 12:09:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/03/sql-server-comparison-similarity-and-difference-temptable-vs-tempvariable/#comment-47226</guid>
		<description>[...] SQL SERVER - Comparison : Similarity and Difference #TempTable vs @TempVariable [...]</description>
		<content:encoded><![CDATA[<p>[...] SQL SERVER &#8211; Comparison : Similarity and Difference #TempTable vs @TempVariable [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER - SQL SERVER - Comparison : Similarity and Difference #TempTable vs @TempVariable - Part 2 Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/07/03/sql-server-comparison-similarity-and-difference-temptable-vs-tempvariable/#comment-38526</link>
		<dc:creator>SQL SERVER - SQL SERVER - Comparison : Similarity and Difference #TempTable vs @TempVariable - Part 2 Journey to SQL Authority with Pinal Dave</dc:creator>
		<pubDate>Tue, 20 May 2008 11:11:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/03/sql-server-comparison-similarity-and-difference-temptable-vs-tempvariable/#comment-38526</guid>
		<description>[...] I have previously wrote about this indepth here : SQL SERVER - Comparison : Similarity and Difference #TempTable vs @TempVariable [...]</description>
		<content:encoded><![CDATA[<p>[...] I have previously wrote about this indepth here : SQL SERVER &#8211; Comparison : Similarity and Difference #TempTable vs @TempVariable [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rishi22</title>
		<link>http://blog.sqlauthority.com/2007/07/03/sql-server-comparison-similarity-and-difference-temptable-vs-tempvariable/#comment-32787</link>
		<dc:creator>Rishi22</dc:creator>
		<pubDate>Tue, 15 Jan 2008 02:42:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/03/sql-server-comparison-similarity-and-difference-temptable-vs-tempvariable/#comment-32787</guid>
		<description>Hi,

I have a table with columns
distributor_id ,
brand_id,
year,
month,
total_sales


distributor_id ,
brand_id,
year,
month are my primary keys.

I have records for last 3 years od data.

I have distinct records till last year,
Some are till last month (Current month - 1)
some are till feb 2007.......
some are till jan 2007..


Now i want to insert records to all distinct
distributor_id ,
brand_id,
year,
month
Zero  for sales 

where i have to take max month + 1 and hardcode as zero till current month + 10 months.

i appreciate if you get me a insert script without cursors.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I have a table with columns<br />
distributor_id ,<br />
brand_id,<br />
year,<br />
month,<br />
total_sales</p>
<p>distributor_id ,<br />
brand_id,<br />
year,<br />
month are my primary keys.</p>
<p>I have records for last 3 years od data.</p>
<p>I have distinct records till last year,<br />
Some are till last month (Current month &#8211; 1)<br />
some are till feb 2007&#8230;&#8230;.<br />
some are till jan 2007..</p>
<p>Now i want to insert records to all distinct<br />
distributor_id ,<br />
brand_id,<br />
year,<br />
month<br />
Zero  for sales </p>
<p>where i have to take max month + 1 and hardcode as zero till current month + 10 months.</p>
<p>i appreciate if you get me a insert script without cursors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vinay</title>
		<link>http://blog.sqlauthority.com/2007/07/03/sql-server-comparison-similarity-and-difference-temptable-vs-tempvariable/#comment-9965</link>
		<dc:creator>Vinay</dc:creator>
		<pubDate>Tue, 28 Aug 2007 13:18:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/03/sql-server-comparison-similarity-and-difference-temptable-vs-tempvariable/#comment-9965</guid>
		<description>Very good site listing 
I agree with you on all but one comment about using temp tables.
Use temp tables if:
Results set is very large (greater than 100K rows)


I think it is efficient to use staging physical tables if result set is very large.  because of sp recompilation, locks on  tempdb and better use of parallelism</description>
		<content:encoded><![CDATA[<p>Very good site listing<br />
I agree with you on all but one comment about using temp tables.<br />
Use temp tables if:<br />
Results set is very large (greater than 100K rows)</p>
<p>I think it is efficient to use staging physical tables if result set is very large.  because of sp recompilation, locks on  tempdb and better use of parallelism</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2007/07/03/sql-server-comparison-similarity-and-difference-temptable-vs-tempvariable/#comment-4277</link>
		<dc:creator>pinaldave</dc:creator>
		<pubDate>Tue, 03 Jul 2007 17:29:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/03/sql-server-comparison-similarity-and-difference-temptable-vs-tempvariable/#comment-4277</guid>
		<description>Shikanth,

If you read what you have found and it is clearly stated what I have said and it confirms it. They still perform I/O on &lt;b&gt;tempdb&lt;/b&gt;.

&quot;A table variable is created in memory, and so performs slightly better than #temp tables (also because there is even less locking and logging in a table variable). A table variable might still perform I/O to tempdb (which is where the performance issues of #temp tables make themselves apparent), though the documentation is not very explicit about this. &quot;</description>
		<content:encoded><![CDATA[<p>Shikanth,</p>
<p>If you read what you have found and it is clearly stated what I have said and it confirms it. They still perform I/O on <b>tempdb</b>.</p>
<p>&#8220;A table variable is created in memory, and so performs slightly better than #temp tables (also because there is even less locking and logging in a table variable). A table variable might still perform I/O to tempdb (which is where the performance issues of #temp tables make themselves apparent), though the documentation is not very explicit about this. &#8220;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: srikanth</title>
		<link>http://blog.sqlauthority.com/2007/07/03/sql-server-comparison-similarity-and-difference-temptable-vs-tempvariable/#comment-4275</link>
		<dc:creator>srikanth</dc:creator>
		<pubDate>Tue, 03 Jul 2007 16:58:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/03/sql-server-comparison-similarity-and-difference-temptable-vs-tempvariable/#comment-4275</guid>
		<description>I found the link.
http://databases.aspfaq.com/database/should-i-use-a-temp-table-or-a-table-variable.html</description>
		<content:encoded><![CDATA[<p>I found the link.<br />
<a href="http://databases.aspfaq.com/database/should-i-use-a-temp-table-or-a-table-variable.html" rel="nofollow">http://databases.aspfaq.com/database/should-i-use-a-temp-table-or-a-table-variable.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: srikanth</title>
		<link>http://blog.sqlauthority.com/2007/07/03/sql-server-comparison-similarity-and-difference-temptable-vs-tempvariable/#comment-4274</link>
		<dc:creator>srikanth</dc:creator>
		<pubDate>Tue, 03 Jul 2007 16:56:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/03/sql-server-comparison-similarity-and-difference-temptable-vs-tempvariable/#comment-4274</guid>
		<description>You have stated that both temp table and table variable instantiated in tempdb. But I remember reading that table variables are stored in memory. Could you please confirm.</description>
		<content:encoded><![CDATA[<p>You have stated that both temp table and table variable instantiated in tempdb. But I remember reading that table variables are stored in memory. Could you please confirm.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
