<?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>Performance Tuning - Techyaz.com</title>
	<atom:link href="https://techyaz.com/category/sql-server/performance-tuning/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>Tips, Tutorials and How-to Topics</description>
	<lastBuildDate>Sat, 12 Jun 2021 09:39:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>

<image>
	<url>https://techyaz.com/wp-content/uploads/2017/11/cropped-Site-icon-150x150.png</url>
	<title>Performance Tuning - Techyaz.com</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Fix SQL Server Error 802: There is insufficient memory available in the buffer pool.</title>
		<link>https://techyaz.com/sql-server/fix-sql-server-error-802-insufficient-memory-in-buffer-pool/</link>
					<comments>https://techyaz.com/sql-server/fix-sql-server-error-802-insufficient-memory-in-buffer-pool/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Sat, 12 Jun 2021 09:37:54 +0000</pubDate>
				<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Memory Issues]]></category>
		<category><![CDATA[performance tuning]]></category>
		<guid isPermaLink="false">https://techyaz.com/?p=2533</guid>

					<description><![CDATA[<p>We receive SQL Server error 802 when buffer pool of SQL Server instance is full and cannot grow further. Here, i will discuss about this error 802 insufficient memory available in the buffer pool in this article along with its&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/fix-sql-server-error-802-insufficient-memory-in-buffer-pool/">Fix SQL Server Error 802: There is insufficient memory available in the buffer pool.</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>We receive SQL Server error 802 when buffer pool of SQL Server instance is full and cannot grow further. Here, i will discuss about this <em>error 802 insufficient memory available in the buffer pool</em> in this article along with its possible solution to fix it. Below is the error text you might get on your SQL Server system. </p>



<p><span class="has-inline-color has-luminous-vivid-orange-color">SQLServer Error: 802, There is insufficient memory available in the buffer pool. [SQLSTATE 42000]</span></p>



<h2 class="wp-block-heading"><span style="color:#170ce9" class="has-inline-color">SQL Server Error 802 &#8211; Insufficient Memory Available in the Buffer Pool</span></h2>



<p>The main reason behind getting SQL Server error 802 is your SQL Server instance is under memory pressure and there is not enough memory available to allocate further to buffer pool or buffer pool is restricted to not use memory beyond a certain limit. This might be because of various reasons as i have stated in below section. One of the very easy and straight forward approach to fix this error is to increase more memory to SQL Server system and modify max server memory in SQL Server accordingly.</p>



<h2 class="wp-block-heading"><span style="color:#170ce9" class="has-inline-color">Analysis &amp; Solution</span></h2>



<p>I would suggest to go deeper in this issue before taking any decision to allocate more memory to the system where SQL Server is running. There could be multiple temporary reasons as well which can cause SQL Server to generate below error log:</p>



<p><em><strong>SQL Server Error: 802, There is insufficient memory available in the buffer pool. [SQLSTATE 42000]</strong></em></p>



<p>Let&#8217;s discuss this issue further and ensure to not forget below points before taking any decisions.</p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<ol class="wp-block-list"><li>Check system memory utilization and see if other application (not SQL Server) is not taking enough memory. Try to fix it why a particular application is taking more memory.</li><li>Make sure you have allocated enough memory in min server memory &amp; max server memory setting. You can get these setting by executing <em><strong>sp_configure</strong></em> stored procedure. Sometimes, our server has enough memory but we missed to allocate appropriate memory to SQL Server. Rule is to allocate 80% of server memory to SQL Server under max server memory setting.</li><li>Ensure to <a href="https://techyaz.com/sql-server/enable-lock-pages-in-memory-sql-server/" target="_blank" rel="noreferrer noopener"><strong>enabled Lock Pages in memory</strong></a> on your SQL Server Instance.</li><li>Validate SQL Server version and Ensure you haven&#8217;t exceeded SQL Server edition limits. Like suppose you are running with SQL Server 2012 standard edition which allows only 64 GB of RAM support and if you have allocated more than 64GB RAM then it will not be useful. Either reduce the max server memory setting to 64 or upgrade your SQL Server to leverage bigger chunk of memory utilization. </li><li>Observe your SQL Server workload. Are you getting this error during a specific time frame or operations? Or Are you getting this error when some job or number of adhoc transactions are increased? Gather these details with the help of memory clerks and DBCC MEMORYSTATUS T-SQL statements. Tune your quires and ensure to not run ad hoc queries in large numbers because their plan is not saved in cache and they have to generate sql plan every time you execute them.</li><li>Collect Memory related counters like SQL Server: Buffer Manager, SQL Server: Memory Manager, Page Life Expectancy etc. You can read attached article to understand <a href="https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/" target="_blank" rel="noreferrer noopener"><strong>Top 10 counters to identify memory pressure</strong></a>.</li><li>Review another sp_configure setting min memory per query.</li><li>You can try clearing cache by running below DBCC commands:<ul><li>DBCC FREESYSTEMCACHE</li><li>DBCC FREESESSIONCACHE</li><li>DBCC FREEPROCCACHE</li></ul></li></ol>



<p>If you still have memory pressure after analyzing and implementing solutions given in above section then you have only two options left and this is given below:</p>



<ol class="wp-block-list"><li>Increase Server memory and accordingly increase max server memory in sp_configure</li><li>Reduce your workload on this SQL Server Instance by offloading or segregating the transactions during off peak hours.</li></ol>
</div></div>



<p>Please comment us about your issue experience and let me know how you have fixed your issue.</p>



<p><em><strong><span class="has-inline-color has-vivid-red-color">Related Articles</span></strong></em><strong><em><span class="has-inline-color has-vivid-red-color">:</span></em></strong></p>



<ul class="wp-block-list"><li><a href="https://techyaz.com/sql-server/performance-tuning/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/" target="_blank" rel="noreferrer noopener">How to Fix SQL Server Error 701: There is insufficient system memory to run this query</a></li><li><a href="https://techyaz.com/sql-server/understanding-hybrid-buffer-pool-in-sql-server/" target="_blank" rel="noreferrer noopener">Understanding Hybrid Buffer Pool in SQL Server</a></li><li><a href="https://techyaz.com/interview-questions/sql-server-interview-questions/sql-server-dba-interview-questions-answers/" target="_blank" rel="noreferrer noopener">SQL Server Interview Questions &amp; Answers</a></li></ul>
<p>The post <a href="https://techyaz.com/sql-server/fix-sql-server-error-802-insufficient-memory-in-buffer-pool/">Fix SQL Server Error 802: There is insufficient memory available in the buffer pool.</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/fix-sql-server-error-802-insufficient-memory-in-buffer-pool/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Top Perfmon Counters to Identify SQL Server CPU Bottleneck</title>
		<link>https://techyaz.com/sql-server/performance-tuning/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/</link>
					<comments>https://techyaz.com/sql-server/performance-tuning/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Tue, 01 May 2018 13:39:32 +0000</pubDate>
				<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[bulk import performance]]></category>
		<category><![CDATA[Perfmon Counters]]></category>
		<category><![CDATA[Perfmon CPU Counters]]></category>
		<category><![CDATA[performance tuning]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2203</guid>

					<description><![CDATA[<p>We should always monitor system resource utilization of our database servers and make sure that these utilizations should not exceed the benchmark ranges of our environment. Today, I will explain about monitoring top perfmon counters for CPU usage. If your&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/">Top Perfmon Counters to Identify SQL Server CPU Bottleneck</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We should always monitor system resource utilization of our database servers and make sure that these utilizations should not exceed the benchmark ranges of our environment. Today, I will explain about monitoring top perfmon counters for CPU usage. If your database server is continuously showing high CPU usage that means you need to look in to top perfmon counters to identify SQL Server CPU bottleneck. You can monitor these performance counter values to detect the CPU pressure.</p>
<p>I have already explained top performance counters to detect Memory and Disk IO bottlenecks in SQL Server in my last articles. Have a look at them (attached below) to get Memory and Disk IO related performance counters and their ideal values for healthy system.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/top-10-performance-counters-to-identify-sql-server-memory-pressure/" target="_blank" rel="noopener">Top 10 Performance Counters to Identify SQL Server Memory Pressure</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/" target="_blank" rel="noopener">Identify Disk Bottleneck in SQL Server using Perfmon Disk Counters</a></strong></li>
</ul>
<p>Generally, CPU bottleneck arises because of either your system has not enough CPUs to process current workload or your transactions or applications are poorly designed that causes the high CPU. To deal with SQL Server CPU pressure, we need to either find the high CPU intensive queries and optimize them or increase the total CPU counts of the database server to handle current workload. There can be multiple reasons for high CPU usage like high recompilations of SQL Queries, OS issues, Query design issues: Sorting Joins, Poor Indexes, Condition Clauses etc. Here, I am going to explain about top perfmon counters to identify SQL Server CPU bottleneck.</p>
<h3><span style="color: #333399;">Perfmon Counters for CPU Usage</span></h3>
<p><img fetchpriority="high" decoding="async" class="size-full wp-image-2204 alignright" src="http://techyaz.com/wp-content/uploads/2018/05/Top-Perfmon-Counters-for-CPU-Usage.png" alt="Top Perfmon Counters for CPU Usage" width="300" height="300" srcset="https://techyaz.com/wp-content/uploads/2018/05/Top-Perfmon-Counters-for-CPU-Usage.png 300w, https://techyaz.com/wp-content/uploads/2018/05/Top-Perfmon-Counters-for-CPU-Usage-150x150.png 150w, https://techyaz.com/wp-content/uploads/2018/05/Top-Perfmon-Counters-for-CPU-Usage-160x160.png 160w, https://techyaz.com/wp-content/uploads/2018/05/Top-Perfmon-Counters-for-CPU-Usage-320x320.png 320w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p>Here, I am going to describe about perfmon counters for CPU usage in SQL Server. Ideally, first we should start with looking at CPU usage in Windows Task Manager. If the CPU utilization is continuously going beyond 85%, it means your system is facing CPU bottleneck. Find the list of performance counters to identify SQL Server CPU bottleneck.</p>
<h5><span style="color: #993300;">Processor: % Processor Time </span></h5>
<p>One of the very useful CPU perfmon counter for SQL Server is <em>Processor: % Processor Time.</em> This counter displays the percentage of time CPU spends executing a thread that is not idle. If your system is frequently reaching beyond 85% then it means your system is facing CPU bottleneck. The acceptable value for this counter should be less than 50%.</p>
<h5><span style="color: #993300;">Processor: % User Time</span></h5>
<p>Windows operating system has two modes of processing for any process. One is Kernel mode another one is user mode. This counter shows the percentage of time a process spends executing user processes like SQL Server. If this counter is high it means CPU pressure is because of SQL Server or because of user applications. You should focus to retrieve CPU intensive queries to get the culprit transactions that are causing high CPU pressure. There is no idle value for this counter. You should benchmark each system based on your workload.</p>
<h5><span style="color: #993300;">Processor: % Privilege Time</span></h5>
<p>This counter shows the percentage of time the processor spends on execution of Microsoft Windows kernel commands, such as processing of SQL Server I/O requests. This counter captures the information about kernel mode and indicates towards poor performance of disk subsystems. Monitor DISK IO related performance counters to identify DISK IO bottleneck and if possible, consider installing a faster or more efficient disk subsystem.</p>
<h5><span style="color: #993300;">Processor: % Interrupt Time</span></h5>
<p>This counter <em>Processor: % Interrupt Time </em>tells about the time a processor spends receiving and servicing hardware interruptions during specific sample intervals. This counter indicates a possible hardware issue if the value is greater than 15 percent.</p>
<h5><span style="color: #993300;">System: Processor Queue Length</span></h5>
<p>This is an important perfmon counter to detect CPU bottleneck. This counter gives information about the number of threads waiting for processor time. If value of this counter is greater than zero then this is a sign of CPU bottleneck. We can further check <em>Compilations/sec</em> and <em>Re-Compilations/sec</em>. A high number of compilations and recompilations usually indicates poor reuse of the query plans. This can be fixed by optimizing your queries and stored procedures.</p>
<h5><span style="color: #993300;">System: Calls/sec</span></h5>
<p>Any system would have either software calls or application related calls or hardware related calls. This counter<em> System: Calls/sec</em> metric shows the number of software calls to the operating system service routines per second. Similarly, another CPU perform counter <em>Processor: Interrupts/Sec</em> shows the number of hardware calls to the processor. Both perfmon counters can be used to determine the source of the performance issues. The acceptable values for <em>System: Calls/sec</em> are under 20,000. Higher values might indicate excessive operating system activity caused by software applications.</p>
<h5><span style="color: #993300;">Context Switches/sec</span></h5>
<p>Context Switches occurs when kernel switches processor from one thread to another<em>. </em>The acceptable <em>Context Switches/sec</em> value should be less than 2,000 per processor. If you are observing constant high values of <em>Context Switches/sec</em> and <em>Processor: % Processor Time</em> on your system then this would be a clear sign of processor bottlenecks. Permanent solution to reduce CPU bottleneck is to change the processor to a more powerful one, or add an additional to existing ones.</p>
<p>You might have seen high <em>Context Switches/sec</em> values for systems that are running with multiple SQL Server instances or a system that is hosted other applications along with SQL Server.</p>
<p>Here I have described top perfmon counters for CPU usage on your database server. I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><em><strong><span style="color: #800000;">Read More:</span></strong></em></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/performing-online-index-rebuild-operation/" target="_blank" rel="noopener">Disk and Performance Impact of running Online Index Rebuild Operation</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/avoid-database-shrink-operation/" target="_blank" rel="noopener">Understanding Database Shrink Operation and Why should you Avoid it?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/" target="_blank" rel="noopener">Fix Error 701: There is Insufficient System Memory to Run this Query</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/improve-sql-server-bulk-data-import-performance/" target="_blank" rel="noopener">How to Improve Bulk Data Load Performance?</a></strong></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/">Top Perfmon Counters to Identify SQL Server CPU Bottleneck</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/performance-tuning/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Top 10 Performance Counters to Identify SQL Server Memory Pressure</title>
		<link>https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/</link>
					<comments>https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Mon, 30 Apr 2018 11:52:11 +0000</pubDate>
				<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Wait Types]]></category>
		<category><![CDATA[Memory Issues]]></category>
		<category><![CDATA[Perfmon Counters]]></category>
		<category><![CDATA[Perfmon Memory Counters]]></category>
		<category><![CDATA[performance tuning]]></category>
		<category><![CDATA[SQL_Server_Memory_Management]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2196</guid>

					<description><![CDATA[<p>Memory is one of the important system resource that SQL Server uses to process their transactions. Sometimes, your server might face memory bottleneck that reduces the performance of running transactions. Here, I will explain top 10 performance counters to identify&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/">Top 10 Performance Counters to Identify SQL Server Memory Pressure</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Memory is one of the important system resource that SQL Server uses to process their transactions. Sometimes, your server might face memory bottleneck that reduces the performance of running transactions. Here, I will explain top 10 performance counters to identify SQL Server memory pressure or memory bottleneck. If your system is facing insufficient system memory then i would recommend you to read below article.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/" target="_blank" rel="noopener">Fix SQL Server Error 701: There is Insufficient System Memory to Run this Query</a></strong></li>
</ul>
<p>We can use Windows PerfMon utility to gather current values of all given performance counters. Just type <em>perfmon</em> in <em>run</em> prompt to launch perfmon tool to gather memory related performance counters. Although, Microsoft has also given a DMV related to performance counters that is very useful in collecting data and detecting CPU, IO or memory bottleneck in SQL Server. You can run below command to get all performance counters and their respective values using DMV <em>sys.dm_os_performance_counters</em>. You can also use this DMV to get performance counter values to identify memory pressure in SQL Server.</p>
<pre><strong><span style="color: #0000ff;">Select * from sys.dm_os_performance_counters</span></strong></pre>
<p>By default, SQL Server changes its memory requirements dynamically, on the basis of available system resources. I have explained SQL Server Memory Management and how SQL Server allocated memory to their transactions in below attached article.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-memory-allocation-min-max-server-memory-configuration/" target="_blank" rel="noopener">SQL Server Memory Allocation &amp; Role of MIN/MAX Server Memory Configuration</a></strong></li>
</ul>
<h3><span style="color: #333399;">Performance Counters to Identify SQL Server Memory Pressure</span></h3>
<p>Let’s discuss top perfmon counters for memory usages to identify its bottleneck. Below is the list of top 10 performance counters to identify SQL Server Memory pressure. If you want to read CPU and Disk IO related perfmon counters then i would suggest you to read below attached articles.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/" target="_blank" rel="noopener">Top Perfmon Counters to Identify SQL Server CPU Bottleneck</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/" target="_blank" rel="noopener">Identify Disk Bottleneck in SQL Server using Perfmon Disk Counters</a></strong></li>
</ul>
<h5><span style="color: #993300;">Memory: Available Bytes</span></h5>
<p>First thing you should look at in case of memory bottleneck in SQL Server is the available memory that can be used by processes. You can get this value by looking at the counter <em>Available Bytes</em> under object <em>Memory</em>. Low value of this counter shows the memory shortage on this server.  Now, you should focus behind the reason of this memory shortage. There might be possibility that some of your applications running on your server are not releasing memory or your system has not enough memory to perform current workload that leads to the memory bottleneck in SQL Server.</p>
<h5><span style="color: #993300;">Memory: Pages/sec</span></h5>
<p>This counter indicates the total number of pages that are either read from disk or written to the disk due to page fault. When a process requests a data page that is not in memory then it will be retrieved from disk to memory. This process is known is page fault. High value of this counter could indicate the excessive paging. We should further monitor Memory: Page Faults/sec counter to go indepth information. The average <em>Pages/sec</em> value should be below 50. A high value of <em>Pages/sec</em> indicates intensive memory activities like read from and write to disk. It means transactions are getting enough memory that is why they are using disk to process their requests.</p>
<h5><span style="color: #993300;">Memory: Page Faults/sec</span></h5>
<p>High value of counter <em>Memory: Pages/sec</em> could indicate the excessive paging. Next, we should monitor the <em>Memory: Page Faults/sec</em> counter to make sure that the disk activity is not caused by paging. If you want to determine whether SQL Server or another process is causing excessive paging then we should monitor the <em>Process: Page Faults/sec</em> counter for the SQL Server process instance. This will give an exact picture whether SQL Server is causing this paging issue or not.</p>
<h5><span style="color: #993300;">Process: Working Set</span></h5>
<p>This counter shows the amount of memory a process can use. This counter value shows whether you have set optimum value in <em>min server memory</em> and <em>max server memory</em> configuration or not. If this value shows constantly below <em>min server memory</em> and <em>max server memory</em> then you have configured too much memory for your SQL Server.</p>
<h5><span style="color: #993300;">SQL Server: Buffer Manager: Buffer Cache Hit Ratio</span></h5>
<p>This is very important counter and this counter shows the number of percentage that has been satisfied using data cache. Suppose the value of buffer cache hit ratio for your server is 94 it means 94% of total requests for data have been processed using data cache.</p>
<p>The ideal value for this counter is more than 90. Higher the value better the memory health.</p>
<h5><span style="color: #993300;">SQL Server: Buffer Manager: Page Life Expectancy</span></h5>
<p>Page Life Expectancy is very important counter to measure memory pressure for your system. THis counter indicates the average number of seconds a data page to remain in cache. Ideally, we have read multiple blogs to consider 300 or more as acceptable value but this value varies depending on your system configuration.</p>
<p>The ideal value is more than 300 but always compare this value with your system configuration. Higher the better concept is also applying here.</p>
<h5><span style="color: #993300;">SQL Server: Buffer Manager: Free List Stalls/sec</span></h5>
<p>This counter also shows a sign of memory pressure or insufficient memory on your server. This displays the number of requests per second where data requests stall because there are no buffers available. Any value greater than two indicates that SQL Server needs more memory.</p>
<h5><span style="color: #993300;">SQL Server: Buffer Manager: Lazy Writes/sec</span></h5>
<p>This counter tells about total number of Lazy writer performed in a second.  It means total number of times Lazy Writer process moves dirty pages from the buffer to disk. A lower number is better than a higher number. If value of this counter shows higher value continuously more than 20, then we need to add more memory to the system or we should think about optimizing memory intensive operations.</p>
<h5><span style="color: #993300;">SQL Server: Buffer Manager: Checkpoint Pages/sec</span></h5>
<p>This counter monitors the number of dirty pages per second, which are flushed to disk when SQL Server invokes the checkpoint process. High values for this counter may indicate memory pressure or insufficient memory.</p>
<h5><span style="color: #993300;">SQL Server: Memory Manager: Memory Grants Pending</span></h5>
<p>This counter shows the number of processes waiting for memory grant per second. Any value higher than zero indicates a lack of memory. We can also get this information by using a DMV sys.dm_exec_query_memory_grants. Those processes who are waiting to be granted the required memory will show you waiting with RESOURCE_SEMAPHORE wait type. I have explained about resource semaphore wait type in below attached article.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/resource_semaphore-wait-type/" target="_blank" rel="noopener">Fix RESOURCE_SEMAPHORE Wait Type in SQL Server</a></strong></li>
</ul>
<p>Here, I have described top 10 performance counters to identify SQL Server memory pressure on your database server. I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><em><strong><span style="color: #800000;">Read More:</span></strong></em></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/sql-server-encountered-32-occurrences-requests-taking-longer-15-seconds-complete/" target="_blank" rel="noopener">Fix Error 833: SQL Server has encountered 32 occurrences of I/O requests taking longer than 15 seconds to complete.</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/performing-online-index-rebuild-operation/" target="_blank" rel="noopener">Disk and Performance Impact of running Online Index Rebuild Operation</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/async_io_completion-wait-type/" target="_blank" rel="noopener">Understanding ASYNC_IO_COMPLETION Wait Type</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/">Top 10 Performance Counters to Identify SQL Server Memory Pressure</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server Error 701: There is Insufficient System Memory to Run this Query</title>
		<link>https://techyaz.com/sql-server/performance-tuning/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/</link>
					<comments>https://techyaz.com/sql-server/performance-tuning/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Sat, 28 Apr 2018 11:13:42 +0000</pubDate>
				<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[bulk import performance]]></category>
		<category><![CDATA[Memory Issues]]></category>
		<category><![CDATA[Perfmon Counters]]></category>
		<category><![CDATA[performance tuning]]></category>
		<category><![CDATA[SQL_Server_Memory_Management]]></category>
		<category><![CDATA[Waittypes]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2180</guid>

					<description><![CDATA[<p>Today I am going to discuss SQL Server memory issues that your database Instance might face during bulk data load or during any memory intensive operations. You may also face insufficient memory issue when you try to execute numerous queries&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/">SQL Server Error 701: There is Insufficient System Memory to Run this Query</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Today I am going to discuss SQL Server memory issues that your database Instance might face during bulk data load or during any memory intensive operations. You may also face insufficient memory issue when you try to execute numerous queries on large data sets at the same time in SQL Server. In such circumstances, SQL Server throws error 701 or error 802 with error text “<em>There is insufficient system memory to run this query</em>.” Full error descriptions for both error codes are given below.</p>
<p><em><span style="color: #ff0000;">Error 701, Severity: 17, State: 193.</span></em><br />
<em><span style="color: #ff0000;"> There is insufficient system memory to run this query.</span></em></p>
<p>Or</p>
<p><em><span style="color: #ff0000;">Error 802, Severity: 17, State: 20</span></em><br />
<em><span style="color: #ff0000;"> There is insufficient memory available in the buffer pool.</span></em></p>
<h3><span style="color: #333399;">Error 701 or Error 802: Root Cause</span></h3>
<p>If SQL Server is running out of memory and has no more memory available to allocate to its transactions then it will generate SQL Server memory error 701 or error 802. SQL Server Memory pressure or insufficient memory issue can be raised due to huge data load or other memory intensive operations.</p>
<p>We should check <em>DBCC MEMORYSTATUS</em> output to get latest snapshot of current memory status of the SQL Server. This command is very useful in troubleshooting memory issues in SQL Server. You might even have failed to run this DBCC command because system does not have enough memory. You need to reduce some memory pressure by stopping or killing some processes and then try to run this command to gather in depth information about SQL Server memory state.</p>
<p>The transaction that failed due to memory pressure and generates error 701 or error 802 might be or might not be the cause of this error. We should analyze the trends to reach on any conclusion.</p>
<h3><span style="color: #333399;">Solution</span></h3>
<p>There are mainly two reasons behind getting SQL Server memory issues for most of the SQL Server systems. Either your server has less memory to handle the current day to day workload or you are running some of the adhoc transactions that will require more memory for their execution like huge bulk data load, complex reports etc. If your SQL Server is running with insufficient memory during day to day activities then you should seriously evaluate the total workload and propose optimum memory size that can handle your current workload.</p>
<p>If you are planning to run any heavy ad hoc transaction then you should temporary increase the memory that can handle the transaction smoothly or you should run such transactions on a server that are built to handle such loads. You should also consider to reduce the batch size that is optimum for your system.</p>
<p>SQL Server is memory intensive application. We need to plan memory sizing for a server after proper evaluation of server state and overall load that will run on that SQL Server instance. But if you are facing memory issue on one of your SQL Server then first we need to troubleshoot it and find the root cause of this memory pressure. Here I am giving you step by step method to find the actual culprit that are causing the memory issue and possible solutions that can reduce some memory overheads.</p>
<p>First Make sure your SQL Server instance is running on dedicated server and not with other applications. If other applications are also using your database server then make sure they are not eating most of the memory. And, If most of the system memory is taken by other applications then you need to seriously think about migrating those application from this database server.</p>
<p>If you cannot migrate these applications to another server then workaround for such issues are to allocate the maximum memory value to your SQL Server instance. You can do it either by using sp_configure or using GUI. Read attached article to change max memory value for your SQL Server instance.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-memory-allocation-min-max-server-memory-configuration/" target="_blank" rel="noopener">Understanding SQL Server Memory Allocation and Role of MIN/MAX Server Memory Configuration</a></strong></li>
</ul>
<p>Next thing you should check is the server memory configuration. Check below SQL Server memory configuration parameters:</p>
<ul>
<li>max server memory</li>
<li>min server memory</li>
<li>min memory per query</li>
</ul>
<p>Notice any unusual settings and fix them as necessary. All above three options have been covered in detain in above attached article.</p>
<p>Now, check the workload in terms of number of concurrent sessions, currently executing queries along with their memory grants. You should also focus on SQL Server transactions that are seeking huge memory values. Look at the transactions and gather a report for high memory intensive operations. Evaluate them and if possible optimize them so that they can take minimum memory.</p>
<ul>
<li><a href="http://techyaz.com/sql-server/resource_semaphore-wait-type/" target="_blank" rel="noopener"><strong>Understanding Memory Wait type Resource_SEMAPHORE and how to fix it?</strong></a></li>
</ul>
<p>You can also run below DBCC commands to free several SQL Server memory caches. This will also help you and make some relief for your current running transactions but in longer run it will not help if your system will need more memory to proceed the transactions.</p>
<ul>
<li>DBCC FREESYSTEMCACHE</li>
<li>DBCC FREESESSIONCACHE</li>
<li>DBCC FREEPROCCACHE</li>
</ul>
<p>Another effective way to look in to memory status is by getting the output of DBCC MEMORYSTATUS command. You would get a good starting point to look in to culprit memory consumers.</p>
<p>We can also start collecting performance monitor counters for memory. Perfmon counters like the value of <em>SQL Server: Buffer Manager\Buffer Cache Hit Ratio, SQL Server: Memory Manager and Page Life Expectancy</em> will be very helpful in identifying memory pressure on SQL Server system. Analyze the trend for these counters and then decide whether issue is coming during some specific operations or system is continuously facing memory pressure.</p>
<p>Based on these analyses you can choose to either increase the system memory, increase the SQL Server memory allocation or reschedule some of the memory specific transactions to the off hours when load is minimum on the system. You can also reduce the batch size of the transaction to reduce the memory pressure. This will be certainly helpful in troubleshooting memory issues.</p>
<p>It is not necessary that your transactions are poorly designed always that is why SQL Server is taking lot of memory to process it. Sometimes even our systems on which SQL Server runs might have problem that end up with memory pressure. So you should consider all these points while fixing any performance issue.<br />
I hope you like this article. Please follow us on our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><em><strong><span style="color: #800000;">Read More:</span></strong></em></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-dmvs/4-different-usages-dbcc-sqlperf-sql-server/" target="_blank" rel="noopener">4 Usages of DBCC SQLPERF in SQL Server</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/manage-transaction-log-file-during-data-load/" target="_blank" rel="noopener">Manage Transaction Log File during Bulk Data Load</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/improve-sql-server-bulk-data-import-performance/" target="_blank" rel="noopener">How to Improve Bulk Data Load Performance?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/overview-on-sql-server-performance-tuning/" target="_blank" rel="noopener">Overview of SQL Server Performance Tuning</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/" target="_blank" rel="noopener">Identify Disk Bottleneck in SQL Server using Perfmon Disk Counters</a></strong></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/">SQL Server Error 701: There is Insufficient System Memory to Run this Query</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/performance-tuning/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Overview on SQL Server Performance Tuning</title>
		<link>https://techyaz.com/sql-server/performance-tuning/overview-on-sql-server-performance-tuning/</link>
					<comments>https://techyaz.com/sql-server/performance-tuning/overview-on-sql-server-performance-tuning/#respond</comments>
		
		<dc:creator><![CDATA[Andrew Jackson]]></dc:creator>
		<pubDate>Thu, 08 Feb 2018 08:26:34 +0000</pubDate>
				<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[performance tuning]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1765</guid>

					<description><![CDATA[<p>SQL Server Performance Tuning is an important subject and it is essential to implement various measures at regular intervals of time to optimize the scalability and performance of the Server. There are multiple areas which we analyze to understand a&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/overview-on-sql-server-performance-tuning/">Overview on SQL Server Performance Tuning</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>SQL Server Performance Tuning is an important subject and it is essential to implement various measures at regular intervals of time to optimize the scalability and performance of the Server. There are multiple areas which we analyze to understand a performance problem. Here, i will discuss all those areas that are important considering performance tuning. I will not explain them in detail but you will get an idea to start learning performance tuning from DBA standpoint after reading this article.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1771" src="http://techyaz.com/wp-content/uploads/2018/02/SQL-Server-Performance-Tuning.png" alt="SQL Server Performance Tuning" width="560" height="315" srcset="https://techyaz.com/wp-content/uploads/2018/02/SQL-Server-Performance-Tuning.png 560w, https://techyaz.com/wp-content/uploads/2018/02/SQL-Server-Performance-Tuning-300x169.png 300w" sizes="(max-width: 560px) 100vw, 560px" /></p>
<h3><span style="color: #333399;">Server Level Configuration Check</span></h3>
<p>To deal with SQL Server Performance Tuning, it is required to review and check all the server level configuration settings of the SQL Server on periodic basis. Some of these settings may vary depending on the workload and criticality of the application. You can have a look at all the configurational settings by running below command.</p>
<pre><span style="color: #0000ff;"><strong>sp_configure'show advanced options',1
GO
RECONFIGURE
GO
sp_configure
</strong></span></pre>
<h3><span style="color: #333399;">Index Analysis</span></h3>
<p>The role of indexes in SQL Server performance tuning is very crucial. To achieve better Server performance during data retrieval, it is important to create useful indexes. Proper indexing helps in executing tasks with minimal disk Input\ Output operations and fewer system resources.</p>
<p>To implement this approach, it is important to understand how indexes are used by ‘Query Processor’ for executing quick data search operation. Even excessive indexes or poor indexes can harm your database performance so better to analyze the data and query before creating any indexes on your table. Read below articles to understand more on SQL Server Indexes.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/understanding-sql-server-indexes/" target="_blank" rel="noopener">Understanding SQL Server Indexes and difference between Clustered and Nonclustered Indexes</a></strong></li>
</ul>
<h3><span style="color: #333399;">SQL Wait Stat Analysis</span></h3>
<p>“Wait Stat Analysis” is an alternate way to identify the symptoms that cause impact on the Server performance. SQL Server constantly keeps track of the reasons for which execution tasks wait or gets delayed; so to detect the reason, one can refer to the Server logs. You can read more about SQL Server Wait types in below attached articles.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/what-is-sql-server-wait-type-or-how-to-get-wait-type-info-in-sql-server/" target="_blank" rel="noopener">Understanding SQL Server Wait Types and How to get wait type information?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/reduce-wait-type-preemptive_os_writefilegather/" target="_blank" rel="noopener">How to Reduce PREEMPTIVE_OS_WRITEFILEGATHER Wait type in SQL Server?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-dmvs/clear-wait-statistics-data-sql-server/" target="_blank" rel="noopener">Should We Clear Wait Stats Data from DMV sys.dm_os_wait_stats?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/resource_semaphore-wait-type/" target="_blank" rel="noopener">Understanding Resource_Semaphore wait type</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/backupbuffer-wait-type/" target="_blank" rel="noopener">How to Fix BACKUPBUFFER Wait Type?</a></strong></li>
</ul>
<h3><span style="color: #333399;">TempDB Space Review</span></h3>
<p>Another way for optimizing Server performance tuning is through proper analysis of the usage as well as empty and occupied space statistics of TempDB database. Make sure that you TempDB database files are placed separately on different drive. If you place user database files and TempDB database files on same drive you might face high disk IO that will cause performance degradation.</p>
<h3><span style="color: #333399;">Index Fragment\ Defragment Operation</span></h3>
<p>This approach can better be implemented through analyzing the indexes to detect the extent of fragmentation and to identify which indexes and databases need to be defragmented for ensuring the smooth performance of these components. You can run SQL Server dashboard report to check which indexes are highly fragmented and need to rebuild or reorganize to improve the performance. Read below articles to understand Index rebuild and Reorganize operation in SQL Server.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/difference-index-rebuild-reorganize/" target="_blank" rel="noopener">Difference between Index Rebuild and Index Reorganize Operation </a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/use-resumable-online-index-rebuild-operation-sql-server/" target="_blank" rel="noopener">How to use Resumable Online Index Rebuild Operation?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/performing-online-index-rebuild-operation/" target="_blank" rel="noopener">Disk and Performance Impact of running Online Index Rebuild Operation</a></strong></li>
</ul>
<h3><span style="color: #333399;">Application/Program Logs</span></h3>
<p>By referring to the “Windows Event Log” or “SQL Server Error Log”, the actual cause for the inappropriate functionality of either database or SQL Server can be detected. This could help in identifying and rectifying the existing errors that lead to files inaccessibility.</p>
<h3><span style="color: #333399;">Backup &amp; Recovery Parameters</span></h3>
<p>For better performance tuning, analyze the backup and recovery settings to ensure if they are implemented appropriately. So that the backup files can be restored successfully in case of any unexpected circumstances.</p>
<h3><span style="color: #333399;">Review Database Files</span></h3>
<p>Review entire database files including primary, secondary as well as log files (MDF, NDF and LDF respectively) to analyze and detect the actual cause that is responsible for the inappropriate functionality of database. Make a practice to keep data and log files on separate drives to reduce the disk IO pressure. You can also analize which data or log file is having highest IO operating, this way you can plan to place that file in a faster disk.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/" target="_blank" rel="noopener">Identify Disk Bottleneck in SQL Server using Perfmon Disk Counters</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/understanding-sql-server-data-files-pages-extents/" target="_blank" rel="noopener">Understanding Data Files, Pages &amp; Extents</a></strong></li>
</ul>
<h3><span style="color: #333399;">Blocking and Deadlock Detection</span></h3>
<p>Detecting Deadlocks is not a major task but often requires proper understanding and hands-on experience on the concept to implement it in an accurate manner. To implement the task, it is important to understand the locking mechanism along with its resolution. You can also identify if there is poor application design or coding by analyzing blocking and deadlock occurrence. If it occurs frequently, you can seriously think about optimizing your application or T-SQL coding. Identifying blocking issues will also help you in SQL Server performance tuning.</p>
<h3><span style="color: #333399;">Hardware Components</span></h3>
<p>Regular examination test over the various components of the SQL Server machine is required to ensure smooth functioning of all the elements as well as to prevent the adverse circumstances that can take place due to major hardware breakdown.</p>
<h3><span style="color: #333399;">DBCC Implementation</span></h3>
<p>It is very important to understand the nature of Database Console Commands as some of them are very critical and sometimes requires additional attention while execution. Some of these commands include DBCC SRHINKDATABASE, DBCC FREEPROCCACHE, DBCC SHRINKFILE, DBCC REINDEX and DBCC DROPCLEANBUFFER along with some stored procedures such as SP_UPDATESTATS.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-dmvs/4-different-usages-dbcc-sqlperf-sql-server/" target="_blank" rel="noopener">4 Usages of DBCC SQLPERF in SQL Server</a></strong></li>
</ul>
<h3><span style="color: #333399;">Conclusion</span></h3>
<p>So, these are some of the major mechanisms of SQL Server Performance Tuning concept and when implemented with proper consideration and attention, help in optimizing the performance of the Server. By executing these actions on regular instance of time; the performance issues with the Server and the incorporated databases can be resolved.</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/overview-on-sql-server-performance-tuning/">Overview on SQL Server Performance Tuning</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/performance-tuning/overview-on-sql-server-performance-tuning/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Reduce PREEMPTIVE_OS_WRITEFILEGATHER Wait Type in SQL Server?</title>
		<link>https://techyaz.com/sql-server/wait-types/reduce-wait-type-preemptive_os_writefilegather/</link>
					<comments>https://techyaz.com/sql-server/wait-types/reduce-wait-type-preemptive_os_writefilegather/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Tue, 16 Jan 2018 09:04:35 +0000</pubDate>
				<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Wait Types]]></category>
		<category><![CDATA[autogrowth setting]]></category>
		<category><![CDATA[data file autogrow]]></category>
		<category><![CDATA[IFI]]></category>
		<category><![CDATA[Instant File Initialization]]></category>
		<category><![CDATA[Waittypes]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1496</guid>

					<description><![CDATA[<p>I was getting wait type PREEMPTIVE_OS_WRITEFILEGATHER during database size allocation. Yesterday, I was configuring database size to the value that was suggested by the vendor. We need to set database size to 700GB keeping 150 GB to log files. I&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/wait-types/reduce-wait-type-preemptive_os_writefilegather/">How to Reduce PREEMPTIVE_OS_WRITEFILEGATHER Wait Type in SQL Server?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I was getting wait type <em>PREEMPTIVE_OS_WRITEFILEGATHER</em> during database size allocation. Yesterday, I was configuring database size to the value that was suggested by the vendor. We need to set database size to 700GB keeping 150 GB to log files. I have successfully configured data files sizes in less than 2 minutes because we had already enabled <a href="http://techyaz.com/sql-server/instant-file-initialization-enable-on-sql-server-instance/" target="_blank" rel="noopener">Instant File Initialization</a>. As we know Instant File Initialization (IFI) speeds up the data file size allocation by skipping the zero-initialize operation. But when i started extending log file sizes, it took lot of time. One reason for taking longer time might be because of wait type <em>PREEMPTIVE_OS_WRITEFILEGATHER</em> that was showing for the session id that was running to allocate log file space.</p>
<h4><span style="color: #333399;">What is PREEMPTIVE_OS_WRITEFILEGATHER?</span></h4>
<p>As per MSDN, <em>PREEMPTIVE_OS_WRITEFILEGATHER</em> is a wait type that occurs while SQL Server is waiting for the Operating System to complete portions of write operations. This wait is commonly seen in databases with <a href="http://techyaz.com/sql-server/understanding-database-autogrowth-sql-server/" target="_blank" rel="noopener">auto-growth not configured appropriately</a> or during large size allocation to database files. If you are getting this wait type frequently then you should investigate your SQL Server instance. You can also observe this wait type along with <a href="http://techyaz.com/sql-server/backupbuffer-wait-type/" target="_blank" rel="noopener">BACKUPBUFFER</a>  and LOGBUFFER wait types.</p>
<p><img decoding="async" class="size-full wp-image-1498 alignleft" src="http://techyaz.com/wp-content/uploads/2018/01/PREEMPTIVE_OS_WRITEFILEGATHER-min.png" alt="PREEMPTIVE_OS_WRITEFILEGATHER" width="560" height="315" srcset="https://techyaz.com/wp-content/uploads/2018/01/PREEMPTIVE_OS_WRITEFILEGATHER-min.png 560w, https://techyaz.com/wp-content/uploads/2018/01/PREEMPTIVE_OS_WRITEFILEGATHER-min-300x169.png 300w" sizes="(max-width: 560px) 100vw, 560px" /></p>
<p>Sometimes, we get this wait type during database restore operation as well. As we know backup operation captures details like database file sizes irrespective of how much data or logs filled inside the data or log file. When you execute restore operation, it will create that much big file and it will take more time because SQL Server will be busy in zeroing out the file equivalent to source data or log file size. If you have enabled IFI on your database server then you will not be getting this wait type for data files but still you might get it for log file size allocation.</p>
<p>Suppose your database has 100GB of log file and only 12 GB is filled. If you take backup of this database and restore it anywhere then restore operation will create a log file of 100GB that will take lot much time because of zero initialized operation to be performed for all 100GB size.</p>
<h4><span style="color: #333399;">Solutions to Reduce Wait Type PREEMPTIVE_OS_WRITEFILEGATHER</span></h4>
<p>Microsoft has given a feature Instant File Initialization to overcome or reduce this wait type but this feature works for only data files not log files. We hope this feature will work on both data as well as log files in future releases of SQL Servers.</p>
<p>If you are getting this wait type during extending data files or during data file autogrowth then you can simply enable Instant File Initialization on your SQL Server database server and this wait type will disappear from next time. This feature will skip zero-initialization of data files and directly allocate given size to the data files. Read attached article to <a href="http://techyaz.com/sql-server/instant-file-initialization-enable-on-sql-server-instance/" target="_blank" rel="noopener">learn Instant File Initialization and how to enable it on your SQL Server Instance</a>?</p>
<p>But we know this feature does not work on log files so we cannot use this feature to reduce this wait type if it occurs during extending log file or during log file autogrowth. We faced same issue because we had already enabled Instant File Initialization for data files but stuck during extending log files. Here I will give you few best practices that you can apply to avoid and reduce this wait type.</p>
<ol>
<li>Increase auto-growth from the default value to some numeric value to reduce the frequent auto-growth occurrence for your database file. Thumb rule is to keep autogrowth size one eight of the corresponding database-file size. Read this article to know the <a href="http://techyaz.com/sql-server/understanding-database-autogrowth-sql-server/" target="_blank" rel="noopener">Perfect value for database file Autogrowth?</a></li>
<li>If possible avoid auto-growth occurrence by allocating expected size grown in future to the database.</li>
<li>Monitor Storage subsystems and Investigate if any issues identified. Upgrade Storage if required.</li>
<li>Have a look at the Windows Event Viewer for any system related issues.</li>
<li>Enable Instant File Initialization to avoid zero-initialization for data files.</li>
<li>Consolidate transactions from row-by-row statements to batch processing.</li>
<li>If you have bigger log file having small number of logs filled inside. You can <a href="http://techyaz.com/sql-server/sql-server-dmvs/4-different-usages-dbcc-sqlperf-sql-server/" target="_blank" rel="noopener">check log file size using DBCC SQLPERF command</a> given in attached article. You can shrink the log file and take the backup again to perform the restore. This should be a quick process rather than waiting for zeroing to complete for previous size of log file.</li>
<li>Stop any activity to free-up the target disk&#8217;s header so that it can dedicatedly work on zeroing out the LDF file.</li>
</ol>
<p><span style="color: #800000;"><em><strong>Read More:</strong></em></span></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/improve-sql-server-bulk-data-import-performance/" target="_blank" rel="noopener">How to Speed up Huge Data Load in SQL Server?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/async_io_completion-wait-type/" target="_blank" rel="noopener">Understanding ASYNC_IO_COMPLETION Wait Type</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/manage-transaction-log-file-during-data-load/" target="_blank" rel="noopener">Manage Transaction Log File during Data Load</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/what-is-sql-server-wait-type-or-how-to-get-wait-type-info-in-sql-server/" target="_blank" rel="noopener">Understanding SQL Server Wait Types</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/resource_semaphore-wait-type/" target="_blank" rel="noopener">How to reduce RESOURCE_SEMAPHORE wait type?</a></strong></li>
</ul>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/wait-types/reduce-wait-type-preemptive_os_writefilegather/">How to Reduce PREEMPTIVE_OS_WRITEFILEGATHER Wait Type in SQL Server?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/wait-types/reduce-wait-type-preemptive_os_writefilegather/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>4 Different Usages of DBCC SQLPERF in SQL Server</title>
		<link>https://techyaz.com/sql-server/sql-server-dmvs/4-different-usages-dbcc-sqlperf-sql-server/</link>
					<comments>https://techyaz.com/sql-server/sql-server-dmvs/4-different-usages-dbcc-sqlperf-sql-server/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Mon, 08 Jan 2018 11:02:31 +0000</pubDate>
				<category><![CDATA[DBCC & DMVs]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[Wait Types]]></category>
		<category><![CDATA[DBCC]]></category>
		<category><![CDATA[dmv]]></category>
		<category><![CDATA[latches]]></category>
		<category><![CDATA[log space]]></category>
		<category><![CDATA[log_files]]></category>
		<category><![CDATA[transaction log]]></category>
		<category><![CDATA[wait statistics]]></category>
		<category><![CDATA[Waittypes]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1445</guid>

					<description><![CDATA[<p>DBCC SQLPERF is very useful command that we use to get multiple statistics related information in SQL Server. This command provides transaction log space statistics and wait statistics information at instance level and we also use it to reset wait and&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/sql-server-dmvs/4-different-usages-dbcc-sqlperf-sql-server/">4 Different Usages of DBCC SQLPERF in SQL Server</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>DBCC SQLPERF is very useful command that we use to get multiple statistics related information in SQL Server. This command provides <a href="http://techyaz.com/sql-server/understanding-transaction-log-architecture/" target="_blank" rel="noopener">transaction log</a> space statistics and wait statistics information at instance level and we also use it to reset wait and latch statistics data. We can use DBCC SQLPERF command to do below tasks.</p>
<ol>
<li>Get log space size</li>
<li>View wait statistics data</li>
<li>Clear wait statistics data</li>
<li>Clear latch statistics data</li>
</ol>
<p>Let’s discuss each of above tasks as use cases of DBCC SQLPERF command.</p>
<p><em><strong><span style="color: #800000;">Read More</span></strong></em></p>
<ul>
<li><a href="http://techyaz.com/sql-server/get-total-virtual-log-files/" target="_blank" rel="noopener">How to get total no of VLFs (Virtual Log Files) inside Log file?</a></li>
<li><a href="http://techyaz.com/sql-server/understanding-sql-server-data-files-pages-extents/" target="_blank" rel="noopener">Understanding Data Files, Pages &amp; Extents</a></li>
<li><a href="http://techyaz.com/sql-server/how-to-avoid-page-split-in-sql-server/" target="_blank" rel="noopener">How to Avoid Page Split in SQL Server?</a></li>
</ul>
<h4><span style="color: #333399;">Get Transaction Log space using DBCC SQLPERF</span></h4>
<p>We can get transaction log space utilization details like how large your transaction logs are and what percentage of them is in use by executing dbcc sqlperf command. Run below command to get the log space details of all database hosted your SQL Server Instance.</p>
<div class="codediv">
<pre><strong><span style="color: #008000;">--Get Transaction Log Size Details</span>
<span style="color: #0000ff;">DBCC SQLPERF(logspace)
</span></strong></pre>
</div>
<p>You can see the below screenshot; all the columns are self-explanatory. We can see percent of log space used out of total space allocated to the log file.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1447" src="http://techyaz.com/wp-content/uploads/2018/01/1-Check-log-space.jpg" alt="Check Log space utilization using dbcc sqlperf" width="417" height="236" srcset="https://techyaz.com/wp-content/uploads/2018/01/1-Check-log-space.jpg 417w, https://techyaz.com/wp-content/uploads/2018/01/1-Check-log-space-300x170.jpg 300w" sizes="auto, (max-width: 417px) 100vw, 417px" /></p>
<h4><span style="color: #333399;">View and Clear Wait Statistics Data</span></h4>
<p>We can get wait statistics data using dbcc sqlperf command as well. We used to get these details using dbcc sqlperf command in older version of SQL Server instances. Although, you can still get wait statistics data using this command in current versions of SQL Server but now there is a better way to get such details using DMV <strong>sys.dm_os_wait_stats</strong>.  Here, I will show you wait stats data using DMV only. Run below commands to get wait statistics details of your SQL Server instance.</p>
<div class="codediv">
<pre><strong><span style="color: #008000;">--Get wait Statistics using DBCC command.</span>
DBCC SQLPERF(waitstats)

<span style="color: #008000;">--Get Wait Statistics using DMV sys.dm_os_wait_stats</span>
SELECT * FROM sys.dm_os_wait_stats
Order by wait_time_ms desc
</strong></pre>
</div>
<p>You can see the details about all wait types on your SQL Server instance. You can also see the total wait time in milliseconds. These information is very important to deal with performance issues but details like total wait time, total waiting tasks count are not the real-time values. These values are accumulated since last SQL Server service start or last time wait stats was reset using dbcc sqlperf command. It is highly recommended to not clear wait stats data until it is required to do that otherwise you will lose valuable information about wait statistics. Read attached article about <a href="http://techyaz.com/sql-server/sql-server-dmvs/clear-wait-statistics-data-sql-server/" target="_blank" rel="noopener">why should you not clear wait statistics data stored in DMV sys.dm_os_wait_stats</a>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1448" src="http://techyaz.com/wp-content/uploads/2018/01/2-sys.dm_os_wait_stats.jpg" alt="View Wait stats data using DMV" width="643" height="300" srcset="https://techyaz.com/wp-content/uploads/2018/01/2-sys.dm_os_wait_stats.jpg 643w, https://techyaz.com/wp-content/uploads/2018/01/2-sys.dm_os_wait_stats-300x140.jpg 300w" sizes="auto, (max-width: 643px) 100vw, 643px" /></p>
<p>If you want to get the correct waiting task counts or waiting time then you need to clear the wait statistics data using dbcc sqlperf command. Here, I will show you the difference after clearing the wait stats. Run below command to clear all wait stats data on your SQL Server Instance.</p>
<div class="codediv">
<pre><strong>DBCC SQLPERF(“sys.dm_os_wait_stats”, CLEAR)
</strong></pre>
</div>
<p>You can see I have successfully ran this command in below screenshot.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1449" src="http://techyaz.com/wp-content/uploads/2018/01/3-Clear-buffer-for-wait-stats.jpg" alt="clear wait stats" width="689" height="121" srcset="https://techyaz.com/wp-content/uploads/2018/01/3-Clear-buffer-for-wait-stats.jpg 689w, https://techyaz.com/wp-content/uploads/2018/01/3-Clear-buffer-for-wait-stats-300x53.jpg 300w" sizes="auto, (max-width: 689px) 100vw, 689px" /></p>
<p>Now we will again run same command to get the wait statistics data. I ran it and I get below data that is showing different than the one showing before clearing wait stats. This way you can better analyze your database performance and waiting tasks and time to reach on any conclusion.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1450" src="http://techyaz.com/wp-content/uploads/2018/01/4-Check-wait-stats-after-clearning-buffer.jpg" alt="Check wait stats after clearing its buffer" width="804" height="283" srcset="https://techyaz.com/wp-content/uploads/2018/01/4-Check-wait-stats-after-clearning-buffer.jpg 804w, https://techyaz.com/wp-content/uploads/2018/01/4-Check-wait-stats-after-clearning-buffer-300x106.jpg 300w, https://techyaz.com/wp-content/uploads/2018/01/4-Check-wait-stats-after-clearning-buffer-768x270.jpg 768w" sizes="auto, (max-width: 804px) 100vw, 804px" /></p>
<p>&nbsp;</p>
<h4><span style="color: #333399;">Clear Latch Statistics Data</span></h4>
<p>I described about clearing wait stats data in above section. Here, I will show you how to clear latch statistics data. <b>Latches</b> are locks for RAM memory structures to prevent concurrent access and ensure serial execution of kernel code. You can run SQL command to check current latch statistics data.</p>
<div class="codediv">
<pre><span style="color: #008000;"><span style="color: #008000;"><b>--Get latch statistics data</b></span></span><b>
SELECT * FROM sys.dm_os_latch_stats
ORDER BY wait_time_ms desc
</b></pre>
</div>
<p>You can see current latch statistics details that is also not showing only real time value but it is accumulated data since last SQL Server service restarted or last time latch wait statistics was reset/cleared.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1451" src="http://techyaz.com/wp-content/uploads/2018/01/5-Check-Latch.jpg" alt="Get Latch Statistics Data" width="678" height="217" srcset="https://techyaz.com/wp-content/uploads/2018/01/5-Check-Latch.jpg 678w, https://techyaz.com/wp-content/uploads/2018/01/5-Check-Latch-300x96.jpg 300w" sizes="auto, (max-width: 678px) 100vw, 678px" /></p>
<p>&nbsp;</p>
<p>Now we will clear these latch statistics data to get real time value of latch details. Run below dbcc sqlperf command to clear the latch statistics.</p>
<div class="codediv">
<pre><strong>DBCC SQLPERF(“sys.dm_os_latch_stats”, CLEAR)
</strong></pre>
</div>
<p>You can see we have successfully executed above command on our SQL Server Instance.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1452" src="http://techyaz.com/wp-content/uploads/2018/01/6-Clear-stored-latch-details.jpg" alt="Clear Latch Statistics Data" width="722" height="121" srcset="https://techyaz.com/wp-content/uploads/2018/01/6-Clear-stored-latch-details.jpg 722w, https://techyaz.com/wp-content/uploads/2018/01/6-Clear-stored-latch-details-300x50.jpg 300w" sizes="auto, (max-width: 722px) 100vw, 722px" /></p>
<p>Now go ahead and run same SQL command to get the latch statistics again. You can see now there is no waiting requests on our SQL Server Instance and you are getting real time value about latches.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1453" src="http://techyaz.com/wp-content/uploads/2018/01/7-check-latch-details-after-clearning-buffer.jpg" alt="latch details after cleaning its buffer data " width="677" height="197" srcset="https://techyaz.com/wp-content/uploads/2018/01/7-check-latch-details-after-clearning-buffer.jpg 677w, https://techyaz.com/wp-content/uploads/2018/01/7-check-latch-details-after-clearning-buffer-300x87.jpg 300w" sizes="auto, (max-width: 677px) 100vw, 677px" /></p>
<p><em><strong><span style="color: #800000;">Related Articles</span></strong></em></p>
<ul>
<li><a href="http://techyaz.com/sql-server/sql-server-dmvs/clear-wait-statistics-data-sql-server/" target="_blank" rel="noopener">Should We Clear Wait Stats Data from DMV sys.dm_os_wait_stats?</a></li>
<li><a href="http://techyaz.com/sql-server/backupbuffer-wait-type/" target="_blank" rel="noopener">How to Fix BACKUPBUFFER Wait Type?</a></li>
<li><a href="http://techyaz.com/sql-server/improve-sql-server-bulk-data-import-performance/" target="_blank" rel="noopener">How to Improve Bulk Data Load Performance?</a></li>
</ul>
<p>These are the 4 use cases of DBCC SQLPERF command that we use during different database activities. I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/sql-server-dmvs/4-different-usages-dbcc-sqlperf-sql-server/">4 Different Usages of DBCC SQLPERF in SQL Server</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/sql-server-dmvs/4-different-usages-dbcc-sqlperf-sql-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Disk and Performance Impact of Online Index Rebuild Operation</title>
		<link>https://techyaz.com/sql-server/indexes/performing-online-index-rebuild-operation/</link>
					<comments>https://techyaz.com/sql-server/indexes/performing-online-index-rebuild-operation/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Fri, 29 Dec 2017 12:18:51 +0000</pubDate>
				<category><![CDATA[Indexes]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[Clustered Index]]></category>
		<category><![CDATA[Index]]></category>
		<category><![CDATA[index rebuild]]></category>
		<category><![CDATA[Nonclustered Index]]></category>
		<category><![CDATA[SQL Server Indexes]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1421</guid>

					<description><![CDATA[<p>Here, we are going to talk about disk and performance Impact of online Index rebuild operation. As we know index rebuild is offline operation due to which indexes become inaccessible. Here, I will describe about SQL Server rebuild index online&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/indexes/performing-online-index-rebuild-operation/">Disk and Performance Impact of Online Index Rebuild Operation</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Here, we are going to talk about disk and performance Impact of online Index rebuild operation. As we know index rebuild is offline operation due to which indexes become inaccessible. Here, I will describe about SQL Server rebuild index online that will keep SQL Server indexes accessible. I hope you are aware about the<strong> <a href="http://techyaz.com/sql-server/difference-index-rebuild-reorganize/" target="_blank" rel="noopener">difference between Index rebuild and Index reorganize operation</a>.</strong> If you are not aware please have a look at attached article. Index Reorganize is already an online operation whereas Index rebuild can be done using offline as well as online method. Performing online index operations include index creation, index rebuild and drop indexes. I will describe online rebuild index operation and its impact on disk and performance in this article and same concept will be applied to online index creation and online indexe drop as well.</p>
<p>There is new feature called <em>Resumable Online Index Rebuild</em> introduced in SQL Server 2017 that is an extension of online index rebuild operation. Learn about<strong> <a href="http://techyaz.com/sql-server/use-resumable-online-index-rebuild-operation-sql-server/" target="_blank" rel="noopener">Resumable Online Index Rebuild</a></strong> operation in SQL Server 2017 in attached article.</p>
<p><em><span style="color: #800000;"><strong>Read More:</strong></span></em></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/what-should-be-the-best-value-for-fill-factor-in-sql-server/" target="_blank" rel="noopener">What should be best value for fill factor in SQL Server?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/how-to-avoid-page-split-in-sql-server/" target="_blank" rel="noopener">How to Avoid Page Split in SQL Server?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/use-resumable-online-index-rebuild-operation-sql-server/" target="_blank" rel="noopener">How to use Resumable Online Rebuild Operation?</a></strong></li>
</ul>
<h3><span style="color: #333399;">ONLINE Index Rebuild Operation</span></h3>
<p>Rebuilding an index drops and re-creates the index. Indexes becomes unavailable during this exercise that causes an outage for that object. Microsoft has given a solution to avoid inaccessibility of the object during index rebuild operation. We can specify ONLINE keyword value as ON in CREATE INDEX or ALTER INDEX to rebuild indexes online.</p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-1423 alignleft" src="http://techyaz.com/wp-content/uploads/2017/12/Perform-Online-Index-Operations.png" alt="Online index operation" width="560" height="315" srcset="https://techyaz.com/wp-content/uploads/2017/12/Perform-Online-Index-Operations.png 560w, https://techyaz.com/wp-content/uploads/2017/12/Perform-Online-Index-Operations-300x169.png 300w" sizes="auto, (max-width: 560px) 100vw, 560px" /></p>
<p>When you are rebuilding an index and the ONLINE option is set to ON, the underlying objects, the tables and associated indexes, are available for queries and data modification. Row versioning is used to allow for transactional consistency. SQL Server reindex ONLINE option does not work if your table has BLOB data types or index is an XML index or Spatial index.</p>
<p>I have given the list of T-SQL statements that will rebuild indexes ONLINE on your table. You just need to change the index name, table name and column name from below statements.</p>
<p>Below SQL code will rebuild the clustered index on column <strong>EMPID</strong> on the table <strong>dbo.Salary</strong>. As we are rebuilding this cluster index using dropping and recreating the cluster indexes so existing index will be dropped in the process, but it will be available during the operation because the ONLINE option is specified.</p>
<pre class="brush:sql;"><strong><span style="color: #0000ff;">CREATE CLUSTERED INDEX CI_Salary_EMPID ON dbo.Salary(EMPID)
WITH(DROP_EXISTING = ON, ONLINE = ON)
</span></strong></pre>
<p>We can also use ALTER INDEX statement to rebuild a specific index or all indexes on a specified table. The ONLINE syntax remains the same as the CREATE INDEX statement if you want to run this operation online.</p>
<pre class="brush:sql;"><strong><span style="color: #0000ff;">ALTER INDEX ALL ON [dbo.Salary]
REBUILD WITH(ONLINE = ON)
</span></strong></pre>
<p>Above statement will rebuild all indexes on table Salary keeping everything accessible during this operation. Now, we can also rebuild clustered index only on the dbo.Salary table. The ONLINE option is specified, which means that the table will be accessible during the rebuild operation.</p>
<pre class="brush:sql;"><strong><span style="color: #0000ff;">ALTER INDEX CI_Salary_EMPID ON dbo.salary
REBUILD WITH(ONLINE = ON)
</span></strong></pre>
<p>But if we will remove ONLINE option from above statement, then table will NOT be accessible during rebuild operation. You can run below command to validate the accessibility of your table for which you are rebuilding the indexes.</p>
<pre class="brush:sql;"><strong><span style="color: #0000ff;">ALTER INDEX CI_Salary_EMPID ON dbo.salary
REBUILD
</span></strong></pre>
<h3><span style="color: #333399;">Disk Space Considerations </span></h3>
<p>Disk space is an important consideration when you create, rebuild, or drop indexes. Inadequate disk space can degrade performance or even cause the index operation to fail. There might be other major performance impact of Online Index Rebuild operation as well. Please consider below recommendations if you are using Online index operations or during SQL Server rebuild index online.</p>
<ol>
<li>During ONLINE index rebuild and index creation, additional space is required in the data file to keep the second copy of the index. This is because SQL Server creates a snapshot of the index and once index rebuild or creation completes, second copy of this index will be removed by SQL Server.</li>
<li>Additional disk space is required for the temporary mapping index. This temporary index is used in online index operations that create, rebuild, or drop a clustered index.</li>
<li>Make sure the transaction log has been backed up and truncated before running index operations online, and that the log has sufficient space to store the projected index and user transactions.</li>
<li>Specify SORT_IN_TEMPDB option to ON for the index operation. This separates the index transactions from the concurrent user transactions. The index transactions will be stored in the tempdb transaction log, and the concurrent user transactions will be stored in the transaction log of the user database. Make sure to keep tempdb log and user database log files on separate drives to avoid any disk space issues.</li>
<li>Verify that the tempdb database and transaction log have sufficient disk space to handle the index operation. The tempdb transaction log cannot be truncated until the index operation is completed.</li>
<li>Do not run the online index operation in an explicit transaction. The log will not be truncated until the explicit transaction ends.</li>
</ol>
<h3><span style="color: #333399;">Performance Considerations</span></h3>
<p>If we think about performance impact of Online Index Rebuild operation on SQL Server then it will put more burden on your database server than offline index operations. Because both the source and target structures are maintained during the online index operation.</p>
<p>ONLINE Index operations will be slower than equivalent offline index operations because insert, update, and delete transactions is increased, potentially up to double. This could cause a decrease in performance and greater resource usage, especially CPU time, during the index operation. Online index operations are enterprise features and are fully logged operations.</p>
<p>It is recommended to use legacy way of index rebuild or index operations if your system allows a maintenance window. Remember users will be restricted to access data during the offline index operation, but the operation finishes faster and uses fewer resources.</p>
<p>If you have a system that runs 24&#215;7 then ONLINE index rebuild or creation will be a better choice but make sure to consider all points described in this article before choosing online index operations. You need to think from disk space and performance both prospect and design your system that can handle the load and sustain during peak hours.</p>
<p><em><span style="color: #800000;"><strong>Related Articles</strong></span></em></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-interview-questions-answers-indexes/" target="_blank" rel="noopener">SQL Server Interview Questions &amp; Answers on Indexes</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/understanding-sql-server-indexes/" target="_blank" rel="noopener">Understanding Different types of Indexes in SQL Server</a></strong></li>
</ul>
<p>Here, I have described Disk and Performance Impact of Online Index Rebuild operation on SQL Server. I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/indexes/performing-online-index-rebuild-operation/">Disk and Performance Impact of Online Index Rebuild Operation</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/indexes/performing-online-index-rebuild-operation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Should We Clear Wait Statistics Data from DMV sys.dm_os_wait_stats in SQL Server?</title>
		<link>https://techyaz.com/sql-server/performance-tuning/clear-wait-statistics-data-sql-server/</link>
					<comments>https://techyaz.com/sql-server/performance-tuning/clear-wait-statistics-data-sql-server/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Thu, 28 Dec 2017 14:46:54 +0000</pubDate>
				<category><![CDATA[DBCC & DMVs]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server Interview Questions]]></category>
		<category><![CDATA[DBA interview questions]]></category>
		<category><![CDATA[DBCC]]></category>
		<category><![CDATA[dmv]]></category>
		<category><![CDATA[performance tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[wait statistics]]></category>
		<category><![CDATA[Waittypes]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1412</guid>

					<description><![CDATA[<p>Should we clear or reset Performance Wait Statistics Data present in DMV sys.dm_os_wait_stats in SQL Server? The answer to this question is depends on case to case. Ideally, you should not clear your wait statistics data frequently. Best way is Do Not clear wait&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/clear-wait-statistics-data-sql-server/">Should We Clear Wait Statistics Data from DMV sys.dm_os_wait_stats in SQL Server?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Should we clear or reset Performance Wait Statistics Data present in DMV <strong>sys.dm_os_wait_stats </strong>in SQL Server? The answer to this question is depends on case to case. Ideally, you should not clear your wait statistics data frequently. Best way is Do Not clear wait stats data until it is required to gather information for any performance issue. Although, clearing wait stats has no impact on SQL Server performance. It will just remove information related to accumulated wait stats.</p>
<h5><span style="color: #333399;">Should We Clear Wait Stats Data in SQL Server?</span></h5>
<p>We do not recommend to clear the wait stats data frequently because all valuable information about wait statistics will be vanished if you clear them. Always try to capture wait statistics information before clearing wait stats. This way you would have both before and after data. You can use <strong>sys.dm_os_wait_stats</strong> DMV to get the SQL Server wait statistics information.</p>
<p>Generally, we reset or clear wait stats information to capture actual data during a given time duration because this DMV does not show only current data. The DMV sys.dm_os_wait_stats accumulates all the counts and wait times since last time SQL Server started or its stats got cleared by dbcc sqlperf command.</p>
<p>Here I will show you how to clear the SQL Server wait statistics and the difference between data captured before clearing the wait stats and after clearing the wait stats.</p>
<h5><span style="color: #333399;">Get Wait Statistics Data</span></h5>
<p>The DMV sys.dm_os_wait_stats provides essential metrics for diagnosing SQL Server performance problems. This DMV captures all the details like waiting requests counts, signal waits and waiting time since last time SQL Server instance got started or last time you have cleared your wait stats using DBCC SQLPERF command. Run below command to get performance wait stats details of your SQL Server instance.</p>
<pre><strong><span style="color: #008000;">--Get Wait Statistics using DMV sys.dm_os_wait_stats</span>
<span style="color: #0000ff;">SELECT * FROM sys.dm_os_wait_stats
Order by wait_time_ms desc
</span></strong></pre>
<p>You can see the details about all the wait types on your SQL Server instance. You can also see the total wait time in milliseconds. This data is very important if you are dealing with any performance issue but as i discussed above details like total wait time, total waiting tasks counts are the accumulated/incremental values.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1414" src="http://techyaz.com/wp-content/uploads/2017/12/1-Get-wait-stats.jpg" alt="Get SQL Server Wait Stats Data" width="643" height="300" srcset="https://techyaz.com/wp-content/uploads/2017/12/1-Get-wait-stats.jpg 643w, https://techyaz.com/wp-content/uploads/2017/12/1-Get-wait-stats-300x140.jpg 300w" sizes="auto, (max-width: 643px) 100vw, 643px" /></p>
<h5><span style="color: #333399;">Reset or CLEAR Wait Statistics</span></h5>
<p>Now you have captured wait stats information since your SQL Server was started. If you want to get only current waiting task counts or waiting time then you need to reset or clear wait statistics data using dbcc sqlperf command. Run below command to clear all wait stats data on your SQL Server Instance.</p>
<pre><strong><span style="color: #0000ff;">DBCC SQLPERF(“sys.dm_os_wait_stats”, CLEAR)
</span></strong></pre>
<p>You can see I have successfully executed this command in below screenshot.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1415" src="http://techyaz.com/wp-content/uploads/2017/12/2-Clear-wait-stats.jpg" alt="Clear Wait Stats" width="689" height="121" srcset="https://techyaz.com/wp-content/uploads/2017/12/2-Clear-wait-stats.jpg 689w, https://techyaz.com/wp-content/uploads/2017/12/2-Clear-wait-stats-300x53.jpg 300w" sizes="auto, (max-width: 689px) 100vw, 689px" /></p>
<p>Now we will again run same command to get the wait statistics data. I ran it and I get below information that is showing different than the one showing before clearing wait stats.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1416" src="http://techyaz.com/wp-content/uploads/2017/12/3-Check-wait-stats-after-resetting-wait-stats.jpg" alt="Get wait stats after clearing its older data" width="804" height="283" srcset="https://techyaz.com/wp-content/uploads/2017/12/3-Check-wait-stats-after-resetting-wait-stats.jpg 804w, https://techyaz.com/wp-content/uploads/2017/12/3-Check-wait-stats-after-resetting-wait-stats-300x106.jpg 300w, https://techyaz.com/wp-content/uploads/2017/12/3-Check-wait-stats-after-resetting-wait-stats-768x270.jpg 768w" sizes="auto, (max-width: 804px) 100vw, 804px" /></p>
<p>You can see how you will lose valuable information if you will clear your wait stats without capture its earlier data. This way you can also better analyze your database wait types, waiting tasks to reach on any conclusion to fix the issue.</p>
<p><em><strong><span style="color: #800000;">Related Articles</span></strong></em></p>
<ul>
<li><a href="http://techyaz.com/sql-server/what-is-sql-server-wait-type-or-how-to-get-wait-type-info-in-sql-server/">Understanding SQL Server Wait types</a></li>
<li><a href="http://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/" target="_blank" rel="noopener">Identify Disk Bottleneck in SQL Server using Perfmon Disk Counters</a></li>
<li><a href="http://techyaz.com/sql-server/resource_semaphore-wait-type/" target="_blank" rel="noopener">Understanding Resource_Semaphore wait type</a></li>
</ul>
<p>Now you understand that we should not reset or clear wait stats frequently because wait stats data is very crucial to deal with any performance issue. You can reset or clear the wait stats but make sure to capture the data before clearing the wait stats. I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/clear-wait-statistics-data-sql-server/">Should We Clear Wait Statistics Data from DMV sys.dm_os_wait_stats in SQL Server?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/performance-tuning/clear-wait-statistics-data-sql-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server Interview Questions &#038; Answers on Indexes</title>
		<link>https://techyaz.com/interview-questions/sql-server-interview-questions/sql-server-interview-questions-answers-indexes/</link>
					<comments>https://techyaz.com/interview-questions/sql-server-interview-questions/sql-server-interview-questions-answers-indexes/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Mon, 04 Dec 2017 10:05:32 +0000</pubDate>
				<category><![CDATA[Indexes]]></category>
		<category><![CDATA[Interview Questions]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Interview Questions]]></category>
		<category><![CDATA[Clustered Index]]></category>
		<category><![CDATA[DBA interview questions]]></category>
		<category><![CDATA[Interview]]></category>
		<category><![CDATA[Nonclustered Index]]></category>
		<category><![CDATA[SQL Server Indexes]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1277</guid>

					<description><![CDATA[<p>This article is part of SQL Server interview questions &#38; answers series. Today, i am covering SQL Server Interview Questions &#38; Answers on Indexes. You can have a look at the last few series of interview questions and answers on different&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/interview-questions/sql-server-interview-questions/sql-server-interview-questions-answers-indexes/">SQL Server Interview Questions &#038; Answers on Indexes</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This article is part of SQL Server interview questions &amp; answers series. Today, i am covering SQL Server Interview Questions &amp; Answers on Indexes. You can have a look at the last few series of interview questions and answers on different SQL Server topics. Read this article to learn SQL Server interview questions on indexes.</p>
<p><em><span style="color: #800000;"><strong>Related Articles:</strong></span></em></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/alwayson/sql-server-alwayson-interview-questions-answers/" target="_blank" rel="noopener">SQL Server Interview Q&amp;A on Alwayson Availability Group</a></strong></li>
<li><strong><a href="https://techyaz.com/interview-questions/sql-server-dba-interview-questions-answers/" target="_blank" rel="noopener">SQL Server DBA Interview Questions &amp; Answers</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/backup-recovery/sql-server-backup-recovery-interview-questions-answers/" target="_blank" rel="noopener">SQL Server Backup &amp; Recovery Interview Questions &amp; Answers</a></strong></li>
<li><strong><a href="https://techyaz.com/interview-questions/sql-server-interview-questions-answers-architecture/" target="_blank" rel="noopener">SQL Server Architecture Interview Questions &amp; Answers</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/difference-index-rebuild-reorganize/" target="_blank" rel="noopener">Index Rebuild vs Index Reorganize Operation</a></strong></li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1279 size-full" src="http://techyaz.com/wp-content/uploads/2017/11/SQL-Server-Interview-Questions-and-Answers-on-Indexes.png" alt="SQL Server Interview Questions and Answers on Indexes" width="560" height="315" srcset="https://techyaz.com/wp-content/uploads/2017/11/SQL-Server-Interview-Questions-and-Answers-on-Indexes.png 560w, https://techyaz.com/wp-content/uploads/2017/11/SQL-Server-Interview-Questions-and-Answers-on-Indexes-300x169.png 300w" sizes="auto, (max-width: 560px) 100vw, 560px" /></p>
<h3><span style="color: #333399;">SQL Server Interview Questions &amp; Answers on Indexes</span></h3>
<p><strong>Question &#8211; How data stores in Indexes?</strong></p>
<p><strong>Answer &#8211; </strong>Data stores in indexes or in tables on a series of 8 kb <a href="https://techyaz.com/sql-server/understanding-sql-server-data-files-pages-extents/" target="_blank" rel="noopener">data pages</a>. <a href="https://techyaz.com/sql-server/understanding-sql-server-indexes/" target="_blank" rel="noopener">Indexes</a> Data on these data pages are organized in a B-Tree structure that supports fast retrieval of the rows, based on their index key values. Each page in an index B-tree is called an index node. The top node of the B-tree is called the root node. The bottom level of nodes in the index is called the leaf nodes. The leaf nodes of a <a href="https://techyaz.com/sql-server/understanding-sql-server-indexes/" target="_blank" rel="noopener">nonclustered index</a> is made up of index pages instead of data pages whereas in a <a href="https://techyaz.com/sql-server/understanding-sql-server-indexes/" target="_blank" rel="noopener">clustered index</a>, the leaf nodes contain the data pages.</p>
<p><strong>Question &#8211; What is Fill Factor and what should be the perfect value for it?</strong></p>
<p><strong>Answer &#8211; </strong>A fill factor value determines the percentage of space on each leaf-level page to be filled with data, reserving the remainder on each page as free space for future growth. Fill factor values 0 and 100 are the same in all respects. The fill-factor option is provided for fine-tuning index data storage and performance. Although, there is no defined value that we can say is perfect value for fill factor. You can set it to somewhere around 80% and monitor fragmentation over time. Then, you can tweak its value up or down depending on how fragmented the indexes get. Read more about <a href="https://techyaz.com/sql-server/what-should-be-the-best-value-for-fill-factor-in-sql-server/" target="_blank" rel="noopener">fill factor and its best value</a>.</p>
<p><strong>Question &#8211; Explain Page Split and whether it is good for SQL Server or bad?</strong></p>
<p><strong>Answer &#8211; </strong>Whenever you update existing rows with the data that is bigger in size to save on their data page then Page Split operation occur to make space for this new update. <a href="https://techyaz.com/sql-server/how-to-avoid-page-split-in-sql-server/" target="_blank" rel="noopener">Page split reduces performance</a> so we can say page split is not at all a good thing for our database.</p>
<p><strong>Question &#8211; How page split is bad for performance?</strong></p>
<p><strong>Answer &#8211; </strong><a href="https://techyaz.com/sql-server/how-to-avoid-page-split-in-sql-server/" target="_blank" rel="noopener">Page split is a resource intensive operation</a> and causes <a href="https://techyaz.com/sql-server/difference-index-rebuild-reorganize/" target="_blank" rel="noopener">fragmentation</a> that leads to deficient performance in terms of increased I/O operations. We should take it seriously if there are frequent page splits occur and consider reducing its occurrences</p>
<p><b>Question &#8211; What is Difference between clustered and nonclustered Indexes?</b></p>
<p><strong>Answer &#8211; </strong><a href="https://techyaz.com/sql-server/understanding-sql-server-indexes/" target="_blank" rel="noopener">Clustered indexes</a> sort and store the data rows in the table or view based on their key values. There can be only one clustered index per table, because the data rows themselves can be sorted in only one order.</p>
<p><a href="https://techyaz.com/sql-server/understanding-sql-server-indexes/" target="_blank" rel="noopener">Nonclustered indexes</a> have the same B-tree structure as clustered indexes. The data rows of the underlying table are not sorted and stored in order based on their non clustered keys. The leaf layer of a nonclustered index is made up of index pages instead of data pages. You can create up to 999 nonclustered indexes on a table.<strong> </strong></p>
<p><strong>Question &#8211; Does indexes always improve database performance?</strong></p>
<p><strong>Answer &#8211; </strong>NO, sometimes indexes can reduce your database performance if you are running a bulk data upload or your application has a nature of frequent data Insert operations. Indexes are very useful if you are accessing or reading the data.</p>
<p><strong>Question &#8211; What is filter index?</strong></p>
<p><strong>Answer &#8211;  </strong>An optimized nonclustered index, especially suited to cover queries that select from a well-defined subset of data. It uses a filter predicate to index a portion of rows in the table. A well-designed filtered index can improve query performance, reduce index maintenance costs, and reduce index storage costs compared with full-table indexes. <strong> </strong></p>
<p><strong>Question &#8211; What is covering index?</strong></p>
<p><strong>Answer &#8211; </strong>A covering index is one which can satisfy all requested columns in a query without performing a further lookup into the clustered index.</p>
<p><strong>Question &#8211; Explain column store index?</strong></p>
<p><strong>Answer &#8211; </strong>An in-memory columnstore index stores and manages data by using column-based data storage and column-based query processing.</p>
<p>Columnstore indexes work well for data warehousing workloads that primarily perform bulk loads and read-only queries.<strong> </strong></p>
<p><strong>Question &#8211; Why can’t a table have more than one clustered indexes?</strong></p>
<p><strong>Answer &#8211; </strong>Clustered indexes sort and store the data rows in the table or view based on their key values so you can’t store data in table based on two index key that’s why you can create only one cluster index on a table.</p>
<p><strong>Question -What is Heap and when it is useful from clustered table?</strong></p>
<p><strong>Answer &#8211; </strong>Heap is a table without having cluster indexes. Heaps are generally useful if you are running huge bulk data load or frequent DML operations.</p>
<p><strong>Question &#8211; How do you find about missing indexes that you need to create to improve database performance?</strong></p>
<p><strong>Answer &#8211; </strong>We can run SQL Server database Tuning Advisor that will suggests us about all the missing indexes that we should create to improve db performance. We can also use DMVs related to missing indexes sys.dm_db_missing_index_details, sys.dm_db_missing_index_groups and sys.dm_db_missing_index_columns to get these details.</p>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/interview-questions/sql-server-interview-questions/sql-server-interview-questions-answers-indexes/">SQL Server Interview Questions &#038; Answers on Indexes</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/interview-questions/sql-server-interview-questions/sql-server-interview-questions-answers-indexes/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Identify Disk Bottleneck in SQL Server using Perfmon Disk Counters</title>
		<link>https://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/</link>
					<comments>https://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/#comments</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Mon, 27 Nov 2017 10:24:45 +0000</pubDate>
				<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Disk Bottleneck]]></category>
		<category><![CDATA[Disk IO]]></category>
		<category><![CDATA[IO]]></category>
		<category><![CDATA[Perfmon Counters]]></category>
		<category><![CDATA[Perfmon Disk Counters]]></category>
		<category><![CDATA[performance tuning]]></category>
		<category><![CDATA[Poor Disk IO]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1261</guid>

					<description><![CDATA[<p>Disk I/O problems are some of the most difficult problems to diagnose and to debug. Here I am going to discuss about perfmon disk counters that will help us in diagnosing the disk related issues. I will segregate the values&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/">Identify Disk Bottleneck in SQL Server using Perfmon Disk Counters</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Disk I/O problems are some of the most difficult problems to diagnose and to debug. Here I am going to discuss about perfmon disk counters that will help us in diagnosing the disk related issues. I will segregate the values for all disk counters into three categories, <strong>Excellent, Good </strong>and<strong> Poor</strong>. Get your values for these disk counters and compare with these three categories to know how your disk is performing whether your disk is performing excellent, good or it’s required your intervention to improve its performance.</p>
<ol>
<li><strong>Excellent –</strong> You Disk Subsystem is responding perfectly for respective counter.</li>
<li><strong>Good –</strong> You Disk Subsystem is responding fairly for respective counter and you can consider it good considering your workload and other resource utilization.</li>
<li><strong>Poor –</strong> You Disk Subsystem is not responding well for respective counter and it requires your intervention to drill down more to understand the reason behind slowness.</li>
</ol>
<p>If you want to read about CPU and Memory related performance counters then i would suggest you to go through with below attached articles.</p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/" target="_blank" rel="noopener">Top Perfmon Counters to Identify SQL Server CPU Bottleneck</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/top-10-performance-counters-to-identify-sql-server-memory-pressure/" target="_blank" rel="noopener">Top 10 Perfmon Counters to Identify SQL Server Memory Pressure</a></strong></li>
</ul>
<p>Below are the list of important perfmon disk counters that we will be discussing in this article.</p>
<ul>
<li>Average Disk Sec/Read</li>
<li>Average Disk Sec/Write</li>
<li>Average Disk Sec/Transfer</li>
<li>Average Disk Queue Length</li>
<li>Current Disk Queue Length</li>
<li>Disk Read/Sec and Disk Write/Sec</li>
<li>%Disk Time</li>
<li>%Idle Time</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1266" src="http://techyaz.com/wp-content/uploads/2017/11/Perfmon-Disk-IO-Counters.png" alt="Perfmon Disk IO Counters" width="560" height="315" srcset="https://techyaz.com/wp-content/uploads/2017/11/Perfmon-Disk-IO-Counters.png 560w, https://techyaz.com/wp-content/uploads/2017/11/Perfmon-Disk-IO-Counters-300x169.png 300w" sizes="auto, (max-width: 560px) 100vw, 560px" /></p>
<h5><span style="color: #333399;"><strong>Average Disk Sec/Read</strong></span></h5>
<p><strong>Average Disk Sec/Read</strong> is important perfmon disk counter that shows the average time in seconds needed to read data from disk and better explain the disk latency. We can find these counters at the logical and physical disk object level. The value for this counter is generally the number of seconds it takes to do each read. The shorter the time needed to read or write data, the faster the system. If you constantly get this counter value more than 20ms then it means your disk is not performing well.</p>
<p>Your disk performance is:</p>
<ul>
<li><strong>Excellent, </strong>if the value of this counter is less than 6 milliseconds (0.006 sec)</li>
<li><strong>Good</strong>, if the value of this counter is up to 15 milliseconds (0.015 sec)</li>
<li><strong>Poor</strong>, if the value is constantly more than 15 milliseconds (0.015 sec)</li>
</ul>
<h5><span style="color: #333399;"><strong>Average Disk Sec/Write</strong></span></h5>
<p><strong>Average Disk Sec/Write </strong>is also an important counter that shows the average time in seconds needed to write data to disk. that can better explain the disk latency. This counter can be tracked at the logical and physical disk level. The value for this counter is generally the number of seconds it takes to do each read. The shorter the time needed to read or write data, the faster the system. If you constantly get this counter value more than 20ms then it means your disk is not performing well.</p>
<p>Your disk performance is:</p>
<ul>
<li><strong>Excellent, </strong>if the value of this counter is less than 6 milliseconds</li>
<li><strong>Good</strong>, if the value of this counter is up to 15 milliseconds</li>
<li><strong>Poor</strong>, if the value is constantly more than 15 milliseconds.</li>
</ul>
<h5><span style="color: #333399;"><strong>Average Disk Sec/Transfer</strong></span></h5>
<p><strong>Average Disk Sec/Transfer</strong> is a time that measures average latency for read or write operations. If the Average Disk Sec/Transfer value increases, this indicates that the I/O subsystem is not optimally keeping up with the I/O demand. This counter is available under Logical Disk and Physical Disk object. If you are keeping a watch on this counter make sure to have a look at above perfmon disk counters <strong>Average Disk Sec/ Read</strong> and <strong>Average Disk Sec/Write</strong> as well because Average Disk Sec/Transfer is the average of both read and write counters so you need to find out high value is due to read operation or write operation. Below are the values that will tell you whether your disk is performing excellent, good or it is performing slow and requires your intervention to improve its performance.</p>
<p>Your disk performance is:</p>
<ul>
<li><strong>Excellent, </strong>if the value of this counter is less than 6 milliseconds</li>
<li><strong>Good</strong>, if the value of this counter is up to 15 milliseconds</li>
<li><strong>Poor</strong>, if the value is constantly more than 15 milliseconds.</li>
</ul>
<h5><span style="color: #333399;"><strong>Average Disk Queue Length</strong></span></h5>
<p><strong>Average Disk Queue Length</strong> counter shows you the average number of read and write requests that were queued on the selected physical disk. If this value is exceeding its threshold frequently then we should also look at other perfmon disk counters <strong>Average Disk Read Queue Length</strong> and <strong>Average Disk Write Queue Length</strong>. This way you can diagnose whether Average Disk Queue Length is high due to high read or high write operation. The recommended value for this counter is less than 2 per individual disk so if you have multiple disks then your recommended value for Average disk queue length would be twice the no of disks.</p>
<p><strong>Be careful</strong> when using thresholds of 2 with SQL Server and SANs.  This value can be much higher than 2 if you have multiple disks.  Let’s say you have 6 drives and Average disk queue length counter is showing around 12, then you should consider your Average disk queue length value 9/6 = 1.5 not 9.</p>
<p>Your disk performance is:</p>
<ul>
<li><strong>Excellent, </strong>if the value of this counter is less than 1.5 per drive.</li>
<li><strong>Good</strong>, if the value of this counter is up to 2 per drive.</li>
<li><strong>Poor</strong>, if the value is constantly more than 2 per drive,</li>
</ul>
<h5><span style="color: #333399;"><strong>Current Disk Queue Length</strong></span></h5>
<p><strong>Current Disk Queue Length</strong> is the number of disk requests that are currently waiting as well as requests currently being serviced. The difference between average disk queue length and current queue length is CDQL tells current load whereas ADQL tells load during a given time frame. The Current Disk Queue Length metric in Windows Performance Monitor is available for both physical and logical disk. The Current Disk Queue Length value should be less than 2 per disk.</p>
<p>Your disk performance is:</p>
<ul>
<li><strong>Excellent, </strong>if the value of this counter is less than 1.5 per drive.</li>
<li><strong>Good</strong>, if the value of this counter is up to 2 per drive.</li>
<li><strong>Poor</strong>, if the value is constantly more than 2 per drive.</li>
</ul>
<h5><span style="color: #333399;"><strong>Disk Read/Sec and Disk Write/Sec</strong></span></h5>
<p><strong>Disk Reads/Sec</strong> and <strong>Disk Writes/Sec</strong> show you the number of read and write operations happening per second on the disk. If you want to set the benchmark for disk capacity then you can determine it by gradually increasing the load on the system.</p>
<p>Your disk performance is:</p>
<ul>
<li><strong>Excellent, </strong>if the value of this counter is less than 75% of total disk capacity.</li>
<li><strong>Good</strong>, if the value of this counter is up to 85% of total disk capacity.</li>
<li><strong>Poor</strong>, if the value is constantly more than 85% of total disk capacity.</li>
</ul>
<h5><span style="color: #333399;"><strong>%Disk Time</strong></span></h5>
<p><strong>%Disk Time</strong> counter tells how busy the disk is in performing read and write operations. You can see its values normal even your disk has serious disk performance issue. You should compare its value with current/average disk queue length before reaching on any conclusion about disk issue.</p>
<p>Your disk performance is:</p>
<ul>
<li><strong>Excellent, </strong>if the value of this counter is less than 75% of total disk capacity.</li>
<li><strong>Good</strong>, if the value of this counter is up to 85% of total disk capacity.</li>
<li><strong>Poor</strong>, if the value is constantly more than 85% of total disk capacity.</li>
</ul>
<h5><span style="color: #333399;"><strong>%Idle Time</strong></span></h5>
<p><strong>%Idle Time</strong> measures the percentage of time the disk was idle during the sample interval. The disk is idle when it’s not processing read and write requests. If you are constantly getting its value less than 40% then you can either move some applications from your machine to another machine if you are running other applications as well apart from SQL Server or You can change the current disk system with a faster disk system.</p>
<p>Your disk performance is:</p>
<ul>
<li><strong>Excellent, </strong>if the value of this counter is greater than 60% of total disk capacity.</li>
<li><strong>Good</strong>, if the value of this counter is greater than 50% of total disk capacity.</li>
<li><strong>Poor</strong>, if the value is constantly less than 40% of total disk capacity.</li>
</ul>
<p><span style="color: #800000;"><strong><em>Related Articles:</em></strong></span></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/performing-online-index-rebuild-operation/" target="_blank" rel="noopener">Disk and Performance Impact of running Online Index Rebuild Operation</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/sql-server-encountered-32-occurrences-requests-taking-longer-15-seconds-complete/" target="_blank" rel="noopener">How to fix IO error: SQL Server has encountered N occurrence(s) of I/O requests taking longer than 15 seconds to complete.</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/improve-sql-server-bulk-data-import-performance/" target="_blank" rel="noopener">Improving Bulk Data Load Performance in SQL Server</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/async_io_completion-wait-type/" target="_blank" rel="noopener">Understanding ASYNC_IO_COMPLETION Wait Type</a></strong></li>
</ul>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/" target="_blank" rel="noopener">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/">Identify Disk Bottleneck in SQL Server using Perfmon Disk Counters</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Fix Event ID 833: SQL Server has encountered 32 occurrence(s) of I/O requests taking longer than 15 seconds to complete.</title>
		<link>https://techyaz.com/sql-server/performance-tuning/sql-server-encountered-32-occurrences-requests-taking-longer-15-seconds-complete/</link>
					<comments>https://techyaz.com/sql-server/performance-tuning/sql-server-encountered-32-occurrences-requests-taking-longer-15-seconds-complete/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Wed, 22 Nov 2017 13:44:54 +0000</pubDate>
				<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Wait Types]]></category>
		<category><![CDATA[Disk IO]]></category>
		<category><![CDATA[IO]]></category>
		<category><![CDATA[performance tuning]]></category>
		<category><![CDATA[Poor Disk IO]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1183</guid>

					<description><![CDATA[<p>Last week, we found some slowness in one of our database server. When we analyzed the database server, we found poor disk performance where I/O requests taking longer than 15 seconds to complete. Below messages were logged multiple times in error&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/sql-server-encountered-32-occurrences-requests-taking-longer-15-seconds-complete/">Fix Event ID 833: SQL Server has encountered 32 occurrence(s) of I/O requests taking longer than 15 seconds to complete.</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Last week, we found some slowness in one of our database server. When we analyzed the database server, we found <a href="https://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/" target="_blank" rel="noopener">poor disk performance</a> where I/O requests taking longer than 15 seconds to complete. Below messages were logged multiple times in error log file under event id 833. Here i will describe about fixing Microsoft SQL Server Error 833.</p>
<p><span style="color: #ff0000;">SQL Server has encountered 32 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [E:\MSSQL\Data\database_file.mdf] in database [Database_Name] (%d). The OS file handle is 0x000000F543. The offset of the latest long I/O is: 0x000000004h583. </span></p>
<p>This message indicates that SQL Server has issued a read or write request from disk, and the I/O requests taking longer than 15 seconds to return. Microsoft SQL Server reports Event Id 833 to the event log, and above text in the ERRORLOG file along with other symptoms like high wait times for PAGEIOLATCH waits or other disk IO related wait types in SQL Server.</p>
<p><img loading="lazy" decoding="async" class="wp-image-1187 aligncenter" src="https://techyaz.com/wp-content/uploads/2017/11/event-id-833-e1527855680849-1024x420.jpg" alt="event id 833" width="664" height="272" srcset="https://techyaz.com/wp-content/uploads/2017/11/event-id-833-e1527855680849-1024x420.jpg 1024w, https://techyaz.com/wp-content/uploads/2017/11/event-id-833-e1527855680849-300x123.jpg 300w, https://techyaz.com/wp-content/uploads/2017/11/event-id-833-e1527855680849-768x315.jpg 768w, https://techyaz.com/wp-content/uploads/2017/11/event-id-833-e1527855680849.jpg 1147w" sizes="auto, (max-width: 664px) 100vw, 664px" /></p>
<h5><span style="color: #333399;">Why we get this issue/warning?</span></h5>
<p>SQL Server database is designed to perform intensive disk I/O operations. An I/O operation may be either a read or a write operation and the standard disk speed to perform these operations is around 10 milliseconds or less. If any of the read or write operation takes more time to perform their activity and generally disk speed reaches or exceeds 15 seconds of time, then database engine reports event id 833 along with above log information in error log file.</p>
<p>If you receive such messages, it does not mean problems with SQL Server. They are reported to let DBAs and system administrator know about poor storage performance and help them to investigate why the I/O request took so long. Long I/Os often indicate a SQL Server workload that is too intense for the disk subsystem. Disk Subsystems perform poorly/slowly because of either stuck or stalled IO operations. Before going ahead let’s first understand about stuck and stalled IO operation.</p>
<h6><span style="color: #333399;"><strong>Stuck I/O</strong></span></h6>
<p>Stuck I/O is defined as an I/O request that does not finish.  To resolve a stuck I/O condition, you must usually restart the computer or perform a similar action. A stuck I/O condition typically indicates one of the following:</p>
<ul>
<li>Faulty hardware</li>
<li>A bug in an I/O path component</li>
</ul>
<h6><span style="color: #333399;"><strong>Stalled I/O</strong></span></h6>
<p>Stalled I/O is defined as an I/O request that does finish or that takes excessive time to finish. Stalled I/O behavior typically occurs because of one of the following reasons:</p>
<ul>
<li>The hardware configuration</li>
<li>The firmware settings</li>
</ul>
<p>Below is the list of items that can cause stuck or stalled I/O operations on disk subsystem that can adversely affect SQL Server performance.</p>
<ul>
<li>Faulty hardware</li>
<li>Incorrectly configured hardware</li>
<li>Firmware settings</li>
<li>Filter drivers</li>
<li>Compression</li>
<li>Bugs</li>
<li>All transactions are in one drive like (backup, live database updates)</li>
<li>Blocking</li>
<li>Latch contentions</li>
<li>Missing Indexes in databases</li>
</ul>
<h5><span style="color: #333399;">Resolution</span></h5>
<p>Disk I/O problems are one of the most difficult problems to diagnose and to find the root cause. There might be multiple reasons due to which your disk subsystems perform slow. First step towards fixing such issue is to examining the event logs for any hardware related error messages and then proceed towards fix accordingly. Follow below steps to reduce the IO overheads on your database server if I/O requests taking longer than 15 seconds or perfoming slow.</p>
<ol start="1">
<li>Check &amp; update all missing device drivers and firmware with the latest updates.</li>
</ol>
<ol start="2">
<li>Analyze memory pressure and CPU usages trends as well because if you will run with CPU or memory pressure, there might be possibility slow disk performance.</li>
</ol>
<ol start="3">
<li>Monitor <a href="https://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/" target="_blank" rel="noopener">disk I/O performance counters either using Performance Monitor</a> or using DMVs to examine your disk subsystem workload. Read attached article to get the optimum values for all given counters. It’s highly recommended to monitor these counters for a while, and then compare it to your disk baselines value that you had captured during stress testing or load testing exercise.</li>
</ol>
<ul>
<li><em>Average Disk Sec/Transfer</em></li>
<li><em>Average Disk Sec/Read</em></li>
<li><em>Average Disk Sec/Write</em></li>
<li><em>Average Disk Queue Length</em></li>
<li><em>Current Disk Queue Length</em></li>
<li><em>Disk Read/Sec</em></li>
<li><em>Disk Write/Sec</em></li>
<li><em>%Disk Time</em></li>
</ul>
<ol start="4">
<li>Microsoft suggests being careful when you use the performance counters because SQL Server takes full advantage of asynchronous I/O capabilities that push the disk queue lengths heavily. Therefore, longer disk queue lengths alone do not indicate a problem. So, compare every counter with their baseline and then analyze the trend.</li>
</ol>
<ol start="5">
<li>Monitor <a href="https://techyaz.com/sql-server/what-is-sql-server-wait-type-or-how-to-get-wait-type-info-in-sql-server/" target="_blank" rel="noopener">SQL Server Wait Types</a>, If the disk is slowing all the times then you will get wait types PAGEIOLATCH, WRITELOG or LOGBUFFER with high wait time.</li>
</ol>
<ol start="6">
<li>Exclude SQL Server Data and Log files from antivirus software scans. If your <a href="https://techyaz.com/sql-server/understanding-sql-server-data-files-pages-extents/" target="_blank" rel="noopener">database files</a> are configured to be scanned by antivirus software then this will have slowed your disk performance.</li>
</ol>
<ol start="7">
<li>If you are getting this issue on a specific time then I would suggest checking the conflict between your SQL Server Agent Jobs? There might be some data load/Disk IO intensive query or database maintenance activities will be running parallelly at the same time. Change the Agent jobs schedule time carefully so that they should not conflict to each other.</li>
</ol>
<ol start="8">
<li>Don’t place database files and backups on single drive. Always place data file, <a href="https://techyaz.com/sql-server/understanding-transaction-log-architecture/" target="_blank" rel="noopener">log files</a> and tempdb files on separate drives to reduce disk IO overhead. Also, it is highly recommended to run backups on separate drive because if you run backups on data drives then this can reduce disk performance.</li>
</ol>
<ol start="9">
<li>Check your database files property for which you are getting this error. The size of database files should not be limited to fixed size with auto growth disabled. Enabling the auto growth of all the data files with appropriate value can fix this issue if you have put limits of database files growth. Read the attached article to <a href="https://techyaz.com/sql-server/understanding-database-autogrowth-sql-server/" target="_blank" rel="noopener">understand the best value for database file autogrowth</a>.</li>
</ol>
<ol start="10">
<li>Disk I/O can perform poorly if there is no proper indexing on your tables. You can use Index Turning Wizard to resolve I/O pressure on the system. You can find missing indexes from most used or accessed tables and create appropriate indexes to reduce query time and resources overhead.</li>
</ol>
<h5><span style="color: #333399;">Disable this Error to Log using Trace flag 830</span></h5>
<p>Microsoft has given us an option to disable stalled or stuck I/O detection by using trace flag 830, although we do not recommend that you do this.</p>
<p>To disable detection when SQL Server starts, use the <strong>-T830</strong> startup parameter to disable detection every time that SQL Server is started. To disable detection for an instance of SQL Server that is currently running, use the following statement:</p>
<pre><strong><span style="color: #0000ff;">dbcc traceoff(830, -1)
</span></strong></pre>
<p>This setting is effective only for the life of the SQL Server process.</p>
<p><em><span style="color: #800000;"><strong>Related Articles:</strong></span></em></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/" target="_blank" rel="noopener">Identify Disk Bottleneck in SQL Server using Perfmon Disk Counters</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/improve-sql-server-bulk-data-import-performance/" target="_blank" rel="noopener">How to Improve Bulk Data Load Performance?</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/async_io_completion-wait-type/" target="_blank" rel="noopener">What is ASYNC_IO_COMPLETION wait type?</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/backupbuffer-wait-type/" target="_blank" rel="noopener">Understanding BACKUPBUFFER wait type</a></strong></li>
</ul>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/sql-server-encountered-32-occurrences-requests-taking-longer-15-seconds-complete/">Fix Event ID 833: SQL Server has encountered 32 occurrence(s) of I/O requests taking longer than 15 seconds to complete.</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/performance-tuning/sql-server-encountered-32-occurrences-requests-taking-longer-15-seconds-complete/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Avoid Page Split in SQL Server?</title>
		<link>https://techyaz.com/sql-server/how-to-avoid-page-split-in-sql-server/</link>
					<comments>https://techyaz.com/sql-server/how-to-avoid-page-split-in-sql-server/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Tue, 14 Nov 2017 12:48:59 +0000</pubDate>
				<category><![CDATA[Indexes]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[fill factor]]></category>
		<category><![CDATA[index rebuild]]></category>
		<category><![CDATA[Page Split]]></category>
		<category><![CDATA[SQL Server Indexes]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1130</guid>

					<description><![CDATA[<p>This is very interesting topic. How to Avoid Page Split in SQL Server? Let&#8217;s start with basics. Page split is a resource intensive operation and causes fragmentation that leads to poor performance in terms of increased I/O operations. We should&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/how-to-avoid-page-split-in-sql-server/">How to Avoid Page Split in SQL Server?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This is very interesting topic. How to Avoid Page Split in SQL Server? Let&#8217;s start with basics. Page split is a resource intensive operation and causes <a href="https://techyaz.com/sql-server/difference-index-rebuild-reorganize/" target="_blank" rel="noopener">fragmentation</a> that leads to poor performance in terms of increased I/O operations. We should take it seriously if  there are frequent page splits occur and consider to reduce its occurrences.  Here, i will explain how to check Page Split in SQL Server and how to reduce Page Split and its occurrence.</p>
<h3><span style="color: #333399;">What is Page Split?</span></h3>
<p>Whenever you update existing rows with the data that is bigger in size to save on their data page then Page Split operation occur to make space for this new update. Data from existing data page first move to new page that is added during Page Split operation and make room to accommodate new records. That is why this operation is resource intensive and create fragmentation. Page splits only occur when data changes in the database. If you are adding all your data at the end of the table then page split will not occur.</p>
<p>If your fill factor is 100 or 0, it will work in a same way. That means there is no room in leaf level page to accommodate future updates. Setting fill factor value to 0 or 100 will increase page split occurrences.</p>
<h3><span style="color: #333399;">How to Check Page Split in SQL Server?</span></h3>
<p>Here, i will explain how to check page split in SQL Server. Whenever Page split occurs, it will be logged in transaction log file as <strong>LOP_DELETE_SPLIT </strong>operation. We use <em>fn_dblog</em> function to read SQL Server transaction log file. Run below T-SQL code to see all page splits occurrence using transaction log file.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span style="color: #0000ff;">SELECT *
FROM
fn_dblog (NULL, NULL)
WHERE
[Operation] = N'LOP_DELETE_SPLIT'
</span></strong></pre>
<p>You can see LOP_DELETE_SPLIT is logged under operations column. That means it&#8217;s a page split operation.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1143" src="http://techyaz.com/wp-content/uploads/2017/11/LOP_DELETE_SPLIT.jpg" alt="page split using fn_dblog" width="654" height="347" srcset="https://techyaz.com/wp-content/uploads/2017/11/LOP_DELETE_SPLIT.jpg 654w, https://techyaz.com/wp-content/uploads/2017/11/LOP_DELETE_SPLIT-300x159.jpg 300w" sizes="auto, (max-width: 654px) 100vw, 654px" /></p>
<p><a href="https://www.sqlskills.com/blogs/paul/tracking-page-splits-using-the-transaction-log/" target="_blank" rel="noopener">Paul Randel</a> has given very good sql code to check total number of page splits occurrence. Below is the code you need to run to get this details.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span style="color: #0000ff;">SELECT
[AllocUnitName] AS N'Index',
(CASE [Context]
WHEN N'LCX_INDEX_LEAF' THEN N'Nonclustered'
WHEN N'LCX_CLUSTERED' THEN N'Clustered'
ELSE N'Non-Leaf'
END) AS [SplitType],
COUNT (1) AS [SplitCount]
FROM
fn_dblog (NULL, NULL)
WHERE
[Operation] = N'LOP_DELETE_SPLIT'
GROUP BY [AllocUnitName], [Context];
GO
</span></strong></pre>
<p>You can check total number of page splits are shown for each indexes in below screenshot. Now we will discuss how to avoid page split in SQL Server for such indexes.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1144" src="http://techyaz.com/wp-content/uploads/2017/11/page-split-occurance.jpg" alt="Total number of page splits" width="553" height="421" srcset="https://techyaz.com/wp-content/uploads/2017/11/page-split-occurance.jpg 553w, https://techyaz.com/wp-content/uploads/2017/11/page-split-occurance-300x228.jpg 300w" sizes="auto, (max-width: 553px) 100vw, 553px" /></p>
<h3><span style="color: #333399;">How to Reduce Page Split Occurrences?</span></h3>
<p>An <a href="https://techyaz.com/sql-server/understanding-sql-server-indexes/" target="_blank" rel="noopener">index</a> that has many random inserts and has very full pages will have an increased number of page splits. This causes more fragmentation and that is very bad for performance. We can reduce page splits by keeping some room in the data pages by setting fill factor value less than 100. The extra bytes on each page will help to minimize page splits caused by extra length in the rows. Read attached article to understand <a href="https://techyaz.com/sql-server/what-should-be-the-best-value-for-fill-factor-in-sql-server/" target="_blank" rel="noopener">the best value for fill factor</a> to avoid such page-split operations.</p>
<p>We can also use <a href="https://techyaz.com/sql-server/difference-index-rebuild-reorganize/" target="_blank" rel="noopener">index rebuild operation</a> with the <a href="https://techyaz.com/sql-server/what-should-be-the-best-value-for-fill-factor-in-sql-server/" target="_blank" rel="noopener">FILL FACTOR</a> option that will allow the page fullness to be changed to fit the query pattern on the index. This will also helpful in reducing total page-split counts.<br />
I hope you like this article. You can drop your questions in comment section. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/how-to-avoid-page-split-in-sql-server/">How to Avoid Page Split in SQL Server?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/how-to-avoid-page-split-in-sql-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Difference between Index Rebuild and Reorganize</title>
		<link>https://techyaz.com/sql-server/indexes/difference-index-rebuild-reorganize/</link>
					<comments>https://techyaz.com/sql-server/indexes/difference-index-rebuild-reorganize/#comments</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Mon, 13 Nov 2017 07:14:21 +0000</pubDate>
				<category><![CDATA[Indexes]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Clustered Index]]></category>
		<category><![CDATA[Index]]></category>
		<category><![CDATA[Nonclustered Index]]></category>
		<category><![CDATA[SQL Server Indexes]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1133</guid>

					<description><![CDATA[<p>Fragmentation exists when indexes have pages in which the logical ordering, based on the key value, does not match the physical ordering inside the data file. Heavily fragmented indexes can degrade query performance and cause your application to respond slowly.&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/indexes/difference-index-rebuild-reorganize/">Difference between Index Rebuild and Reorganize</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Fragmentation exists when indexes have pages in which the logical ordering, based on the key value, does not match the physical ordering inside the data file. Heavily fragmented indexes can degrade query performance and cause your application to respond slowly.  We use SQL Server Index Rebuild and Reorganize operation to remove fragmentation level of the indexes. Let’s have a look at the differences between rebuild and reorganize indexes.</p>
<h3><span style="color: #333399;">Index Rebuild vs Index Reorganize</span></h3>
<p><strong>Index Rebuild</strong> operation first drops and then recreates the index. This removes fragmentation, reclaims disk space by compacting the pages based on the specified or existing fill factor setting. Microsoft recommends Index Rebuild operation to defrag indexes if the fragmentation level of your index is greater than 30%. You can execute Index rebuild operation online as well as offline. <a href="https://techyaz.com/sql-server/performing-online-index-rebuild-operation/" target="_blank" rel="noopener">Online index rebuild operation</a> is enterprise only feature and you can use it if you have SQL Server Enterprise edition.</p>
<p><strong>Reorganizing</strong> an index uses minimal system resources. It defragments the leaf level of <a href="https://techyaz.com/sql-server/understanding-sql-server-indexes/" target="_blank" rel="noopener">clustered and nonclustered indexes</a> on tables and views by physically reordering the leaf-level pages to match the logical, left to right, order of the leaf nodes. Microsoft recommends using Index Reorganize operation to defrag indexes if the fragmentation level of your index is greater than 5% and less than or equal to 30%. Reorganizing an index is always executed online.</p>
<p><span style="color: #800000;"><em><strong>Read More:</strong></em></span></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/what-should-be-the-best-value-for-fill-factor-in-sql-server/" target="_blank" rel="noopener">What should be best value for fill factor in SQL Server?</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/how-to-avoid-page-split-in-sql-server/" target="_blank" rel="noopener">How to Avoid Page Split in SQL Server?</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-interview-questions-answers-indexes/" target="_blank" rel="noopener">SQL Server Interview Questions &amp; Answers on Indexes</a></strong></li>
</ul>
<h3><span style="color: #333399;">How to Check Fragmentation Level?</span></h3>
<p>First, we detect the fragmentation level of the indexes. Once we have the details about fragmented indexes then we can decide whether to rebuild that index or reorganize it. We can get index fragmentation level using DMV sys.dm_db_index_physical_stats or by launching dashboard report. Find the average fragmentation percentage of all indexes in the table dbo.Salary of database techyaz by running below T-SQL script.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span style="color: #0000ff;">USE Techyaz;
GO
SELECT a.index_id, name, avg_fragmentation_in_percent
FROM sys.dm_db_index_physical_stats (DB_ID(N'Techyaz'),
OBJECT_ID(N'dbo.salary'), NULL, NULL, NULL) AS a
JOIN sys.indexes AS b
ON a.object_id = b.object_id AND a.index_id = b.index_id;
GO
</span></strong></pre>
<p>We can see the output of this code in below image. As i have only one table and two indexes in my database but if you have multiple tables and indexes then output will look accordingly.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1134" src="http://techyaz.com/wp-content/uploads/2017/11/1-Check-Fragmentation-level.jpg" alt="check fragmentation level" width="515" height="279" srcset="https://techyaz.com/wp-content/uploads/2017/11/1-Check-Fragmentation-level.jpg 515w, https://techyaz.com/wp-content/uploads/2017/11/1-Check-Fragmentation-level-300x163.jpg 300w" sizes="auto, (max-width: 515px) 100vw, 515px" /></p>
<p>Another way to check the fragmentation level of your indexes is by running dashboard report.  Right click on your database, click on <strong>“Reports”</strong> then <strong>“Standard Reports</strong>” then finally click on <strong>“Index Physical Statistics”</strong> report. You can see this in below screenshot.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1135" src="http://techyaz.com/wp-content/uploads/2017/11/2-launch-dashboard-report.jpg" alt="Index physical statistics report" width="849" height="605" srcset="https://techyaz.com/wp-content/uploads/2017/11/2-launch-dashboard-report.jpg 849w, https://techyaz.com/wp-content/uploads/2017/11/2-launch-dashboard-report-300x214.jpg 300w, https://techyaz.com/wp-content/uploads/2017/11/2-launch-dashboard-report-768x547.jpg 768w" sizes="auto, (max-width: 849px) 100vw, 849px" /></p>
<p>Once you click on <strong>“Index Physical Statistics”</strong> report, a dashboard report will run and appear on right side pane as per below screenshot. You will get fragmentation level for each index here.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1136" src="http://techyaz.com/wp-content/uploads/2017/11/3-Dashboard-Report.jpg" alt="fragmented indexes" width="857" height="481" srcset="https://techyaz.com/wp-content/uploads/2017/11/3-Dashboard-Report.jpg 857w, https://techyaz.com/wp-content/uploads/2017/11/3-Dashboard-Report-300x168.jpg 300w, https://techyaz.com/wp-content/uploads/2017/11/3-Dashboard-Report-768x431.jpg 768w" sizes="auto, (max-width: 857px) 100vw, 857px" /></p>
<h3><span style="color: #333399;">How to Remove Fragmentation Level?</span></h3>
<p>There are two ways to remove fragmentation level of indexes. These are by either using <strong>Index Rebuild Operation</strong> or by using <strong>Index Reorganize Operation</strong>. Here, i will show you how to remove fragmentation using both ways one after another.</p>
<p><span style="color: #800000;"><strong>Remove Fragmentation using Index Reorganize Operation</strong></span></p>
<p>We can see our index has very low fragmentation level that is less than 30% in above images so we will reorganize it rather than rebuild. We will rebuild only those indexes that have more than 30% of fragmentation level. Run below T-SQL command to reorganize index IX_Salary_EMPID.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span style="color: #0000ff;">USE Techyaz;
GO

ALTER INDEX IX_Salary_EMPID
ON dbo.Salary
REORGANIZE ;
GO
</span></strong></pre>
<p>If you want to reorganize all indexes of this table dbo.salary in one shot, you can use <strong>ALL</strong> keyword in Alter Index command. Run below command to reorganize all indexes of table dbo.salary in one go.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span style="color: #0000ff;">USE Techyaz;
GO

ALTER INDEX ALL ON dbo.Salary
REORGANIZE;
GO
</span></strong></pre>
<p><span style="color: #800000;"><strong>Remove fragmentation using Index Rebuild Operation</strong></span></p>
<p>Similarly, we will rebuild all those indexes that are highly fragmented. As I don’t have any such index but if you will get any index that has more than 30% of fragmentation then you can run below command to rebuild that index.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span style="color: #0000ff;">USE Techyaz;
GO
ALTER INDEX PK_Salary_EMPCODE ON dbo.Salary
REBUILD;
GO
</span></strong></pre>
<p>If you want to REBUILD all indexes of dbo.salary table in go then again we will use <strong>ALL</strong> keyword in ALTER Index statement as we did in above example during REORGANIZE.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span style="color: #0000ff;">USE Techyaz;
GO
ALTER INDEX ALL ON dbo.Salary
REBUILD WITH (FILLFACTOR = 80, SORT_IN_TEMPDB = ON,
STATISTICS_NORECOMPUTE = ON);
GO
</span></strong></pre>
<p>If your system does not allow any maintenance window and run 24&#215;7 then you can use online method to rebuild these indexes. Read attached article to learn <a href="https://techyaz.com/sql-server/performing-online-index-rebuild-operation/" target="_blank" rel="noopener">how to rebuild indexes online in SQL Server</a>. Even SQL Server 2017 has given more control on index rebuild operation by introducing a new feature called <a href="https://techyaz.com/sql-server/use-resumable-online-index-rebuild-operation-sql-server/" target="_blank" rel="noopener">Resumable Online Index Rebuild</a>. Read the attached article to learn about this feature in which we can pause a index rebuild operation and resume it later from the point it was stopped.</p>
<p>I hope you like this article. You can drop your questions and feedback in comment section. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/indexes/difference-index-rebuild-reorganize/">Difference between Index Rebuild and Reorganize</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/indexes/difference-index-rebuild-reorganize/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Understanding SQL Server Indexes</title>
		<link>https://techyaz.com/sql-server/indexes/understanding-sql-server-indexes/</link>
					<comments>https://techyaz.com/sql-server/indexes/understanding-sql-server-indexes/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Thu, 09 Nov 2017 10:50:08 +0000</pubDate>
				<category><![CDATA[Indexes]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Clustered Index]]></category>
		<category><![CDATA[Index]]></category>
		<category><![CDATA[Nonclustered Index]]></category>
		<category><![CDATA[SQL Server Indexes]]></category>
		<category><![CDATA[SQL_Server_Architecture]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1114</guid>

					<description><![CDATA[<p>SQL Server Indexes are similar to book indexes that we use to search any content in that book. They are very useful in faster data retrieval or data access. We create index on columns of tables or views. An index is&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/indexes/understanding-sql-server-indexes/">Understanding SQL Server Indexes</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>SQL Server Indexes are similar to book indexes that we use to search any content in that book. They are very useful in faster data retrieval or data access. We create index on columns of tables or views. An index is made up of a set of pages (index nodes) that are organized in a B-tree structure. A B-tree structure has three levels.</p>
<ul>
<li>Root Level</li>
<li>Intermediate Level</li>
<li>leaf Level.</li>
</ul>
<p>Clustered index leaf-level pages contain the data in the table whereas Non Clustered index leaf-level pages contain the key value and a pointer to the data row in the clustered index or heap.</p>
<p><span style="color: #800000;"><em><strong>Read More</strong></em></span></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/use-resumable-online-index-rebuild-operation-sql-server/" target="_blank" rel="noopener">How to use Resumable Online Index Rebuild Operation?</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/performing-online-index-rebuild-operation/" target="_blank" rel="noopener">Understanding Online Index Rebuild Operation</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-interview-questions-answers-indexes/attachment/sql-server-interview-questions-and-answers-on-indexes/" target="_blank" rel="noopener">SQL Server Interview Questions &amp; Answers on Indexes</a></strong></li>
</ul>
<p>If your table does not have SQL Server indexes and you want to access data from the table then database engine will take more time and performance because full table scan will be performed to get that data. However, if your table has an index on column, SQL Server can seek directly on the value and retrieve the rows.</p>
<p><img loading="lazy" decoding="async" class="wp-image-1116 size-medium alignleft" src="http://techyaz.com/wp-content/uploads/2017/11/Index-e1510224779231-300x249.jpg" alt="SQL Server Index" width="300" height="249" srcset="https://techyaz.com/wp-content/uploads/2017/11/Index-e1510224779231-300x249.jpg 300w, https://techyaz.com/wp-content/uploads/2017/11/Index-e1510224779231.jpg 719w" sizes="auto, (max-width: 300px) 100vw, 300px" /></p>
<h4><span style="color: #333399;">Index Types</span></h4>
<p>There are multiple types of indexes in SQL Server. Below is the list of such indexes.</p>
<h5><span style="color: #800000;">Clustered Index</span></h5>
<ul>
<li>Clustered indexes sort and store the data rows in the table or view based on their key values. There can be only one clustered index per table, because the data rows themselves can be sorted in only one order.</li>
<li>The only time the data rows in a table are stored in sorted order is when the table contains a clustered index. When a table has a clustered index, the table is called a clustered table. If a table has no clustered index, its data rows are stored in an unordered structure called a heap.</li>
</ul>
<h5><span style="color: #800000;">Nonclustered Index</span></h5>
<ul>
<li>Nonclustered indexes have the same B-tree structure as clustered indexes.</li>
<li>The data rows of the underlying table are not sorted and stored in order based on their nonclustered keys.</li>
<li>The leaf layer of a nonclustered index is made up of index pages instead of data pages.</li>
<li>You can create upto 999 nonclustered indexes on a table.</li>
</ul>
<h5><span style="color: #800000;">Memory-optimized nonclustered indexes</span></h5>
<ul>
<li>For memory-optimized nonclustered indexes, memory consumption is a function of the row count and the size of the index key columns</li>
</ul>
<h5><span style="color: #800000;">Hash Index</span></h5>
<ul>
<li>With a hash index, data is accessed through an in-memory hash table. Hash indexes consume a fixed amount of memory, which is a function of the bucket count.</li>
</ul>
<h5><span style="color: #800000;">Unique  Index</span></h5>
<ul>
<li>A unique index ensures that the index key contains no duplicate values and therefore every row in the table or view is in some way unique. Uniqueness can be a property of both clustered and nonclustered indexes.</li>
</ul>
<h5><span style="color: #800000;">Columnstore Index</span></h5>
<ul>
<li>An in-memory columnstore index stores and manages data by using column-based data storage and column-based query processing.</li>
<li>Columnstore indexes work well for data warehousing workloads that primarily perform bulk loads and read-only queries.</li>
<li>Use the columnstore index to achieve up to 10x query performance gains over traditional row-oriented storage, and up to 7x data compression over the uncompressed data size.</li>
</ul>
<h5><span style="color: #800000;">Index with included columns</span></h5>
<ul>
<li>A nonclustered index that is extended to include nonkey columns in addition to the key columns.</li>
</ul>
<h5><span style="color: #800000;">Index on computed columns  </span></h5>
<ul>
<li>An index on a column that is derived from the value of one or more other columns, or certain deterministic inputs.</li>
</ul>
<h5><span style="color: #800000;">Filtered Index</span></h5>
<ul>
<li>An optimized nonclustered index, especially suited to cover queries that select from a well-defined subset of data. It uses a filter predicate to index a portion of rows in the table. A well-designed filtered index can improve query performance, reduce index maintenance costs, and reduce index storage costs compared with full-table indexes.</li>
</ul>
<h5><span style="color: #800000;">Spatial  Index</span></h5>
<ul>
<li>A spatial index provides the ability to perform certain operations more efficiently on spatial objects (spatial data) in a column of the geometry data type. The spatial index reduces the number of objects on which relatively costly spatial operations need to be applied.</li>
</ul>
<h5><span style="color: #800000;">XML Index</span></h5>
<ul>
<li>A shredded, and persisted, representation of the XML binary large objects (BLOBs) in the xml data type column.</li>
</ul>
<h5><span style="color: #800000;">Full-text Index</span></h5>
<ul>
<li>A special type of token-based functional index that is built and maintained by the Microsoft Full-Text Engine for SQL Server. It provides efficient support for sophisticated word searches in character string data.</li>
</ul>
<h4><span style="color: #333399;">How SQL Server Indexes are used by Query Optimizer</span></h4>
<p>When a query is executed, the query optimizer evaluates each available method for retrieving the data and selects the most efficient method. The method may be a table scan, or may be scanning one or more indexes if they exist. When performing a table scan, the query optimizer reads all the rows in the table, and extracts the rows that meet the criteria of the query. A table scan generates many disk I/O operations and can be resource intensive. However, a table scan could be the most efficient method if, for example, the result set of the query is a high percentage of rows from the table.</p>
<p>When the query optimizer uses an index, it searches the index key columns, finds the storage location of the rows needed by the query and extracts the matching rows from that location. Generally, searching the index is much faster than searching the table because unlike a table, an index frequently contains very few columns per row and the rows are in sorted order.</p>
<p>Your task is to design and create SQL Server indexes that are best suited to your environment so that the query optimizer has a selection of efficient indexes from which to select. SQL Server provides the Database Engine Tuning Advisor to help with the analysis of your database environment and in the selection of appropriate indexes.</p>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/indexes/understanding-sql-server-indexes/">Understanding SQL Server Indexes</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/indexes/understanding-sql-server-indexes/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
