<?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>MAXDOP &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/maxdop/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>Sun, 07 Jan 2018 20:15:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>SQL Server: How to configure MAXDOP Parameter (Max Degree of Parallelism)</title>
		<link>https://www.dbrnd.com/2018/01/sql-server-how-to-configure-maxdop-parameter-max-degree-of-parallelism/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Thu, 25 Jan 2018 16:16:37 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Max Degree of Parallelism]]></category>
		<category><![CDATA[MAXDOP]]></category>
		<category><![CDATA[maxdop query hint]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[SSMS]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4175</guid>

					<description><![CDATA[<div><img width="640" height="426" src="https://www.dbrnd.com/wp-content/uploads/2017/09/ParallelProcessing2.jpg" class="attachment-post-image size-post-image wp-post-image" alt="ParallelProcessing2" decoding="async" fetchpriority="high" /></div>SQL Server uses a Maximum Degree of Parallelism (MAXDOP) for achieving the parallel query processing to increase the query execution performance. The default setting of MAXDOP is 0 means your query execution plan chooses the maximum degree of parallelism automatically. Which is OK, but in big transaction system you should limit your query by specifying [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="640" height="426" src="https://www.dbrnd.com/wp-content/uploads/2017/09/ParallelProcessing2.jpg" class="attachment-post-image size-post-image wp-post-image" alt="ParallelProcessing2" decoding="async" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-how-to-configure-maxdop-parameter-max-degree-of-parallelism%2F&amp;linkname=SQL%20Server%3A%20How%20to%20configure%20MAXDOP%20Parameter%20%28Max%20Degree%20of%20Parallelism%29" 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%2F2018%2F01%2Fsql-server-how-to-configure-maxdop-parameter-max-degree-of-parallelism%2F&amp;linkname=SQL%20Server%3A%20How%20to%20configure%20MAXDOP%20Parameter%20%28Max%20Degree%20of%20Parallelism%29" 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%2F2018%2F01%2Fsql-server-how-to-configure-maxdop-parameter-max-degree-of-parallelism%2F&amp;linkname=SQL%20Server%3A%20How%20to%20configure%20MAXDOP%20Parameter%20%28Max%20Degree%20of%20Parallelism%29" 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%2F2018%2F01%2Fsql-server-how-to-configure-maxdop-parameter-max-degree-of-parallelism%2F&amp;linkname=SQL%20Server%3A%20How%20to%20configure%20MAXDOP%20Parameter%20%28Max%20Degree%20of%20Parallelism%29" 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%2F2018%2F01%2Fsql-server-how-to-configure-maxdop-parameter-max-degree-of-parallelism%2F&amp;linkname=SQL%20Server%3A%20How%20to%20configure%20MAXDOP%20Parameter%20%28Max%20Degree%20of%20Parallelism%29" 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%2F2018%2F01%2Fsql-server-how-to-configure-maxdop-parameter-max-degree-of-parallelism%2F&amp;linkname=SQL%20Server%3A%20How%20to%20configure%20MAXDOP%20Parameter%20%28Max%20Degree%20of%20Parallelism%29" 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%2F2018%2F01%2Fsql-server-how-to-configure-maxdop-parameter-max-degree-of-parallelism%2F&#038;title=SQL%20Server%3A%20How%20to%20configure%20MAXDOP%20Parameter%20%28Max%20Degree%20of%20Parallelism%29" data-a2a-url="https://www.dbrnd.com/2018/01/sql-server-how-to-configure-maxdop-parameter-max-degree-of-parallelism/" data-a2a-title="SQL Server: How to configure MAXDOP Parameter (Max Degree of Parallelism)"></a></p><p>SQL Server uses a Maximum Degree of Parallelism (MAXDOP) for achieving the parallel query processing to increase the query execution performance. </p>
<blockquote><p>The default setting of MAXDOP is 0 means your query execution plan chooses the maximum degree of parallelism automatically. </p></blockquote>
<blockquote><p>Which is OK, but in big transaction system you should limit your query by specifying an explicit value of MAXDOP (Number of CPU Core for Parallel Query Execution). Which requires proper analysis of your system loads, CPU configuration and number of concurrent connections.</p></blockquote>
<p>Below are some different ways to change the value MAXDOP.</p>
<p><strong>Using SSMS:</strong></p>
<blockquote><p>In SSMS, right click on server go to Server Properties -> Advanced -> Parallelism -> Max Degree of Parallelism. Default is 0.
</p></blockquote>
<p><strong>Using sp_configure:<br />
</strong></p>
<pre class="crayon-plain-tag">sp_configure 'show advanced options', 1;
GO
RECONFIGURE WITH OVERRIDE;
GO
sp_configure 'max degree of parallelism', 8;
GO
RECONFIGURE WITH OVERRIDE;
GO</pre> </p>
<p><strong>Using MAXDOP hint option at query level:</strong></p>
<pre class="crayon-plain-tag">SELECT *
FROM [Person].[Address]
OPTION (MAXDOP 1)</pre> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server 2016: Introduced MAXDOP with DBCC Commands</title>
		<link>https://www.dbrnd.com/2018/01/sql-server-2016-introduced-maxdop-with-dbcc-commands-dbcc-checkdb-checktable/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Fri, 05 Jan 2018 16:16:56 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Database Crashed]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[DBCC CHECKDB]]></category>
		<category><![CDATA[DBCC CHECKTABLE]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Max Degree of Parallelism]]></category>
		<category><![CDATA[MAXDOP]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4165</guid>

					<description><![CDATA[<div><img width="450" height="180" src="https://www.dbrnd.com/wp-content/uploads/2017/12/SQLServer-Parallel-Processing.gif" class="attachment-post-image size-post-image wp-post-image" alt="SQLServer Parallel Processing" decoding="async" /></div>SQL Server 2016 enhanced the use of DBCC Commands by adding support of MAXDOP. A Max Degree of Parallelism (MAXDOP) is used to define some CPU threads at Server Configuration Level as well as at Query Execution Level. I have read different SQL Forums, and Blogs about the MAXDOP and everyone is saying that the [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="450" height="180" src="https://www.dbrnd.com/wp-content/uploads/2017/12/SQLServer-Parallel-Processing.gif" class="attachment-post-image size-post-image wp-post-image" alt="SQLServer Parallel Processing" decoding="async" loading="lazy" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2016-introduced-maxdop-with-dbcc-commands-dbcc-checkdb-checktable%2F&amp;linkname=SQL%20Server%202016%3A%20Introduced%20MAXDOP%20with%20DBCC%20Commands" 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%2F2018%2F01%2Fsql-server-2016-introduced-maxdop-with-dbcc-commands-dbcc-checkdb-checktable%2F&amp;linkname=SQL%20Server%202016%3A%20Introduced%20MAXDOP%20with%20DBCC%20Commands" 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%2F2018%2F01%2Fsql-server-2016-introduced-maxdop-with-dbcc-commands-dbcc-checkdb-checktable%2F&amp;linkname=SQL%20Server%202016%3A%20Introduced%20MAXDOP%20with%20DBCC%20Commands" 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%2F2018%2F01%2Fsql-server-2016-introduced-maxdop-with-dbcc-commands-dbcc-checkdb-checktable%2F&amp;linkname=SQL%20Server%202016%3A%20Introduced%20MAXDOP%20with%20DBCC%20Commands" 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%2F2018%2F01%2Fsql-server-2016-introduced-maxdop-with-dbcc-commands-dbcc-checkdb-checktable%2F&amp;linkname=SQL%20Server%202016%3A%20Introduced%20MAXDOP%20with%20DBCC%20Commands" 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%2F2018%2F01%2Fsql-server-2016-introduced-maxdop-with-dbcc-commands-dbcc-checkdb-checktable%2F&amp;linkname=SQL%20Server%202016%3A%20Introduced%20MAXDOP%20with%20DBCC%20Commands" 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%2F2018%2F01%2Fsql-server-2016-introduced-maxdop-with-dbcc-commands-dbcc-checkdb-checktable%2F&#038;title=SQL%20Server%202016%3A%20Introduced%20MAXDOP%20with%20DBCC%20Commands" data-a2a-url="https://www.dbrnd.com/2018/01/sql-server-2016-introduced-maxdop-with-dbcc-commands-dbcc-checkdb-checktable/" data-a2a-title="SQL Server 2016: Introduced MAXDOP with DBCC Commands"></a></p><p>SQL Server 2016 enhanced the use of DBCC Commands by adding support of MAXDOP. </p>
<blockquote><p>A Max Degree of Parallelism (MAXDOP) is used to define some CPU threads at Server Configuration Level as well as at Query Execution Level. </p></blockquote>
<blockquote><p>I have read different SQL Forums, and Blogs about the MAXDOP and everyone is saying that the result of MAXDOP is a different basis on your system configuration. </p></blockquote>
<blockquote><p>Yes, it is true 100%. Before using MAXDOP you should check your CPU configuration and load of SQL Server.<br />
Once you have defined MAXDOP, you must check the query execution plan and accordingly you should decide the value of MAXDOP.</p></blockquote>
<blockquote><p>We are running DBCC CHECKDB for repairing the database related issues. If your database size is huge, it requires more CPU/IO.<br />
Now you can add MAXDOP to optimize the task of DBCC commands. </p></blockquote>
<p><strong>DBCC with MAXDOP:</strong></p>
<pre class="crayon-plain-tag">DBCC CHECKDB (AdventureWorks2016CTP3)
WITH MAXDOP = 2;

DBCC CHECKTABLE ('Person.AddressType')
WITH MAXDOP = 2;</pre> </p>
<p><strong>Related Article:</strong></p>
<blockquote class="wp-embedded-content" data-secret="7fpebHftG0"><p><a href="https://www.dbrnd.com/2015/11/sql-server-monitor-and-manage-database-corruption/">SQL Server: Monitor and Manage Database Corruption</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2015/11/sql-server-monitor-and-manage-database-corruption/embed/#?secret=7fpebHftG0" data-secret="7fpebHftG0" width="600" height="338" title="&#8220;SQL Server: Monitor and Manage Database Corruption&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server 2016: Introduced Database Scoped Configuration Options</title>
		<link>https://www.dbrnd.com/2018/01/sql-server-2016-introduced-database-scoped-configuration-options-maxdop-parameter-sniffing-optimizer/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Thu, 04 Jan 2018 16:16:18 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[cardinality]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database plan]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Genetic Query Optimizer]]></category>
		<category><![CDATA[MAXDOP]]></category>
		<category><![CDATA[Parameter Sniffing]]></category>
		<category><![CDATA[scoped configuration]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4186</guid>

					<description><![CDATA[<div><img width="679" height="450" src="https://www.dbrnd.com/wp-content/uploads/2017/12/SQLScope-679x450.jpg" class="attachment-post-image size-post-image wp-post-image" alt="SQLScope" decoding="async" loading="lazy" srcset="https://www.dbrnd.com/wp-content/uploads/2017/12/SQLScope-679x450.jpg 679w, https://www.dbrnd.com/wp-content/uploads/2017/12/SQLScope.jpg 800w" sizes="auto, (max-width: 679px) 100vw, 679px" /></div>SQL Server 2016 introduced Database Scoped Configuration Options that can set at the database level, which was previously available at the instance level only. In SSMS, you can right click on database -> go to -> option -> find Database Scoped Configuration section. It introduced main four parameters, which we can set at the database [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="679" height="450" src="https://www.dbrnd.com/wp-content/uploads/2017/12/SQLScope-679x450.jpg" class="attachment-post-image size-post-image wp-post-image" alt="SQLScope" decoding="async" loading="lazy" srcset="https://www.dbrnd.com/wp-content/uploads/2017/12/SQLScope-679x450.jpg 679w, https://www.dbrnd.com/wp-content/uploads/2017/12/SQLScope.jpg 800w" sizes="auto, (max-width: 679px) 100vw, 679px" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2016-introduced-database-scoped-configuration-options-maxdop-parameter-sniffing-optimizer%2F&amp;linkname=SQL%20Server%202016%3A%20Introduced%20Database%20Scoped%20Configuration%20Options" 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%2F2018%2F01%2Fsql-server-2016-introduced-database-scoped-configuration-options-maxdop-parameter-sniffing-optimizer%2F&amp;linkname=SQL%20Server%202016%3A%20Introduced%20Database%20Scoped%20Configuration%20Options" 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%2F2018%2F01%2Fsql-server-2016-introduced-database-scoped-configuration-options-maxdop-parameter-sniffing-optimizer%2F&amp;linkname=SQL%20Server%202016%3A%20Introduced%20Database%20Scoped%20Configuration%20Options" 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%2F2018%2F01%2Fsql-server-2016-introduced-database-scoped-configuration-options-maxdop-parameter-sniffing-optimizer%2F&amp;linkname=SQL%20Server%202016%3A%20Introduced%20Database%20Scoped%20Configuration%20Options" 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%2F2018%2F01%2Fsql-server-2016-introduced-database-scoped-configuration-options-maxdop-parameter-sniffing-optimizer%2F&amp;linkname=SQL%20Server%202016%3A%20Introduced%20Database%20Scoped%20Configuration%20Options" 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%2F2018%2F01%2Fsql-server-2016-introduced-database-scoped-configuration-options-maxdop-parameter-sniffing-optimizer%2F&amp;linkname=SQL%20Server%202016%3A%20Introduced%20Database%20Scoped%20Configuration%20Options" 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%2F2018%2F01%2Fsql-server-2016-introduced-database-scoped-configuration-options-maxdop-parameter-sniffing-optimizer%2F&#038;title=SQL%20Server%202016%3A%20Introduced%20Database%20Scoped%20Configuration%20Options" data-a2a-url="https://www.dbrnd.com/2018/01/sql-server-2016-introduced-database-scoped-configuration-options-maxdop-parameter-sniffing-optimizer/" data-a2a-title="SQL Server 2016: Introduced Database Scoped Configuration Options"></a></p><p>SQL Server 2016 introduced Database Scoped Configuration Options that can set at the database level, which was previously available at the instance level only.</p>
<blockquote><p>In SSMS, you can right click on database -> go to -> option -> find Database Scoped Configuration section.<br />
It introduced main four parameters, which we can set at the database level. </p></blockquote>
<p><strong>Legacy Cardinality Estimation:</strong> It enables you to configure the query optimizer cardinality estimation model.</p>
<p><strong>MAXDOP:</strong> Maximum degree of parallelism for an individual database.</p>
<p><strong>Parameter Sniffing:</strong> Previously, we can disable this feature using trace flag 4136, but now you can ON/OFF Parameter Sniffing at the database level. </p>
<p><strong>Query Optimizer Fixes: </strong> You can enable or disable query optimization hotfixes.</p>
<p><strong>Clear Database Plan:</strong> It allows clearing procedure cache at the database level without impacting other databases.</p>
<p>SQL Server 2016 also introduced one DMV to check the current value of Database Scoped Configurations.</p>
<pre class="crayon-plain-tag">SELECT *FROM sys.database_scoped_configurations</pre> </p>
<p>Database user requires Scoped Configuration permission to execute ALTER SCOPED CONFIGURATION.</p>
<pre class="crayon-plain-tag">GRANT ALTER ANY DATABASE SCOPED CONFIGURATION to UserName;</pre> </p>
<p><strong>Related T-SQL Scripts:</strong></p>
<p><strong>Clear atabase Plan Cache:</strong></p><pre class="crayon-plain-tag">ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE_CACHE;</pre><p> </p>
<p><strong>Enable Legacy Cardinality Estimation:</strong></p><pre class="crayon-plain-tag">ALTER DATABASE SCOPED CONFIGURATION SET LEGACY_CARDINALITY_ESTIMATION = ON;</pre><p> </p>
<p><strong>Set MAXDOP Value:</strong></p><pre class="crayon-plain-tag">ALTER DATABASE SCOPED CONFIGURATION SET MAXDOP = 3;</pre><p> </p>
<p><strong>Disable Parameter Sniffing:</strong></p><pre class="crayon-plain-tag">ALTER DATABASE SCOPED CONFIGURATION SET PARAMETER_SNIFFING = OFF;</pre><p> </p>
<p><strong>Enable Query Optimizer Fixes:</strong></p><pre class="crayon-plain-tag">ALTER DATABASE SCOPED CONFIGURATION SET QUERY_OPTIMIZER_HOTFIXES = ON;</pre><p> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server: Not Good &#8211; Cost Threshold for Parallelism Default is Five</title>
		<link>https://www.dbrnd.com/2017/11/sql-server-not-good-cost-threshold-for-parallelism-default-is-five/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 29 Nov 2017 16:16:32 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Execution Plan]]></category>
		<category><![CDATA[MAXDOP]]></category>
		<category><![CDATA[parallelism]]></category>
		<category><![CDATA[Query Optimizer]]></category>
		<category><![CDATA[sp_configure]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Error]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tuning]]></category>
		<category><![CDATA[SQL Server Programming]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[threshold]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=6150</guid>

					<description><![CDATA[<div><img width="640" height="426" src="https://www.dbrnd.com/wp-content/uploads/2017/09/ParallelProcessing2.jpg" class="attachment-post-image size-post-image wp-post-image" alt="ParallelProcessing2" decoding="async" loading="lazy" /></div>As per the Microsoft, Use the cost threshold for parallelism option to specify the threshold at which Microsoft SQL Server creates and runs parallel plans for queries. The Cost Threshold for Parallelism parameter is very important for Query Optimizer to prepare the query execution plan. I wrote a title like Not Good &#8211; Because the [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="640" height="426" src="https://www.dbrnd.com/wp-content/uploads/2017/09/ParallelProcessing2.jpg" class="attachment-post-image size-post-image wp-post-image" alt="ParallelProcessing2" decoding="async" loading="lazy" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F11%2Fsql-server-not-good-cost-threshold-for-parallelism-default-is-five%2F&amp;linkname=SQL%20Server%3A%20Not%20Good%20%E2%80%93%20Cost%20Threshold%20for%20Parallelism%20Default%20is%20Five" 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%2F11%2Fsql-server-not-good-cost-threshold-for-parallelism-default-is-five%2F&amp;linkname=SQL%20Server%3A%20Not%20Good%20%E2%80%93%20Cost%20Threshold%20for%20Parallelism%20Default%20is%20Five" 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%2F11%2Fsql-server-not-good-cost-threshold-for-parallelism-default-is-five%2F&amp;linkname=SQL%20Server%3A%20Not%20Good%20%E2%80%93%20Cost%20Threshold%20for%20Parallelism%20Default%20is%20Five" 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%2F11%2Fsql-server-not-good-cost-threshold-for-parallelism-default-is-five%2F&amp;linkname=SQL%20Server%3A%20Not%20Good%20%E2%80%93%20Cost%20Threshold%20for%20Parallelism%20Default%20is%20Five" 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%2F11%2Fsql-server-not-good-cost-threshold-for-parallelism-default-is-five%2F&amp;linkname=SQL%20Server%3A%20Not%20Good%20%E2%80%93%20Cost%20Threshold%20for%20Parallelism%20Default%20is%20Five" 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%2F11%2Fsql-server-not-good-cost-threshold-for-parallelism-default-is-five%2F&amp;linkname=SQL%20Server%3A%20Not%20Good%20%E2%80%93%20Cost%20Threshold%20for%20Parallelism%20Default%20is%20Five" 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%2F11%2Fsql-server-not-good-cost-threshold-for-parallelism-default-is-five%2F&#038;title=SQL%20Server%3A%20Not%20Good%20%E2%80%93%20Cost%20Threshold%20for%20Parallelism%20Default%20is%20Five" data-a2a-url="https://www.dbrnd.com/2017/11/sql-server-not-good-cost-threshold-for-parallelism-default-is-five/" data-a2a-title="SQL Server: Not Good – Cost Threshold for Parallelism Default is Five"></a></p><p>As per the Microsoft, Use the cost threshold for parallelism option to specify the threshold at which Microsoft SQL Server creates and runs parallel plans for queries.</p>
<p>The Cost Threshold for Parallelism parameter is very important for Query Optimizer to prepare the query execution plan.</p>
<blockquote><p>I wrote a title like Not Good &#8211; Because the default value of Cost Threshold for Parallelism is 5 which is very less now a day.</p>
<p>The value you define here which is for query optimizer where it finds a cheaper parallel execution plan, and if it fails to find parallel execution plan in given cost, it chooses the serial execution plan which degrades the query performance.</p>
<p>Now a day, we are dealing with millions/billions of data, so parallel query execution plan is good for big/complex queries so the default value 5 which is a tiny number.</p></blockquote>
<p>The parallel execution plans will give you more suggestion on missing indexes which we can take for further query optimization.</p>
<p><em>I would suggest to change the value of Cost Threshold for Parallelism from 5 to 50 or even more.</em></p>
<p><strong>How to change?</strong></p>
<p><strong>Using Script:</strong></p><pre class="crayon-plain-tag">sp_configure 'show advanced options', 1;
GO
reconfigure;
GO
sp_configure 'cost threshold for parallelism', 50;
GO
reconfigure;
GO</pre><p>
<strong>Using SSMS:</strong></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-6152" src="https://www.dbrnd.com/wp-content/uploads/2017/09/CostThresholdForParallelism.png" alt="Cost Threshold For Parallelism" width="694" height="630" srcset="https://www.dbrnd.com/wp-content/uploads/2017/09/CostThresholdForParallelism.png 694w, https://www.dbrnd.com/wp-content/uploads/2017/09/CostThresholdForParallelism-679x616.png 679w" sizes="auto, (max-width: 694px) 100vw, 694px" /></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server Interview: List out the Best Practices, after installation of SQL Server</title>
		<link>https://www.dbrnd.com/2017/09/sql-server-interview-list-out-the-best-practices-after-installation-of-sql-server/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 06 Sep 2017 16:16:02 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<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[Installation]]></category>
		<category><![CDATA[MAXDOP]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Error]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tuning]]></category>
		<category><![CDATA[SQL Server Programming]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TCP IP]]></category>
		<category><![CDATA[TempDB]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=6036</guid>

					<description><![CDATA[In this post, I am sharing an important interview question which can be asked in SQL DBA interview. You should know at least five good points or practices that you are following after the fresh installation of SQL Server. Please check the below few best practices, and Below is not a complete list so you [&#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%2F09%2Fsql-server-interview-list-out-the-best-practices-after-installation-of-sql-server%2F&amp;linkname=SQL%20Server%20Interview%3A%20List%20out%20the%20Best%20Practices%2C%20after%20installation%20of%20SQL%20Server" 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%2F09%2Fsql-server-interview-list-out-the-best-practices-after-installation-of-sql-server%2F&amp;linkname=SQL%20Server%20Interview%3A%20List%20out%20the%20Best%20Practices%2C%20after%20installation%20of%20SQL%20Server" 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%2F09%2Fsql-server-interview-list-out-the-best-practices-after-installation-of-sql-server%2F&amp;linkname=SQL%20Server%20Interview%3A%20List%20out%20the%20Best%20Practices%2C%20after%20installation%20of%20SQL%20Server" 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%2F09%2Fsql-server-interview-list-out-the-best-practices-after-installation-of-sql-server%2F&amp;linkname=SQL%20Server%20Interview%3A%20List%20out%20the%20Best%20Practices%2C%20after%20installation%20of%20SQL%20Server" 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%2F09%2Fsql-server-interview-list-out-the-best-practices-after-installation-of-sql-server%2F&amp;linkname=SQL%20Server%20Interview%3A%20List%20out%20the%20Best%20Practices%2C%20after%20installation%20of%20SQL%20Server" 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%2F09%2Fsql-server-interview-list-out-the-best-practices-after-installation-of-sql-server%2F&amp;linkname=SQL%20Server%20Interview%3A%20List%20out%20the%20Best%20Practices%2C%20after%20installation%20of%20SQL%20Server" 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%2F09%2Fsql-server-interview-list-out-the-best-practices-after-installation-of-sql-server%2F&#038;title=SQL%20Server%20Interview%3A%20List%20out%20the%20Best%20Practices%2C%20after%20installation%20of%20SQL%20Server" data-a2a-url="https://www.dbrnd.com/2017/09/sql-server-interview-list-out-the-best-practices-after-installation-of-sql-server/" data-a2a-title="SQL Server Interview: List out the Best Practices, after installation of SQL Server"></a></p><p>In this post, I am sharing an important interview question which can be asked in SQL DBA interview. </p>
<p>You should know at least five good points or practices that you are following after the fresh installation of SQL Server.</p>
<p>Please check the below few best practices, and Below is not a complete list so you guys can share more good practices via comments. </p>
<p><strong>Disable Services which are not require</strong></p>
<blockquote><p>For example, If you installed a default SQL Instance and not going to install any other instance, disable the Brower Service.</p></blockquote>
<p><strong>Change the Service mode</strong></p>
<blockquote><p>It is recommended to change the start mode of the SQL Agent so on each server restart; the service will start automatically. </p></blockquote>
<p><strong>Set the Minimum and Maximum Server Memory </strong></p>
<p><strong>Set Auto growth Size for Database</strong></p>
<p><strong>Set database properties for following options</strong></p>
<blockquote><p>Right click on database -> go to properties -> Options<br />
Auto Close &#8211; False<br />
Auto Create Statistics &#8211; True<br />
Auto Shrink &#8211; False<br />
Auto Update Statistics &#8211; True<br />
Auto Update Statistics Asynchronously &#8211; True</p></blockquote>
<p><strong>Change the default storage location of TempDB and set in another disk </strong></p>
<p><strong>Change the default Index Fill Factor</strong></p>
<blockquote><p>Open SSMS -> Right click on SQL Server Instance -> Go to properties -> Database Settings -> Change Default Index Fill Factor<br />
Default Index Fill Factor is 0 or 100, means full. If your system is generating more OLTP transactions, you should set it between 80 to 90</p></blockquote>
<p><strong>Configure Processor for MAXDOP to achieve the parallel processing</strong></p>
<blockquote><p>Open SSMS -> Right click on SQL Server Instance -> Go to properties -> Advanced -> Change Max Degree of Parallelism</p></blockquote>
<p><strong>Change the SQL Database default locations</strong></p>
<blockquote><p>Open SSMS -> Right click on SQL Server Instance -> Go to properties -> Database Settings -> Change Database default locations</p></blockquote>
<p><strong>Change Remote Query Timeout</strong></p>
<blockquote><p>Open SSMS -> Right click on SQL Server Instance -> Go to properties -> Connections<br />
The default wait is 600, you can set to 5 or 8 minutes.</p></blockquote>
<p><strong>Configure SQL Server Network</strong></p>
<blockquote><p>Open SQL Server Configuration Manager and check for SQL Server Network Configuration<br />
Enable the TCP/IP protocol</p></blockquote>
<p><strong>Change the password of SA user</strong></p>
<blockquote><p>Remove the BUILTIN\Administrators group from the SQL Server Logins</p></blockquote>
<p><strong>Check the Server Authentication Mode and enable C2 Audit tracing</strong></p>
<blockquote><p>Open SSMS -> Right click on SQL Server Instance -> Go to properties -> Security<br />
C2 audit is used to trace all the user activities like SQL Commands, Login, Logout, and server events</p></blockquote>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
