<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Temp db Performance &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/temp-db-performance/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Mon, 20 Feb 2017 19:59:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>SQL Server: Create index on large Temp Tables</title>
		<link>https://www.dbrnd.com/2017/02/sql-server-create-index-on-large-temp-tables-clustered-non-clustered-index/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 26 Feb 2017 16:16:02 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tuning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[Temp db Performance]]></category>
		<category><![CDATA[Temp Table]]></category>
		<category><![CDATA[TempDB]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4198</guid>

					<description><![CDATA[I have given one assignment to a database developer team for preparing general database development practices. I have found one point in that document: &#8220;Do not create Indexes on Temp Tables&#8221;. The use of Temp Tables is very common in SQL Server. Most of the SQL database developers are storing their data into temp tables. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-create-index-on-large-temp-tables-clustered-non-clustered-index%2F&amp;linkname=SQL%20Server%3A%20Create%20index%20on%20large%20Temp%20Tables" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-create-index-on-large-temp-tables-clustered-non-clustered-index%2F&amp;linkname=SQL%20Server%3A%20Create%20index%20on%20large%20Temp%20Tables" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-create-index-on-large-temp-tables-clustered-non-clustered-index%2F&amp;linkname=SQL%20Server%3A%20Create%20index%20on%20large%20Temp%20Tables" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-create-index-on-large-temp-tables-clustered-non-clustered-index%2F&amp;linkname=SQL%20Server%3A%20Create%20index%20on%20large%20Temp%20Tables" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-create-index-on-large-temp-tables-clustered-non-clustered-index%2F&amp;linkname=SQL%20Server%3A%20Create%20index%20on%20large%20Temp%20Tables" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-create-index-on-large-temp-tables-clustered-non-clustered-index%2F&amp;linkname=SQL%20Server%3A%20Create%20index%20on%20large%20Temp%20Tables" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-create-index-on-large-temp-tables-clustered-non-clustered-index%2F&#038;title=SQL%20Server%3A%20Create%20index%20on%20large%20Temp%20Tables" data-a2a-url="https://www.dbrnd.com/2017/02/sql-server-create-index-on-large-temp-tables-clustered-non-clustered-index/" data-a2a-title="SQL Server: Create index on large Temp Tables"></a></p><p><em>I have given one assignment to a database developer team for preparing general database development practices.<br />
I have found one point in that document: &#8220;Do not create Indexes on Temp Tables&#8221;.</em></p>
<p>The use of Temp Tables is very common in SQL Server. Most of the SQL database developers are storing their data into temp tables.<br />
Let me, explore something about, the best practices of Temp Tables. </p>
<blockquote><p>In general advice, we should avoid the use of temp tables because it requires more CPU/IO while accessing the TempDB.<br />
When you are storing data into temp tables, it stores in TempDB files means the physical disk operation is involved.</p></blockquote>
<blockquote><p>Like any other regular table, temp table also requires disk space to store temporary data and other resources for manipulation.</p></blockquote>
<blockquote><p>I have seen that many developers are saving a significant number of records in Temp Tables and they are not thinking even for Indexing on Temp Tables.</p></blockquote>
<blockquote><p>If you don&#8217;t know, please note: You can create a Clustered and Non-Clustered Indexes on Temp Tables which improves your query performance.</p></blockquote>
<blockquote><p>Again, more indexes will create more problems because it needs space and manipulation.<br />
First, you should analyze the volume of data, execution plan and accordingly you should apply indexes on Temp tables.</p></blockquote>
<blockquote><p>Personally, I have checked the performance of Temp Tables with Clustered Index, which is much better than Temp Table without an Indexes. </p></blockquote>
<p><em>I am rejecting all comments and points which say that &#8221; we should not apply Indexes on Temp Tables. &#8220;</em></p>
<blockquote class="wp-embedded-content" data-secret="BbyB9dqjyi"><p><a href="https://www.dbrnd.com/2016/02/sql-server-difference-between-temporary-table-and-table-variable/">SQL Server: Difference between Temporary Table and Table Variable</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/02/sql-server-difference-between-temporary-table-and-table-variable/embed/#?secret=BbyB9dqjyi" data-secret="BbyB9dqjyi" width="600" height="338" title="&#8220;SQL Server: Difference between Temporary Table and Table Variable&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
