<?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>Query disk usage &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/query-disk-usage/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Sun, 05 Mar 2017 13:56:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>SQL Server: SET STATISTICS IO and SET STATISTICS TIME measure the Query Performance</title>
		<link>https://www.dbrnd.com/2017/03/sql-server-set-statistics-io-and-set-statistics-time-measure-the-query-performance/</link>
					<comments>https://www.dbrnd.com/2017/03/sql-server-set-statistics-io-and-set-statistics-time-measure-the-query-performance/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 15 Mar 2017 16:16:47 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Query analysis]]></category>
		<category><![CDATA[Query CPU usage]]></category>
		<category><![CDATA[Query disk usage]]></category>
		<category><![CDATA[SET STATISTICS IO ON]]></category>
		<category><![CDATA[SET STATISTICS TIME ON]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4243</guid>

					<description><![CDATA[Microsoft SQL Server provides different ways to measure the performance of Query Execution. But two of my favourite options are SET STATISTICS IO and SET STATISTICS TIME. Both the options are very easy to use and return the execution statistics of Query. Both are session specific options; you can set ON/OFF at session level and [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F03%2Fsql-server-set-statistics-io-and-set-statistics-time-measure-the-query-performance%2F&amp;linkname=SQL%20Server%3A%20SET%20STATISTICS%20IO%20and%20SET%20STATISTICS%20TIME%20measure%20the%20Query%20Performance" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F03%2Fsql-server-set-statistics-io-and-set-statistics-time-measure-the-query-performance%2F&amp;linkname=SQL%20Server%3A%20SET%20STATISTICS%20IO%20and%20SET%20STATISTICS%20TIME%20measure%20the%20Query%20Performance" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F03%2Fsql-server-set-statistics-io-and-set-statistics-time-measure-the-query-performance%2F&amp;linkname=SQL%20Server%3A%20SET%20STATISTICS%20IO%20and%20SET%20STATISTICS%20TIME%20measure%20the%20Query%20Performance" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F03%2Fsql-server-set-statistics-io-and-set-statistics-time-measure-the-query-performance%2F&amp;linkname=SQL%20Server%3A%20SET%20STATISTICS%20IO%20and%20SET%20STATISTICS%20TIME%20measure%20the%20Query%20Performance" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F03%2Fsql-server-set-statistics-io-and-set-statistics-time-measure-the-query-performance%2F&amp;linkname=SQL%20Server%3A%20SET%20STATISTICS%20IO%20and%20SET%20STATISTICS%20TIME%20measure%20the%20Query%20Performance" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F03%2Fsql-server-set-statistics-io-and-set-statistics-time-measure-the-query-performance%2F&amp;linkname=SQL%20Server%3A%20SET%20STATISTICS%20IO%20and%20SET%20STATISTICS%20TIME%20measure%20the%20Query%20Performance" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F03%2Fsql-server-set-statistics-io-and-set-statistics-time-measure-the-query-performance%2F&#038;title=SQL%20Server%3A%20SET%20STATISTICS%20IO%20and%20SET%20STATISTICS%20TIME%20measure%20the%20Query%20Performance" data-a2a-url="https://www.dbrnd.com/2017/03/sql-server-set-statistics-io-and-set-statistics-time-measure-the-query-performance/" data-a2a-title="SQL Server: SET STATISTICS IO and SET STATISTICS TIME measure the Query Performance"></a></p><p>Microsoft SQL Server provides different ways to measure the performance of Query Execution.<br />
But two of my favourite options are SET STATISTICS IO and SET STATISTICS TIME.</p>
<blockquote><p>Both the options are very easy to use and return the execution statistics of Query.<br />
Both are session specific options; you can set ON/OFF at session level and returns the result in the Message Window.</p></blockquote>
<p><strong>STATISTICS IO:</strong><br />
Using this option, you can find that how your query is interacting with your Physical Storage.<br />
You will get the information like:</p>
<ul>
<li><strong>Scan count:</strong> Total number of seeks/scans started after reaching the leaf level in any direction to retrieve all the values to construct the final dataset for the output.</li>
<li><strong>Physical Reads:</strong> Physical access of total number of 8kb pages which are not available in Memory.</li>
<li><strong>Logical Reads: </strong>Total number of pages read from the data cache.</li>
<li><strong>Read-ahead Reads:</strong> Total number of pages placed into the cache for the query.</li>
</ul>
<p><strong>SET STATISTICS IO ON/OFF:</strong></p><pre class="crayon-plain-tag">SET STATISTICS IO ON;
SET STATISTICS IO OFF;</pre><p> </p>
<p><strong>STATISTICS TIME:</strong></p>
<blockquote><p>You can use SET STATISTICS TIME to see the number of milliseconds required to parse, compile, and execute of a Query.</p></blockquote>
<blockquote><p>This is very useful for tracking different stages of Query Execution.<br />
Using CPU time, You can find server side CPU usage and using Elapsed time, you can find that how long it took to return the data to the client.</p></blockquote>
<p><strong>SET STATISTICS TIME ON/OFF:</strong><br />
<pre class="crayon-plain-tag">SET STATISTICS TIME ON;
SET STATISTICS TIME OFF;</pre>
<strong>Example Result of STATISTICS TIME ON:</strong><br />
<pre class="crayon-plain-tag">SQL Server Execution Times:
   CPU time = 10 ms,  elapsed time = 23 ms.
SQL Server parse and compile time: 
   CPU time = 115 ms, elapsed time = 50 ms.</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2017/03/sql-server-set-statistics-io-and-set-statistics-time-measure-the-query-performance/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
