<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>SQL Server Journey with SQL Authority &#187; SQL Optimization</title>
	<atom:link href="http://blog.sqlauthority.com/category/sql-optimization/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Wed, 08 Feb 2012 13:09:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.sqlauthority.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/08e35387c05b61340e885b1763a69d9f?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>SQL Server Journey with SQL Authority &#187; SQL Optimization</title>
		<link>http://blog.sqlauthority.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.sqlauthority.com/osd.xml" title="SQL Server Journey with SQL Authority" />
	<atom:link rel='hub' href='http://blog.sqlauthority.com/?pushpress=hub'/>
		<item>
		<title>SQL SERVER &#8211; Using SafePeak to Accelerate Performance of 3rd Party Applications</title>
		<link>http://blog.sqlauthority.com/2012/01/16/sql-server-using-safepeak-to-accelerate-performance-of-3rd-party-applications/</link>
		<comments>http://blog.sqlauthority.com/2012/01/16/sql-server-using-safepeak-to-accelerate-performance-of-3rd-party-applications/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 01:30:17 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[PostADay]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=16924</guid>
		<description><![CDATA[An exciting solution I found last year (2011) for SQL Server performance acceleration is SafePeak. Designed to specifically to accelerate and tune performance of cases where you have minimum control on the applications, like 3rd party line of business applications. SafePeak performs automated caching of queries and procedures results, returning with very high speed results [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16924&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">An exciting solution I found last year (2011) for SQL Server performance acceleration is <a href="http://www.safepeak.com/download?source=sqlauthority-sidebar">SafePeak</a>. Designed to specifically to accelerate and tune performance of cases where you have minimum control on the applications, like 3<sup>rd</sup> party line of business applications. SafePeak performs automated <strong>caching</strong> of queries and procedures results, returning with very high speed results from memory and reducing the SQL load by factor of 10. No code changes needed. And that is make it very interesting and appealing!</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/safepeak64bit.png" alt="" width="499" height="262" /></p>
<p style="text-align:justify;">One of the questions I hear many times concern performance acceleration of 3<sup>rd</sup> party applications applications that are critical to business function, the <em><strong>“line of business”</strong></em> applications. In most cases critical software remain intact for many years, growing and expanding but also losing its performance edge and affecting the business for the worse, instead for the good. The main problem with fixing and tuning 3<sup>rd</sup> party apps is that it is a closed code or someone else’s code. Those applications are waiting for an upgrade every few years, while the business being affected for the worse.</p>
<p style="text-align:justify;">SafePeak idea: a middleware software that studies SQL Server schema (tables, views, stored procedures, functions, triggers) to learn about object dependencies, and then creates patterns of similar SQL queries and procedures executions while understanding their direct and indirect object dependents. And then it starts actively caching results in RAM, while keeping those update commands (DML, DDL and procs that do DML or DDL) to both effect the cache and the SQL Server. After downloading it (<a href="http://www.safepeak.com/download?source=sqlauthority-sidebar">www.safepeak.com/download</a>) the installation is on a standard Windows 2008 R2 virtual machine or a server (different then the SQL server) takes several minutes. Connecting the application is done by pointing the connection string to SafePeak (easy). Configuration is done via their very nice looking GUI and focuses on things SafePeak didn’t understood, which are usually procedures that have some dynamic code inside.</p>
<p style="text-align:justify;">Results can be very exciting: cached queries response time is reduced to 0.25 millisecond or so. Yes, I meant millisecond, pretty impressive. So queries that are slow become extremely fast and queries that are already fast become even faster.</p>
<p style="text-align:justify;">Because it no code change is involved this specifically fits well 3<sup>rd</sup> party applications – plug it in, play with it for couple of hours of fine-tuning and see the results.</p>
<p style="text-align:justify;"><a href="http://www.safepeak.com/download?source=sqlauthority-sidebar">SafePeak</a> supports SQL 2000, 2005, 2008 and 2008 R2 and can run in a private cloud or the public cloud.</p>
<p style="text-align:justify;">SafePeak provides a 14 days trial with all functions available for a single installation (they also have a safepeak cluster installation, which I plan to review in near future). The download is available here: <a href="http://www.safepeak.com/download?source=sqlauthority-sidebar">www.safepeak.com/download</a> &#8211; Good luck and tell me your stories.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/16924/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/16924/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/16924/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/16924/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/16924/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/16924/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/16924/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/16924/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/16924/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/16924/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/16924/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/16924/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/16924/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/16924/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16924&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/01/16/sql-server-using-safepeak-to-accelerate-performance-of-3rd-party-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/safepeak64bit.png" medium="image" />
	</item>
		<item>
		<title>SQLAuthority News &#8211; Online Session Practical Tricks and Tips to Speed up Database Queries Today</title>
		<link>http://blog.sqlauthority.com/2011/12/15/sqlauthority-news-online-session-practical-tricks-and-tips-to-speed-up-database-queries-today/</link>
		<comments>http://blog.sqlauthority.com/2011/12/15/sqlauthority-news-online-session-practical-tricks-and-tips-to-speed-up-database-queries-today/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 01:30:01 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=16349</guid>
		<description><![CDATA[I am presenting on performance tuning topic again today at Virtual Tech Days. This time I am going to talk about lots of practical tips and will focus on what we can do immediately right after the session is over. During the session I have two things for you to spot. How many times, I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16349&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I am presenting on performance tuning topic again today at <strong><a href="http://www.virtualtechdays.com/joinsession.aspx" target="_blank">Virtual Tech Days</a></strong>. This time I am going to talk about lots of practical tips and will focus on what we can do immediately right after the session is over.</p>
<p style="text-align:justify;">During the session I have two things for you to spot.</p>
<ol style="text-align:justify;">
<li>How many times, I say word &#8220;performance&#8221;?</li>
<li>How many times, I use the phrase &#8220;It is interesting to &#8230;&#8221;?</li>
</ol>
<p style="text-align:justify;">Let us see if you can tell me after the session the count. Trust me, I am not going to count there as I will be presenting so I let you come up with the answer of this fun game.</p>
<h3 style="text-align:justify;">Sessions Details</h3>
<p style="text-align:justify;">Title: <em><strong>Practical Tricks and Tips to Speed up Database Queries</strong></em><br />
Timing: <strong><em>December 15</em></strong><em><strong>, 2011 1:45pm &#8211; 2:45pm IST</strong></em><br />
In this session I am going to discuss various performance tuning related techniques. Here is the agenda of the session.</p>
<ul style="text-align:justify;">
<li>A Quick Start on Performance</li>
<li>Denali T-SQL Enhancements</li>
<li>Timeless Best Practices</li>
<li>The Superlative Performance</li>
</ul>
<p style="text-align:justify;">Each of the above topics will be associated with very practical solid demo. I am sure you will absolutely enjoy the session.</p>
<h3 style="text-align:justify;">Giveaways</h3>
<p style="text-align:justify;"><img class="alignleft" src="http://www.pinaldave.com/bimg/sqlinterview_s" alt="" width="138" height="211" />During my session I will ask a simple question. I will give away <strong>5 copies</strong> of my <strong><a href="http://blog.sqlauthority.com/sql-server-books/sql-server-interview-questions-and-answers-for-all-database-developers-and-developers-administrators/" target="_blank">SQL Server Interview Questions and Answers</a></strong> books to five random person who will answer it correctly (more details in the session). If you have already have this book, I strongly suggest you attend this session as this session will take the performance tuning concepts to next level. I will make sure that I autograph and send this copies to your way.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sqlserver/'>SQLServer</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/16349/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/16349/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/16349/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/16349/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/16349/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/16349/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/16349/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/16349/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/16349/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/16349/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/16349/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/16349/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/16349/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/16349/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16349&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/12/15/sqlauthority-news-online-session-practical-tricks-and-tips-to-speed-up-database-queries-today/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/sqlinterview_s" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; A Quick Look at Performance &#8211; A Quick Look at Configuration</title>
		<link>http://blog.sqlauthority.com/2011/12/13/sql-server-a-quick-look-at-performance-a-quick-look-at-configuration/</link>
		<comments>http://blog.sqlauthority.com/2011/12/13/sql-server-a-quick-look-at-performance-a-quick-look-at-configuration/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 01:30:00 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=16293</guid>
		<description><![CDATA[This blog post is written in response to the T-SQL Tuesday post of Tips and Tricks. For me, this is a very interesting subject. I perfectly enjoy a discussion when it is about performance tuning. I commonly get follow-up questions regarding this subject, but most of them do not give the complete information about their [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16293&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;"><img class="alignleft" src="http://www.pinaldave.com/bimg/TSQL2sDay.jpg" alt="" width="123" height="123" /></p>
<p style="text-align:justify;">This blog post is written in response to the T-SQL Tuesday post of <a href="http://sqlblog.com/blogs/allen_white/archive/2011/12/05/t-sql-tuesday-025-invitation-to-share-your-tricks.aspx" target="_blank">Tips and Tricks</a>. For me, this is a very interesting subject. I perfectly enjoy a discussion when it is about performance tuning. I commonly get follow-up questions regarding this subject, but most of them do not give the complete information about their environment.</p>
<p style="text-align:justify;">Whenever I get a question which does not have complete information but is obviously requesting for my help, my initial reaction is to ask more questions. When I ask more details, I usually get more questions from them rather than the details I was asking for. Indeed, this is an endless loop. I prefer to resolve a query or a problem quickly, easily and accurately so that there is no more confusion or further problems in the future.</p>
<p style="text-align:justify;">Here is the method I follow: I send people who request my help a couple of SQL Server scripts and ask them to run these scripts on their system. Once they send me the results,  I would then have a good idea on what the status of their system is.</p>
<p style="text-align:justify;">Here are a couple of scripts which I usually request them to run on their respective machines and get back to me with results in Excel.</p>
<p style="text-align:justify;"><strong>1) System Configuration</strong></p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.configurations<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">name </span><span style="color:blue;">OPTION </span><span style="color:gray;">(</span><span style="color:black;">RECOMPILE</span><span style="color:gray;">);<br />
</span></code></p>
<p style="text-align:justify;"><strong>2) Filename and Paths of Database</strong></p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:magenta;">DB_NAME</span><span style="color:gray;">(</span><span style="color:black;">[database_id]</span><span style="color:gray;">)</span><span style="color:blue;">AS </span><span style="color:black;">[DBName]</span><span style="color:gray;">,<br />
</span><span style="color:black;">name</span><span style="color:gray;">, </span><span style="color:black;">physical_name</span><span style="color:gray;">, </span><span style="color:black;">type_desc</span><span style="color:gray;">, </span><span style="color:black;">state_desc</span><span style="color:gray;">,<br />
</span><span style="color:magenta;">CONVERT</span><span style="color:gray;">( </span><span style="color:black;">bigint</span><span style="color:gray;">, </span><span style="color:black;">size</span><span style="color:gray;">/</span><span style="color:black;">128.0</span><span style="color:gray;">) </span><span style="color:black;">[SizeinMB]<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.master_files<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:magenta;">DB_NAME</span><span style="color:gray;">(</span><span style="color:black;">[database_id]</span><span style="color:gray;">)</span></code></p>
<p style="text-align:justify;"><strong>3) Capturing Wait Types and Wait Stats Information at Interva</strong></p>
<p style="text-align:justify;">You can review the script mentioned in <a href="http://blog.sqlauthority.com/2011/02/05/sql-server-capturing-wait-types-and-wait-stats-information-at-interval-wait-type-day-5-of-28/" target="_blank"><strong>my earlier blog post over here</strong></a>.</p>
<p style="text-align:justify;">Honestly, there is a lot of information one needs to solve a query, but this is how I start and get all the basic information from the questioner. Once I get these, I review the results and continue to ask more questions or help right away if I am able to reach the root cause of the issue.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sqlserver/'>SQLServer</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/16293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/16293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/16293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/16293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/16293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/16293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/16293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/16293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/16293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/16293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/16293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/16293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/16293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/16293/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16293&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/12/13/sql-server-a-quick-look-at-performance-a-quick-look-at-configuration/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/TSQL2sDay.jpg" medium="image" />
	</item>
		<item>
		<title>SQLAuthority News &#8211; Virtual Presentation on Practical Tricks and Tips to Speed up Database Queries &#8211; December 15, 2011</title>
		<link>http://blog.sqlauthority.com/2011/12/12/sqlauthority-news-virtual-presentation-on-practical-tricks-and-tips-to-speed-up-database-queries-december-15-2011/</link>
		<comments>http://blog.sqlauthority.com/2011/12/12/sqlauthority-news-virtual-presentation-on-practical-tricks-and-tips-to-speed-up-database-queries-december-15-2011/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 01:30:01 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=16305</guid>
		<description><![CDATA[Performance tuning has been my favorite subject and any time when I have to present on this subject, this itself gives me tremendous pleasure as well. I am always excited to present something new on this topic. Virtual Tech Days is just here around the corner and I am going to present about performance tuning [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16305&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;"><img class="alignleft" src="http://www.pinaldave.com/bimg/performancestandout.png" alt="" width="305" height="151" />Performance tuning has been my favorite subject and any time when I have to present on this subject, this itself gives me tremendous pleasure as well. I am always excited to present something new on this topic. Virtual Tech Days is just here around the corner and I am going to present about performance tuning subject once again. However, I am going to focus that instead of theory, I will talk about the practical aspect of the performance tuning and share tips which one can use right away.</p>
<h3 style="text-align:justify;">Sessions Details</h3>
<p style="text-align:justify;">Title: <em><strong>Practical Tricks and Tips to Speed up Database Queries</strong></em><br />
Timing: <strong><em>December 15</em></strong><em><strong>, 2011 1:45pm &#8211; 2:45pm IST</strong></em><br />
In this session I am going to discuss various performance tuning related techniques. Here is the agenda of the session.</p>
<ul style="text-align:justify;">
<li>A Quick Start on Performance</li>
<li>Denali T-SQL Enhancements</li>
<li>Timeless Best Practices</li>
<li>The Superlative Performance</li>
</ul>
<p style="text-align:justify;">Each of the above topics will be associated with very practical solid demo. I am sure you will absolutely enjoy the session.</p>
<h3 style="text-align:justify;">Giveaways</h3>
<p style="text-align:justify;"><img class="alignleft" src="http://www.pinaldave.com/bimg/sqlinterview_s" alt="" width="138" height="211" />During my session I will ask a simple question. I will give away <strong>5 copies</strong> of my <strong><a href="http://blog.sqlauthority.com/sql-server-books/sql-server-interview-questions-and-answers-for-all-database-developers-and-developers-administrators/" target="_blank">SQL Server Interview Questions and Answers</a></strong> books to five random person who will answer it correctly (more details in the session). If you have already have this book, I strongly suggest you attend this session as this session will take the performance tuning concepts to next level. I will make sure that I autograph and send this copies to your way.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sqlserver/'>SQLServer</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/16305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/16305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/16305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/16305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/16305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/16305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/16305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/16305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/16305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/16305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/16305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/16305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/16305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/16305/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16305&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/12/12/sqlauthority-news-virtual-presentation-on-practical-tricks-and-tips-to-speed-up-database-queries-december-15-2011/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/performancestandout.png" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/sqlinterview_s" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; How to Ignore Columnstore Index Usage in Query</title>
		<link>http://blog.sqlauthority.com/2011/10/30/sql-server-how-to-ignore-columnstore-index-usage-in-query/</link>
		<comments>http://blog.sqlauthority.com/2011/10/30/sql-server-how-to-ignore-columnstore-index-usage-in-query/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 01:30:37 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Index]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=15371</guid>
		<description><![CDATA[Earlier I wrote about SQL SERVER – Fundamentals of Columnstore Index and very first question I received in email was as following. &#8220;We are using SQL Server 2012 CTP3 and so far so good. In our data warehouse solution we have created 1 non-clustered columnstore index on our large fact table. We have very unique situation [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=15371&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Earlier I wrote about <strong><a title="Permanent Link to SQL SERVER – Fundamentals of Columnstore Index" href="http://blog.sqlauthority.com/2011/10/29/sql-server-fundamentals-of-columnstore-index/" rel="bookmark">SQL SERVER – Fundamentals of Columnstore Index</a></strong> and very first question I received in email was as following.</p>
<p style="text-align:justify;padding-left:30px;">&#8220;We are using SQL Server 2012 CTP3 and so far so good. In our data warehouse solution we have created 1 non-clustered columnstore index on our large fact table. We have very unique situation but your article did not cover it. We are running few queries on our fact table which is working very efficiently but there is one query which earlier was running very fine but after creating this non-clustered columnstore index this query is running very slow. We dropped the columnstore index and suddenly this one query is running fast but other queries which were benefited by this columnstore index it is running slow.</p>
<p style="text-align:justify;padding-left:30px;">Any workaround in this situation?&#8221;</p>
<p style="text-align:justify;">In summary the question in simple words <em><strong>&#8220;How can we ignore using columnstore index in selective queries?&#8221;</strong></em></p>
<p style="text-align:justify;">Very interesting question &#8211; you can use I can understand there may be the cases when columnstore index is not ideal and needs to be ignored the same. You can use the query hint IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX to ignore the columnstore index. SQL Server Engine will use any other index which is best after ignoring the columnstore index.</p>
<p style="text-align:justify;">Here is the quick script to prove the same.</p>
<p style="text-align:justify;">We will first create sample database and then create columnstore index on the same. Once columnstore index is created we will write simple query. This query will use columnstore index. We will then show the usage of the query hint.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">USE </span><span style="color:black;">AdventureWorks<br />
GO<br />
</span><span style="color:green;">-- Create New Table<br />
</span><span style="color:blue;">CREATE TABLE </span><span style="color:black;">[dbo].[MySalesOrderDetail]</span><span style="color:gray;">(<br />
</span><span style="color:black;">[SalesOrderID] [int] </span><span style="color:gray;">NOT NULL,<br />
</span><span style="color:black;">[SalesOrderDetailID] [int] </span><span style="color:gray;">NOT NULL,<br />
</span><span style="color:black;">[CarrierTrackingNumber] [nvarchar]</span><span style="color:gray;">(</span><span style="color:black;">25</span><span style="color:gray;">) NULL,<br />
</span><span style="color:black;">[OrderQty] [smallint] </span><span style="color:gray;">NOT NULL,<br />
</span><span style="color:black;">[ProductID] [int] </span><span style="color:gray;">NOT NULL,<br />
</span><span style="color:black;">[SpecialOfferID] [int] </span><span style="color:gray;">NOT NULL,<br />
</span><span style="color:black;">[UnitPrice] [money] </span><span style="color:gray;">NOT NULL,<br />
</span><span style="color:black;">[UnitPriceDiscount] [money] </span><span style="color:gray;">NOT NULL,<br />
</span><span style="color:black;">[LineTotal] [numeric]</span><span style="color:gray;">(</span><span style="color:black;">38</span><span style="color:gray;">, </span><span style="color:black;">6</span><span style="color:gray;">) NOT NULL,<br />
</span><span style="color:black;">[rowguid] [uniqueidentifier] </span><span style="color:gray;">NOT NULL,<br />
</span><span style="color:black;">[ModifiedDate] [datetime] </span><span style="color:gray;">NOT NULL<br />
) </span><span style="color:blue;">ON </span><span style="color:black;">[PRIMARY]<br />
GO<br />
</span><span style="color:green;">-- Create clustered index<br />
</span><span style="color:blue;">CREATE CLUSTERED INDEX </span><span style="color:black;">[CL_MySalesOrderDetail] </span><span style="color:blue;">ON </span><span style="color:black;">[dbo].[MySalesOrderDetail]<br />
</span><span style="color:gray;">( </span><span style="color:black;">[SalesOrderDetailID]</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:green;">-- Create Sample Data Table<br />
-- WARNING: This Query may run upto 2-10 minutes based on your systems resources<br />
</span><span style="color:blue;">INSERT INTO </span><span style="color:black;">[dbo].[MySalesOrderDetail]<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">S1.</span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">Sales.SalesOrderDetail S1<br />
GO 100<br />
</span><span style="color:green;">-- Create ColumnStore Index<br />
</span><span style="color:blue;">CREATE NONCLUSTERED </span><span style="color:black;">COLUMNSTORE </span><span style="color:blue;">INDEX </span><span style="color:black;">[IX_MySalesOrderDetail_ColumnStore]<br />
</span><span style="color:blue;">ON </span><span style="color:black;">[MySalesOrderDetail]<br />
</span><span style="color:gray;">(</span><span style="color:black;">UnitPrice</span><span style="color:gray;">, </span><span style="color:black;">OrderQty</span><span style="color:gray;">, </span><span style="color:black;">ProductID</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span></code></p>
<p style="text-align:justify;">Now we have created columnstore index so if we run following query it will use for sure the same index.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:green;">-- Select Table with regular Index<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">ProductID</span><span style="color:gray;">, </span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:black;">UnitPrice</span><span style="color:gray;">) </span><span style="color:black;">SumUnitPrice</span><span style="color:gray;">, </span><span style="color:magenta;">AVG</span><span style="color:gray;">(</span><span style="color:black;">UnitPrice</span><span style="color:gray;">) </span><span style="color:black;">AvgUnitPrice</span><span style="color:gray;">,<br />
</span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:black;">OrderQty</span><span style="color:gray;">) </span><span style="color:black;">SumOrderQty</span><span style="color:gray;">, </span><span style="color:magenta;">AVG</span><span style="color:gray;">(</span><span style="color:black;">OrderQty</span><span style="color:gray;">) </span><span style="color:black;">AvgOrderQty<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">[dbo].[MySalesOrderDetail]<br />
</span><span style="color:blue;">GROUP BY </span><span style="color:black;">ProductID<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">ProductID<br />
GO</span></code></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/columnstore3.jpg" alt="" width="316" height="158" /></p>
<p style="text-align:justify;">We can specify Query Hint IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX as described in following query and it will not use columnstore index.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:green;">-- Select Table with regular Index<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">ProductID</span><span style="color:gray;">, </span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:black;">UnitPrice</span><span style="color:gray;">) </span><span style="color:black;">SumUnitPrice</span><span style="color:gray;">, </span><span style="color:magenta;">AVG</span><span style="color:gray;">(</span><span style="color:black;">UnitPrice</span><span style="color:gray;">) </span><span style="color:black;">AvgUnitPrice</span><span style="color:gray;">,<br />
</span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:black;">OrderQty</span><span style="color:gray;">) </span><span style="color:black;">SumOrderQty</span><span style="color:gray;">, </span><span style="color:magenta;">AVG</span><span style="color:gray;">(</span><span style="color:black;">OrderQty</span><span style="color:gray;">) </span><span style="color:black;">AvgOrderQty<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">[dbo].[MySalesOrderDetail]<br />
</span><span style="color:blue;">GROUP BY </span><span style="color:black;">ProductID<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">ProductID<br />
</span><span style="color:blue;">OPTION </span><span style="color:gray;">(</span><span style="color:black;">IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/columnstore4.jpg" alt="" width="327" height="148" /></p>
<p style="text-align:justify;">Let us clean up the database.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:green;">-- Cleanup<br />
</span><span style="color:blue;">DROP INDEX </span><span style="color:black;">[IX_MySalesOrderDetail_ColumnStore] </span><span style="color:blue;">ON </span><span style="color:black;">[dbo].[MySalesOrderDetail]<br />
GO<br />
</span><span style="color:blue;">TRUNCATE TABLE </span><span style="color:black;">dbo.MySalesOrderDetail<br />
GO<br />
</span><span style="color:blue;">DROP TABLE </span><span style="color:black;">dbo.MySalesOrderDetail<br />
GO</span></code></p>
<p style="text-align:justify;">Again, make sure that you use hint sparingly and understanding the proper implication of the same. Make sure that you test it with and without hint and select the best option after review of your administrator. Here is the question for you &#8211; have you started to use SQL Server 2012 for your validation and development (not on production)? It will be interesting to know the answer.</p>
<p style="text-align:justify;">Reference:<strong></strong> <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-index/'>SQL Index</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/15371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/15371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/15371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/15371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/15371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/15371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/15371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/15371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/15371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/15371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/15371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/15371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/15371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/15371/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=15371&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/10/30/sql-server-how-to-ignore-columnstore-index-usage-in-query/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/columnstore3.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/columnstore4.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Fundamentals of Columnstore Index</title>
		<link>http://blog.sqlauthority.com/2011/10/29/sql-server-fundamentals-of-columnstore-index/</link>
		<comments>http://blog.sqlauthority.com/2011/10/29/sql-server-fundamentals-of-columnstore-index/#comments</comments>
		<pubDate>Sat, 29 Oct 2011 01:30:21 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Index]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=15283</guid>
		<description><![CDATA[There are two kind of storage in database. Row Store and Column Store. Row store does exactly as the name suggests – stores rows of data on a page – and column store stores all the data in a column on the same page. These columns are much easier to search – instead of a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=15283&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">There are two kind of storage in database. Row Store and Column Store. Row store does exactly as the name suggests – stores rows of data on a page – and column store stores all the data in a column on the same page.  These columns are much easier to search – instead of a query searching all the data in an entire row whether the data is relevant or not, column store queries need only to search much lesser number of the columns.  This means major increases in search speed and hard drive use.  Additionally, the column store indexes are heavily compressed, which translates to even greater memory and faster searches. I am sure this looks very exciting and it does not mean that you convert every single index from row store to column store index. One has to understand the proper places where to use row store or column store indexes. Let us understand in this article what is the difference in Columnstore type of index.</p>
<p style="text-align:justify;">Column store indexes are run by Microsoft’s VertiPaq technology. However, all you really need to know is that this method of storing data is columns on a single page is much faster and more efficient.  Creating a column store index is very easy, and you don’t have to learn new syntax to create them.  You just need to specify the keyword “COLUMNSTORE” and enter the data as you normally would.  Keep in mind that once you add a column store to a table, though, you cannot delete, insert or update the data – it is READ ONLY.  However, since column store will be mainly used for data warehousing, this should not be a big problem.  You can always use partitioning to avoid rebuilding the index.</p>
<p style="text-align:justify;">A columnstore index stores each column in a separate set of disk pages, rather than storing multiple rows per page as data traditionally has been stored. The difference between column store and row store approaches is illustrated below:</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/columnstore.jpg" alt="" width="500" /></p>
<p style="text-align:justify;">In case of the row store indexes multiple pages will contain multiple rows of the columns spanning across multiple pages. In case of column store indexes multiple pages will contain multiple single columns. This will lead only the columns needed to solve a query will be fetched from disk. Additionally there is good chance that there will be redundant data in a single column which will further help to compress the data, this will have positive effect on buffer hit rate as most of the data will be in memory and due to same it will not need to be retrieved.</p>
<p style="text-align:justify;">Let us see small example of how columnstore index improves the performance of the query on a large table.</p>
<p style="text-align:justify;">As a first step let us create databaseset which is large enough to show performance impact of columnstore index. The time taken to create sample database may vary on different computer based on the resources.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">USE </span><span style="color:black;">AdventureWorks<br />
GO<br />
</span><span style="color:green;">-- Create New Table<br />
</span><span style="color:blue;">CREATE TABLE </span><span style="color:black;">[dbo].[MySalesOrderDetail]</span><span style="color:gray;">(<br />
</span><span style="color:black;">[SalesOrderID] [int] </span><span style="color:gray;">NOT NULL,<br />
</span><span style="color:black;">[SalesOrderDetailID] [int] </span><span style="color:gray;">NOT NULL,<br />
</span><span style="color:black;">[CarrierTrackingNumber] [nvarchar]</span><span style="color:gray;">(</span><span style="color:black;">25</span><span style="color:gray;">) NULL,<br />
</span><span style="color:black;">[OrderQty] [smallint] </span><span style="color:gray;">NOT NULL,<br />
</span><span style="color:black;">[ProductID] [int] </span><span style="color:gray;">NOT NULL,<br />
</span><span style="color:black;">[SpecialOfferID] [int] </span><span style="color:gray;">NOT NULL,<br />
</span><span style="color:black;">[UnitPrice] [money] </span><span style="color:gray;">NOT NULL,<br />
</span><span style="color:black;">[UnitPriceDiscount] [money] </span><span style="color:gray;">NOT NULL,<br />
</span><span style="color:black;">[LineTotal] [numeric]</span><span style="color:gray;">(</span><span style="color:black;">38</span><span style="color:gray;">, </span><span style="color:black;">6</span><span style="color:gray;">) NOT NULL,<br />
</span><span style="color:black;">[rowguid] [uniqueidentifier] </span><span style="color:gray;">NOT NULL,<br />
</span><span style="color:black;">[ModifiedDate] [datetime] </span><span style="color:gray;">NOT NULL<br />
) </span><span style="color:blue;">ON </span><span style="color:black;">[PRIMARY]<br />
GO<br />
</span><span style="color:green;">-- Create clustered index<br />
</span><span style="color:blue;">CREATE CLUSTERED INDEX </span><span style="color:black;">[CL_MySalesOrderDetail] </span><span style="color:blue;">ON </span><span style="color:black;">[dbo].[MySalesOrderDetail]<br />
</span><span style="color:gray;">(    </span><span style="color:black;">[SalesOrderDetailID]</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:green;">-- Create Sample Data Table<br />
-- WARNING: This Query may run upto 2-10 minutes based on your systems resources<br />
</span><span style="color:blue;">INSERT INTO </span><span style="color:black;">[dbo].[MySalesOrderDetail]<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">S1.</span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">Sales.SalesOrderDetail S1<br />
GO 100<br />
</span></code></p>
<p style="text-align:justify;">Now let us do quick performance test. I have kept STATISTICS IO ON for measuring how much IO following queries take. In my test first I will run query which will use regular index. We will note the IO usage of the query. After that we will create columnstore index and will measure the IO of the same.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:green;">-- Performance Test<br />
-- Comparing Regular Index with ColumnStore Index<br />
</span><span style="color:blue;">USE </span><span style="color:black;">AdventureWorks<br />
GO<br />
</span><span style="color:blue;">SET STATISTICS </span><span style="color:black;">IO </span><span style="color:blue;">ON<br />
</span><span style="color:black;">GO<br />
</span><span style="color:green;">-- Select Table with regular Index<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">ProductID</span><span style="color:gray;">, </span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:black;">UnitPrice</span><span style="color:gray;">) </span><span style="color:black;">SumUnitPrice</span><span style="color:gray;">, </span><span style="color:magenta;">AVG</span><span style="color:gray;">(</span><span style="color:black;">UnitPrice</span><span style="color:gray;">) </span><span style="color:black;">AvgUnitPrice</span><span style="color:gray;">,<br />
</span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:black;">OrderQty</span><span style="color:gray;">) </span><span style="color:black;">SumOrderQty</span><span style="color:gray;">, </span><span style="color:magenta;">AVG</span><span style="color:gray;">(</span><span style="color:black;">OrderQty</span><span style="color:gray;">) </span><span style="color:black;">AvgOrderQty<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">[dbo].[MySalesOrderDetail]<br />
</span><span style="color:blue;">GROUP BY </span><span style="color:black;">ProductID<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">ProductID<br />
GO<br />
</span><span style="color:green;">-- Table 'MySalesOrderDetail'. Scan count 1, logical reads 342261, physical reads 0, read-ahead reads 0.<br />
-- Create ColumnStore Index<br />
</span><span style="color:blue;">CREATE NONCLUSTERED </span><span style="color:black;">COLUMNSTORE </span><span style="color:blue;">INDEX </span><span style="color:black;">[IX_MySalesOrderDetail_ColumnStore]<br />
</span><span style="color:blue;">ON </span><span style="color:black;">[MySalesOrderDetail]<br />
</span><span style="color:gray;">(</span><span style="color:black;">UnitPrice</span><span style="color:gray;">, </span><span style="color:black;">OrderQty</span><span style="color:gray;">, </span><span style="color:black;">ProductID</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:green;">-- Select Table with Columnstore Index<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">ProductID</span><span style="color:gray;">, </span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:black;">UnitPrice</span><span style="color:gray;">) </span><span style="color:black;">SumUnitPrice</span><span style="color:gray;">, </span><span style="color:magenta;">AVG</span><span style="color:gray;">(</span><span style="color:black;">UnitPrice</span><span style="color:gray;">) </span><span style="color:black;">AvgUnitPrice</span><span style="color:gray;">,<br />
</span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:black;">OrderQty</span><span style="color:gray;">) </span><span style="color:black;">SumOrderQty</span><span style="color:gray;">, </span><span style="color:magenta;">AVG</span><span style="color:gray;">(</span><span style="color:black;">OrderQty</span><span style="color:gray;">) </span><span style="color:black;">AvgOrderQty<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">[dbo].[MySalesOrderDetail]<br />
</span><span style="color:blue;">GROUP BY </span><span style="color:black;">ProductID<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">ProductID<br />
GO</span></code></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/columnstore2.jpg" alt="" width="500" /></p>
<p style="text-align:justify;">It is very clear from the results that query is performance extremely fast after creating ColumnStore Index. The amount of the pages it has to read to run query is drastically reduced as the column which are needed in the query are stored in the same page and query does not have to go through every single page to read those columns.</p>
<p style="text-align:justify;"><a href="http://www.pinaldave.com/bimg/columnstore1.jpg"><img class="alignnone" src="http://www.pinaldave.com/bimg/columnstore1.jpg" alt="" width="500" height="194" /></a></p>
<p style="text-align:justify;">If we enable execution plan and compare we can see that column store index performance way better than regular index in <strong>this</strong> case.</p>
<p style="text-align:justify;">Let us clean up the database.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:green;">-- Cleanup<br />
</span><span style="color:blue;">DROP INDEX </span><span style="color:black;">[IX_MySalesOrderDetail_ColumnStore] </span><span style="color:blue;">ON </span><span style="color:black;">[dbo].[MySalesOrderDetail]<br />
GO<br />
</span><span style="color:blue;">TRUNCATE TABLE </span><span style="color:black;">dbo.MySalesOrderDetail<br />
GO<br />
</span><span style="color:blue;">DROP TABLE </span><span style="color:black;">dbo.MySalesOrderDetail<br />
GO</span></code></p>
<p style="text-align:justify;">In future posts we will see cases where Columnstore index is not appropriate solution as well few other tricks and tips of the columnstore index.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-index/'>SQL Index</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/15283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/15283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/15283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/15283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/15283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/15283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/15283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/15283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/15283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/15283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/15283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/15283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/15283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/15283/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=15283&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/10/29/sql-server-fundamentals-of-columnstore-index/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/columnstore.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/columnstore2.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/columnstore1.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; TRACEWRITE &#8211; Wait Type &#8211; Wait Related to Buffer and Resolution</title>
		<link>http://blog.sqlauthority.com/2011/10/20/sql-server-tracewrite-wait-type-wait-related-to-buffer-and-resolution/</link>
		<comments>http://blog.sqlauthority.com/2011/10/20/sql-server-tracewrite-wait-type-wait-related-to-buffer-and-resolution/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 01:30:20 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Wait Stats]]></category>
		<category><![CDATA[SQL Wait Types]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=15093</guid>
		<description><![CDATA[Earlier this year I wrote for a whole month on SQL Server Wait Stats and the series was one of the best reviewed I have ever written. The same series has been enhanced and compiled into a book as SQL Server Wait Stats [Amazon] &#124; [Flipkart] &#124; [Kindle]. The best part of this book is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=15093&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Earlier this year I wrote for a whole month on <a href="http://blog.sqlauthority.com/2011/02/28/sql-server-summary-of-month-wait-type-day-28-of-28/" target="_blank"><strong>SQL Server Wait Stats</strong></a> and the series was one of the best reviewed I have ever written. The same series has been enhanced and compiled into a book as <em>SQL Server Wait Stats</em> [<a href="http://amzn.to/p3tL1n" target="_blank"><strong>Amazon</strong></a>] | [<a href="http://bit.ly/waitstats" target="_blank"><strong>Flipkart</strong></a>] | [<a href="http://amzn.to/waitstatskindle" target="_blank"><strong>Kindle</strong></a>]. The best part of this book is it is an evolving book. I am planning to expand this book at certain intervals.</p>
<p style="text-align:justify;">Yesterday I came across a very interesting system, where the top most wait type was TRACEWRITE. The DBA of the system reached out to me asking what this wait types means and how it can be resolved. As I had not written about this in the book so far, this is the blog post dedicated to his question. It will definitely be included in future versions of the book. For the moment let us go over it quickly and see what we can learn about TRACEWRITE.</p>
<p style="text-align:justify;">Personally I consider TRACEWRITE a <strong>harmless</strong> and <strong>innocent</strong> wait type and I recommend that you ignore it too. However, the DBA who ran the script mentioned in my <a href="http://blog.sqlauthority.com/2011/02/01/sql-server-introduction-to-wait-stats-and-wait-types-wait-type-day-1-of-28/" target="_blank"><strong>very first blog</strong></a> still found this wait type on the top as I did not include this wait type in the exclusion list.  I think it should be there and in future versions of the script I will include it.</p>
<h2 style="text-align:justify;"><strong>From Book On-Line:</strong></h2>
<p style="text-align:justify;">TRACEWRITE<br />
Occurs when the SQL Trace rowset trace provider waits for either a free buffer or a buffer with events to process.</p>
<h2 style="text-align:justify;"><strong>TRACEWRITE Explanation:</strong></h2>
<p style="text-align:justify;">SQL Trace is a SQL Server database engine technology which monitors specific events generated when various actions occur in the database engine. When any event is fired it goes through various stages as well various routes. One of the routes is Trace I/O Provider, which sends data to its final destination either as file or rowset. This rowset provider does not provide any guarantees to data. It stores the data into its internal buffers. If the data from the internal buffer is not consumed quickly enough (20 seconds) the buffers start to drop the events to free itself up to handle future events. This is when it sends a special error messages to the profiler client. When more threads are waiting for free buffers the wait type TRACEWRITE is implemented. The higher this wait type, the higher the number of threads waiting for free buffer, degrading performance in most of the system.</p>
<h2 style="text-align:justify;"><strong>Reducing TRACEWRITE wait:</strong></h2>
<p style="text-align:justify;">It is not necessary to consider this wait type as bad or evil. In <strong>most</strong> systems it can be a perfectly normal wait type and you just need to ignore it. If you are convinced, you should stop reading this blog post here. However, if still want to reduce this wait type, here is something you can experiment with on your development server (never on production server).</p>
<p style="text-align:justify;">Run the following query and see if it returns any value. This query will list all the trace running in your system.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.</span><span style="color:darkred;">fn_trace_getinfo</span><span style="color:gray;">(</span><span style="color:black;">0</span><span style="color:gray;">)<br />
</span></code></p>
<p style="text-align:justify;">In most of the systems I have come across I have noticed default trace enabled for the system. I personally like this to keep it on as it helps the DBA to diagnosis problems the first time they occur. Additionally, this helps Microsoft to diagnosis your system if you request their support. (One more reason to ignore this wait type and <strong>do not</strong> attempt to disable default trace). However, you can manually disable this trace by following script.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:darkred;">sp_configure </span><span style="color:red;">'show advanced options'</span><span style="color:gray;">, </span><span style="color:black;">1</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">RECONFIGURE</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO<br />
</span><span style="color:darkred;">sp_configure </span><span style="color:red;">'default trace enabled'</span><span style="color:gray;">, </span><span style="color:black;">0</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">RECONFIGURE</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;">Well, as this is not harmful wait type, I had not included it in my book or initial series. Anyway, now we have learned about this wait type so I will include it in future versions.</p>
<p style="text-align:justify;">Read all the post in the <a href="http://blog.sqlauthority.com/2011/02/01/sql-server-wait-stats-wait-types-wait-queues-day-0-of-28/" target="_blank"><strong>Wait Types and Queue</strong></a> series.</p>
<p style="text-align:justify;"><strong>Note:</strong> The information presented here is from my experience and there is no way that I claim it to be accurate. I suggest reading my book OnLine for further clarification. All the discussion of Wait Stats in this blog is generic and varies from system to system. It is recommended that you test this on a development server before implementing it to a production server.</p>
<p style="text-align:justify;">Reference:<strong> Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sql-wait-stats/'>SQL Wait Stats</a>, <a href='http://blog.sqlauthority.com/category/sql-wait-types/'>SQL Wait Types</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/15093/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/15093/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/15093/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/15093/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/15093/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/15093/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/15093/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/15093/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/15093/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/15093/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/15093/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/15093/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/15093/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/15093/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=15093&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/10/20/sql-server-tracewrite-wait-type-wait-related-to-buffer-and-resolution/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQLAuthority News &#8211; SafePeak Releases a Major Update: SafePeak version 2.1 for SQL Server Performance Acceleration</title>
		<link>http://blog.sqlauthority.com/2011/10/17/sqlauthority-news-safepeak-releases-a-major-update-safepeak-version-2-1-for-sql-server-performance-acceleration/</link>
		<comments>http://blog.sqlauthority.com/2011/10/17/sqlauthority-news-safepeak-releases-a-major-update-safepeak-version-2-1-for-sql-server-performance-acceleration/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 01:30:22 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=15065</guid>
		<description><![CDATA[Couple of months ago I had the opportunity to share with my first look at SafePeak, a new and unique software solution for improving SQL Server performance and solving bottlenecks, accelerates the data access and cuts the CPU and IO of your SQL Server. SafePeak unique approach not just tells you about the problems but [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=15065&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Couple of months ago I had the opportunity to share with my first look at <strong><a href="http://www.safepeak.com/download?source=sqlauthority-sidebar" target="_blank">SafePeak</a></strong>, a new and unique software solution for improving SQL Server performance and solving bottlenecks, accelerates the data access and cuts the CPU and IO of your SQL Server. <strong><a href="http://www.safepeak.com/download?source=sqlauthority-sidebar" target="_blank">SafePeak </a></strong>unique approach not just tells you about the problems but actually resolves them automatically and improves SQL Server performance and the performance of applications dramatically.</p>
<p style="text-align:justify;">It looks like SafePeak team gave a very serious thinking how to make things even easier during the integration and fine tuning, thus improving the short term benefits, and also to provide a valuable information about the usage of the database by the application, an important long term benefit. Before I get into my key findings of the new features and improvements let me give a short reminder of SafePeak.</p>
<p style="text-align:justify;"><strong><span style="text-decoration:underline;">SafePeak in a brief:</span></strong></p>
<div class="mceTemp" style="text-align:justify;">
<dl class="wp-caption alignnone">
<dt class="wp-caption-dt"><a href="http://www.pinaldave.com/bimg/safepeak2_1.png"><img src="http://www.pinaldave.com/bimg/safepeak2_1.png" alt="" width="500" /></a></dt>
<dd class="wp-caption-dd">Click to Enlarge</dd>
</dl>
</div>
<p style="text-align:justify;"><strong><a href="http://www.safepeak.com/download?source=sqlauthority-sidebar" target="_blank">SafePeak</a></strong> is a <span style="text-decoration:underline;">dynamic caching</span> proxy that resides between the application and the database. It is unique in the way it requires neither code changes nor database changes. The only change required is routing the application through SafePeak instead of the database (by changing connection string, a DNS record, or simply adding reroute line in the c:\windows\system32\drivers\etc\hosts file).</p>
<p style="text-align:justify;">Here is a <strong><a href="http://www.youtube.com/watch?v=PkxuPBE-f5s&amp;w=560&amp;h=315" target="_blank">short video</a></strong> about SafePeak (thanks to ApplicationPerformance.com team for benchmark and the video):</p>
<p style="text-align:justify;">SafePeak analyses the database schema and the SQL traffic, prepares sql patterns for decision making process and applies those sql patterns as caching rules. When data served from cache – the result is immediate (tests show 100-400 micro seconds per query – that is 0.000,100 of a second).</p>
<p style="text-align:justify;">Concept of “dynamic caching” is actually very interesting and unique: SafePeak caches in RAM the results of queries and stored procedures, but makes sure that the data integrity is enforced real-time both in SafePeak and in SQL Server.</p>
<p style="text-align:justify;">The benefits of such a solution are obvious: quick integration, immediate ROI, no complex projects and most importantly, minimal downtime for production systems.</p>
<p style="text-align:justify;">To learn more about the concept and how SafePeak works see <strong><a href="http://blog.sqlauthority.com/2011/08/11/sql-server-safepeak-the-plug-and-play-immediate-acceleration-solution/" target="_blank">my previous post here</a></strong>.</p>
<p style="text-align:justify;"><strong><span style="text-decoration:underline;">New features in the SafePeak version 2.1 </span></strong></p>
<p style="text-align:justify;">As this is my first semi-deep look at the new version, I’ll cover the top features that I found useful.</p>
<p style="text-align:justify;"><strong>1. Improvement of the cache setup and fine-tuning.</strong></p>
<p style="text-align:justify;">The #1 obstacle in previous versions was the understanding what needs to be actually configured to improve cache efficiency. Most of the setup is automated, some applications still demand important fine-tuning process. You see, SafePeak takes data integrity as its primary concern and that can reduce even significantly he cache effectiveness at the beginning. Two factors to consider from the beginning: A) “Dynamic Objects”; B) Manual (or non-deterministic) patterns to be enabled for cache. Actually few of the comments of my previous review asked questions exactly about this.</p>
<p style="text-align:justify;">The “dynamic objects” are usually stored procedures that your application has, that dynamically create SQL and then execute it (actually CLR objects and encrypted objects are also considered as “dynamic”). For SafePeak such procs are signed as “dynamic objects” and by default SafePeak takes the safest course of action to ensure data correctness: each execution of such proc ALL Cache is cleaned and SafePeak mode during the execution is “Disabled (DDL)” (visible on the dashboard screen).</p>
<p style="text-align:justify;">Consider that you have 2-3 procedures with dynamic code that do not change any data and are executed every 5 seconds. This means that instead of caching them, SafePeak all instance cache is cleaned each 5 seconds. This doesn’t really give you a chance for improvement, right..?</p>
<p style="text-align:justify;">While it was configurable in the previous versions, the new version makes the process of both identification of such events and procedures and the configuration much easier: Immediately on such execution you will see on the Dashboard the name of the procedure that needs to be configured:</p>
<div class="mceTemp" style="text-align:justify;">
<dl class="wp-caption alignnone">
<dt class="wp-caption-dt"><a href="http://www.pinaldave.com/bimg/safepeak2_2.png"><img src="http://www.pinaldave.com/bimg/safepeak2_2.png" alt="" width="500" /></a></dt>
<dd class="wp-caption-dd">Click to Enlarge</dd>
</dl>
</div>
<p style="text-align:justify;">Clicking on the line will take to the Dynamic Objects configuration screen (Caching managementàInstanceàDatabaseàDynamic Object tab) where a filter will apply to show you only this procedure plus all of its dependant dynamic procedures. You will need to manually configure to all these procedures.</p>
<p style="text-align:justify;">Configuration became easier too, eliminating the previous requirement running “sp_helptext” on your production SQL Server each time. The “Available Objects” popup (under “Object Dependencies” tab) shows us the text of the procedure. All we are left to do is identify the <span style="text-decoration:underline;">tables</span> that are read from (selects, joints), tables that are updated (DMLs) and/or which other stored procedures it calls. Focus only the SQL code that is dynamic (the regular code has already been learned by SafePeak automatically).</p>
<div class="mceTemp" style="text-align:justify;">
<dl class="wp-caption alignnone">
<dt class="wp-caption-dt"><a href="http://www.pinaldave.com/bimg/safepeak2_3.png"><img src="http://www.pinaldave.com/bimg/safepeak2_3.png" alt="" width="500" /></a></dt>
<dd class="wp-caption-dd">Click to Enlarge</dd>
</dl>
</div>
<p style="text-align:justify;">At the end configure the checkboxes at the “Object Information”: if object is deterministic (makes the activation of cache automatic), does it have transactions inside, DDL &#8211; does it changes schema, and should it clear all SafePeak cache (best not to do that J ).</p>
<p style="text-align:justify;">The new version makes it simple to know what needs to be configured (from the dashboard) and the configuration is simpler and no longer requires opening in parallel your database server. This makes things also nice, as this can be done remotely.</p>
<p style="text-align:justify;"><strong>2. Database templates</strong></p>
<p style="text-align:justify;">What happens if I have multiple similar structured database (like content databases in SharePoint)? Or I have several servers with same structured databases?</p>
<p style="text-align:justify;">Well this is the next improvement by SafePeak: creation of Database Templates.</p>
<p style="text-align:justify;">After you configure One database, you can save this a as a database template (in the Caching Management area). Then if you have additional similar database, SafePeak will recognize their pattern and apply that configuration to those databases too. You have also control for it under the very much enhanced “SettingsàInstance Configuration” section. You can also export these settings to a file and then import it on another SafePeak installation. A very nice feature.</p>
<div class="mceTemp" style="text-align:justify;">
<dl class="wp-caption alignnone">
<dt class="wp-caption-dt"><a href="http://www.pinaldave.com/bimg/safepeak2_4.png"><img class=" " src="http://www.pinaldave.com/bimg/safepeak2_4.png" alt="" width="500" height="192" /></a></dt>
<dd class="wp-caption-dd">Click to Enlarge</dd>
</dl>
</div>
<p style="text-align:justify;"><strong>3. Controlling caching by databases </strong>was also enhanced. In addition to controlling sql patterns, at the “SettingsàInstance Configuration” section you can enable and disable cache per each database. Because SafePeak licensing model is based on cached databases this makes it very simple to control.</p>
<p style="text-align:justify;"><strong>4. SafePeak extends to near real-time analytical abilities of the SQL Server usage</strong></p>
<div class="mceTemp" style="text-align:justify;">
<dl class="wp-caption alignnone">
<dt class="wp-caption-dt"><a href="http://www.pinaldave.com/bimg/safepeak2_5.png"><img src="http://www.pinaldave.com/bimg/safepeak2_5.png" alt="" width="500" /></a></dt>
<dd class="wp-caption-dd">Click to Enlarge</dd>
</dl>
</div>
<p style="text-align:justify;">SafePeak version 2.1 brings the DBA new abilities to see and analyze all the SQL queries that were executed during anytime. While previously we could see only cacheable “read” sql patterns, the new SafePeak allows investigation of all executed SQL patterns, including DMLs, DDLs, DCLs etc. The new SafePeak also makes it possible to check exactly what happened by choosing the specific timeframe. The new version creates analytical statistics every 15 minutes (reduced from 1 hour), which allows better investigation of suspicions events. SafePeak team also changed the columns list, added a “DB” column. This way you immediately see the queries response time as they run on SQL, performance from cache, and the change on the average performance new performance with SafePeak.</p>
<div class="mceTemp" style="text-align:justify;">
<dl class="wp-caption alignnone">
<dt class="wp-caption-dt"><a href="http://www.pinaldave.com/bimg/safepeak2_6.png"><img src="http://www.pinaldave.com/bimg/safepeak2_6.png" alt="" width="500" /></a></dt>
<dd class="wp-caption-dd">Click to Enlarge</dd>
</dl>
</div>
<p style="text-align:justify;">Actually this is interesting, as just couple of weeks ago one of my customers had a sudden overload on the SQL server during evening hours. It is not really clear when it started, when it ended, what happened there and why – all remain a mystery up to day. SafePeak’s new analytical abilities could definitely unveil the mystery and help the DBAs to save their precious time and back to normal work.</p>
<p style="text-align:justify;"><strong><span style="text-decoration:underline;">Summary</span></strong></p>
<p style="text-align:justify;">I was impressed of SafePeak first version, but the new features and components make SafePeak a very advanced and comprehensive SQL Server performance, acceleration and analytical solution. In this post scanned a small part of the overall changes and improvement. I would very much like to hear your findings and suggestions.</p>
<p style="text-align:justify;"><strong><a href="http://www.safepeak.com/download?source=sqlauthority-sidebar" target="_blank">SafePeak</a></strong> is a great acceleration solution for users who want immediate results for sites with performance, scalability and peak spikes challenges.</p>
<p style="text-align:justify;">SafePeak can significantly increase response times, by reducing network round-trip to the database, decreasing CPU resource usage, eliminating I/O and storage access.</p>
<p style="text-align:justify;">For all those SQL Server shops – definitely worth giving <strong><a href="http://www.safepeak.com/download?source=sqlauthority-sidebar" target="_blank">SafePeak</a></strong> a try. You can download a free, fully functional trial <strong><a href="http://www.safepeak.com/download" target="_blank">www.safepeak.com/download</a></strong>.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/15065/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/15065/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/15065/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/15065/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/15065/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/15065/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/15065/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/15065/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/15065/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/15065/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/15065/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/15065/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/15065/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/15065/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=15065&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/10/17/sqlauthority-news-safepeak-releases-a-major-update-safepeak-version-2-1-for-sql-server-performance-acceleration/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/safepeak2_1.png" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/safepeak2_2.png" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/safepeak2_3.png" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/safepeak2_4.png" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/safepeak2_5.png" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/safepeak2_6.png" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; CE &#8211; 3 Links to Performance Tuning Compact Edition</title>
		<link>http://blog.sqlauthority.com/2011/10/04/sql-server-ce-3-links-to-performance-tuning-compact-edition/</link>
		<comments>http://blog.sqlauthority.com/2011/10/04/sql-server-ce-3-links-to-performance-tuning-compact-edition/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 01:30:03 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=14808</guid>
		<description><![CDATA[Today, I am going to do webcast online on how to improve performance for SQL CE. Here are three articles which I am going to base my session. Database Design and Performance (SQL Server Compact Edition) Use Database Denormalization Decide Between Variable and Fixed-length Columns Create Smaller Row Lengths Use Smaller Key Lengths Publication Article [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=14808&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Today, I am going to do webcast online on how to improve performance for SQL CE. Here are three articles which I am going to base my session.</p>
<p style="text-align:justify;"><a href="http://msdn.microsoft.com/en-us/library/ms172432%28v=SQL.90%29.aspx?ocid=aff-n-in-loc--pd" target="_blank">Database Design and Performance (SQL Server Compact Edition)</a></p>
<ul style="text-align:justify;">
<li>Use Database Denormalization</li>
<li>Decide Between Variable and Fixed-length Columns</li>
<li>Create Smaller Row Lengths</li>
<li>Use Smaller Key Lengths</li>
<li>Publication Article Types and Options</li>
</ul>
<p style="text-align:justify;"><a href="http://msdn.microsoft.com/en-us/library/ms172984%28v=SQL.90%29.aspx?ocid=aff-n-in-loc--pd" target="_blank">Query Performance Tuning (SQL Server Compact Edition)</a></p>
<ul style="text-align:justify;">
<li>Improve Indexes</li>
<li>Choose What to Index</li>
<li>Use the Query Optimizer</li>
<li>Understand Response Time vs. Total Time</li>
<li>Rewrite Subqueries to Use JOIN</li>
<li>Use Parameterized Queries</li>
<li>Query Only When You Must</li>
</ul>
<p style="text-align:justify;"><a href="http://msdn.microsoft.com/en-us/library/bb190959%28v=SQL.90%29.aspx?ocid=aff-n-in-loc--pd" target="_blank">Optimizing Connectivity (SQL Server Compact Edition)</a></p>
<ul style="text-align:justify;">
<li>Synchronization Time-Out Properties</li>
<li>Time-out Optimization</li>
</ul>
<p style="text-align:justify;">I found above articles very interesting and useful, and looking forward to your opinion on the same.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sqlauthority/sqlauthority-news/'>SQLAuthority News</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/14808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/14808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/14808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/14808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/14808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/14808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/14808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/14808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/14808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/14808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/14808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/14808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/14808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/14808/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=14808&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/10/04/sql-server-ce-3-links-to-performance-tuning-compact-edition/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; TempDB in RAM for Performance</title>
		<link>http://blog.sqlauthority.com/2011/04/10/sql-server-tempdb-in-ram-for-performance/</link>
		<comments>http://blog.sqlauthority.com/2011/04/10/sql-server-tempdb-in-ram-for-performance/#comments</comments>
		<pubDate>Sun, 10 Apr 2011 01:30:54 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[TempDB]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=12538</guid>
		<description><![CDATA[Performance Tuning is always the most interesting subject when we talk about software application. While I was recently discussing performance tuning with my friend, we started to talk about the best practices for TempDb. I also pointed my friend to the excellent blog post written by Cindy Gross on the subject: Compilation of SQL Server [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=12538&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Performance Tuning is always the most interesting subject when we talk about software application. While I was recently discussing performance tuning with my friend, we started to talk about the best practices for TempDb. I also pointed my friend to the excellent blog post written by <strong>Cindy Gross </strong>on the subject: <a href="http://blogs.msdn.com/b/cindygross/archive/2009/11/20/compilation-of-sql-server-tempdb-io-best-practices.aspx" target="_blank">Compilation of SQL Server TempDB IO Best Practices</a>. One of the discussion points was that we should put TempDB on the drive which is always giving better performance.</p>
<p style="text-align:justify;">But my friend suddenly asked, <em>“what if we can put TempDB on RAM, as RAM is the fasted drive?”</em></p>
<p style="text-align:justify;">Good question! This was supported in earlier versions of the SQL Server (I think in 6.5). In later version of the SQL Server, the whole algorithm was written more efficiently and it is not that much of an absolute requirement. However, I still prefer putting TempDB on the drive which has lesser IO pressure.</p>
<p style="text-align:justify;">Afterwards, he introduced to me a tool which can create drive from RAM. Well, that was an interesting thought. But then again, I will not go for this solution as it is not natively provided with SQL Server. For me, SQL Server Engine knows the right thing to do and how to maximize the usage of the RAM. Taking away RAM from OS and from other applications may not be a good idea. There are more optimization tricks that exist for TempDB than going for this option.</p>
<p style="text-align:justify;">I would like to ask my readers who among you use this method in the production environment. What is your experience?</p>
<p style="text-align:justify;">Reference:<strong> Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a> Tagged: <a href='http://blog.sqlauthority.com/tag/tempdb/'>TempDB</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/12538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/12538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/12538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/12538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/12538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/12538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/12538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/12538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/12538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/12538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/12538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/12538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/12538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/12538/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=12538&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/04/10/sql-server-tempdb-in-ram-for-performance/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQLAuthority News &#8211; Win Surprise Gift at TechED 2011 Sessions &#8211; Wait Types and Extended Events</title>
		<link>http://blog.sqlauthority.com/2011/03/25/sqlauthority-news-win-surprise-gift-at-teched-2011-sessions-wait-types-and-extended-events/</link>
		<comments>http://blog.sqlauthority.com/2011/03/25/sqlauthority-news-win-surprise-gift-at-teched-2011-sessions-wait-types-and-extended-events/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 01:30:48 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Wait Stats]]></category>
		<category><![CDATA[SQL Wait Types]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=12312</guid>
		<description><![CDATA[A quick note for all &#8211; If you are attending my TechEd sessions today here are few notes for you. Session Time Sessions Date: March 25, 2011 Understanding SQL Server Behavioral Pattern – SQL Server Extended Events Date and Time: March 25, 2011 12:00 PM to 01:00 PM SQL Server Waits and Queues – Your [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=12312&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">A quick note for all &#8211; If you are attending my TechEd sessions today here are few notes for you.</p>
<h2 style="text-align:justify;">Session Time</h2>
<p style="text-align:justify;"><strong>Sessions Date: March 25, 2011</strong></p>
<p style="text-align:justify;">Understanding SQL Server Behavioral Pattern – SQL Server Extended Events<br />
Date and Time: <strong>March 25, 2011 12:00 PM to 01:00 PM</strong></p>
<p style="text-align:justify;">SQL Server Waits and Queues – Your Gateway to Perf. Troubleshooting<br />
Date and Time: <strong>March 25, 2011 04:15 PM to 05:15 PM</strong></p>
<h2 style="text-align:justify;">Surprise Gifts</h2>
<p style="text-align:justify;">If you are attending the session &#8211; rest assure &#8211; few of you are going to get very interesting surprise gift. A good quality one! To win &#8211; you just have to walk in the sessions.</p>
<h2 style="text-align:justify;">Who Should Attend?</h2>
<p style="text-align:justify;">YOU! This session is for everybody who wants to learn something new in the area. It does not matter you work with SQL or not. If you are using application with database as back-end. This session is for you.</p>
<p style="text-align:justify;">Reference:<strong> Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sql-wait-stats/'>SQL Wait Stats</a>, <a href='http://blog.sqlauthority.com/category/sql-wait-types/'>SQL Wait Types</a>, <a href='http://blog.sqlauthority.com/category/sqlauthority/sqlauthority-news/'>SQLAuthority News</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/12312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/12312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/12312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/12312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/12312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/12312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/12312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/12312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/12312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/12312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/12312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/12312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/12312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/12312/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=12312&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/03/25/sqlauthority-news-win-surprise-gift-at-teched-2011-sessions-wait-types-and-extended-events/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Tomorrow 2 Sessions on Performance Tuning at TechEd India 2011 &#8211; March 25, 2011</title>
		<link>http://blog.sqlauthority.com/2011/03/24/sql-server-tomorrow-2-sessions-on-performance-tuning-at-teched-india-2011-march-25-2011/</link>
		<comments>http://blog.sqlauthority.com/2011/03/24/sql-server-tomorrow-2-sessions-on-performance-tuning-at-teched-india-2011-march-25-2011/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 01:30:39 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Wait Stats]]></category>
		<category><![CDATA[SQL Wait Types]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[SQL Extended Events]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=12279</guid>
		<description><![CDATA[Tomorrow is the third day of the TechED India 2011 at Bangalore. I will be speaking on two very interesting sessions. If you are developer, database administrator or just want to learn something new and interesting, I suggest you attend my two sessions tomorrow. Here is the details of the session. Sessions Date: March 25, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=12279&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Tomorrow is the third day of the TechED India 2011 at Bangalore. I will be speaking on two very interesting sessions. If you are developer, database administrator or just want to learn something new and interesting, I suggest you attend my two sessions tomorrow. Here is the details of the session.</p>
<p style="text-align:justify;"><strong>Sessions Date: March 25, 2011</strong></p>
<p style="text-align:justify;">Here is the abstract of the session:</p>
<p style="text-align:justify;"><strong>Understanding SQL Server Behavioral Pattern – SQL Server Extended Events</strong><br />
<strong> Date and Time: March 25, 2011 12:00 PM to 01:00 PM</strong></p>
<p style="text-align:justify;">History repeats itself! SQL Server 2008 has introduced a very powerful,   yet very minimal reoccurring feature called Extended Events. This   advanced session will teach experienced administrators’ capabilities   that were not possible before. From T-SQL error to CPU bottleneck, error   login to deadlocks –Extended Event can detect it for you.  Understanding  the pattern of events can prevent future mistakes.</p>
<p style="text-align:justify;"><strong>SQL Server Waits and Queues – Your Gateway to Perf. Troubleshooting</strong><br />
<strong> Date and Time: March 25, 2011 04:15 PM to 05:15 PM</strong></p>
<p style="text-align:justify;">Just  like a horoscope, SQL Server Waits and Queues can reveal your  past,  explain your present and predict your future. SQL Server  Performance  Tuning uses the Waits and Queues as a proven method to  identify the best  opportunities to improve performance. A glance at  Wait Types can tell  where there is a bottleneck. Learn how to identify  bottlenecks and  potential resolutions in this fast paced, advanced  performance tuning  session.</p>
<p style="text-align:justify;">Here is <strong><a href="http://blog.sqlauthority.com/2011/03/17/sql-server-tell-me-what-you-want-to-listen-my-2-teched-2011-sessions/" target="_blank">the video</a></strong> which my wife shot while I was preparing for the sessions.</p>
<p style="text-align:justify;">Reference:<strong> Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sql-wait-stats/'>SQL Wait Stats</a>, <a href='http://blog.sqlauthority.com/category/sql-wait-types/'>SQL Wait Types</a>, <a href='http://blog.sqlauthority.com/category/sqlauthority/sqlauthority-news/'>SQLAuthority News</a>, <a href='http://blog.sqlauthority.com/category/sqlserver/'>SQLServer</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a> Tagged: <a href='http://blog.sqlauthority.com/tag/sql-extended-events/'>SQL Extended Events</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/12279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/12279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/12279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/12279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/12279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/12279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/12279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/12279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/12279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/12279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/12279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/12279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/12279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/12279/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=12279&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/03/24/sql-server-tomorrow-2-sessions-on-performance-tuning-at-teched-india-2011-march-25-2011/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQLAuthority News &#8211; Solid Quality Journal &#8211; Importance of Statistics</title>
		<link>http://blog.sqlauthority.com/2011/03/22/sqlauthority-news-solid-quality-journal-importance-of-statistics/</link>
		<comments>http://blog.sqlauthority.com/2011/03/22/sqlauthority-news-solid-quality-journal-importance-of-statistics/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 01:30:33 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[SQL Statistics]]></category>
		<category><![CDATA[Statistics]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=12306</guid>
		<description><![CDATA[My article on &#8220;Important of Statistics&#8221; has been published in Solid Quality Journal. Statistics are a key part of getting solid performance. In this article we will go over the basics of the statistics and various best practices related to Statistics. We will go over various frequently asked questions like when to update statistics and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=12306&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">My article on &#8220;Important of Statistics&#8221; has been published in Solid Quality Journal.</p>
<p style="text-align:justify;">Statistics are a key part of getting solid performance. In this article  we will go over the basics of the statistics and various best practices  related to Statistics. We will go over various frequently asked  questions like when to update statistics and difference between sync and  async update of statistics. We will also discuss the pros and cons of  the statistics update.</p>
<p style="text-align:justify;">I have answered one very important questions in this article:</p>
<p style="text-align:justify;"><em><strong>Should keep Auto Create Statistics and Auto Update Statistics settings true/on?</strong></em></p>
<h4 style="text-align:justify;"><a href="http://www.solidq.com/sqj/Pages/2011-February-Issue/Importance-of-Statistics.aspx" target="_blank">Download Importance of Statistics</a></h4>
<p style="text-align:justify;">Reference:<strong> Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a> Tagged: <a href='http://blog.sqlauthority.com/tag/sql-statistics/'>SQL Statistics</a>, <a href='http://blog.sqlauthority.com/tag/statistics/'>Statistics</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/12306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/12306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/12306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/12306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/12306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/12306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/12306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/12306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/12306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/12306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/12306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/12306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/12306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/12306/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=12306&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/03/22/sqlauthority-news-solid-quality-journal-importance-of-statistics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Summary of Month &#8211; Wait Type &#8211; Day 28 of 28</title>
		<link>http://blog.sqlauthority.com/2011/02/28/sql-server-summary-of-month-wait-type-day-28-of-28/</link>
		<comments>http://blog.sqlauthority.com/2011/02/28/sql-server-summary-of-month-wait-type-day-28-of-28/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 01:30:26 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Wait Stats]]></category>
		<category><![CDATA[SQL Wait Types]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11794</guid>
		<description><![CDATA[I am glad to announce that the month of Wait Types and Queues is very successful. I am glad that it was very well received and there was great amount of participation from the community. I am fortunate to have some of the excellent comments throughout the series. I want to dedicate this series to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11794&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I am glad to announce that the month of Wait Types and Queues is<strong></strong> very successful. I am glad that it was very well received and there was great amount of participation from the community.</p>
<p style="text-align:justify;">I am fortunate to have some of the excellent comments throughout the  series. I want to dedicate this series to all the guest bloggers – Jonathan, Jacob, Glenn, and Feodor for their kindness to take participation in this series.</p>
<p style="text-align:justify;">Here is the complete list of the blog posts in this series.</p>
<p style="text-align:justify;">I enjoyed writing the series and I plan to continue writing similar series. Please offer your opinion.</p>
<p style="text-align:justify;"><a href="http://blog.sqlauthority.com/2011/02/01/sql-server-introduction-to-wait-stats-and-wait-types-wait-type-day-1-of-28/" target="_blank">SQL SERVER – Introduction to Wait Stats and Wait Types – Wait Type – Day 1 of 28</a></p>
<p style="text-align:justify;"><a href="http://blog.sqlauthority.com/2011/02/02/sql-server-signal-wait-time-introduction-with-simple-example-day-2-of-28/" target="_blank">SQL SERVER – Signal Wait Time Introduction with Simple Example – Wait Type – Day 2 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – DMV – sys.dm_os_wait_stats Explanation – Wait Type – Day 3 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/03/sql-server-dmv-sys-dm_os_wait_stats-explanation-wait-type-day-3-of-28/">SQL SERVER – DMV – sys.dm_os_wait_stats Explanation – Wait Type – Day 3 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – DMV – sys.dm_os_waiting_tasks and sys.dm_exec_requests – Wait Type – Day 4 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/04/sql-server-dmv-sys-dm_os_waiting_tasks-and-sys-dm_exec_requests-wait-type-day-4-of-28/">SQL SERVER – DMV – sys.dm_os_waiting_tasks and sys.dm_exec_requests – Wait Type – Day 4 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – Capturing Wait Types and Wait Stats Information at Interval – Wait Type – Day 5 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/05/sql-server-capturing-wait-types-and-wait-stats-information-at-interval-wait-type-day-5-of-28/">SQL SERVER – Capturing Wait Types and Wait Stats Information at Interval – Wait Type – Day 5 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – CXPACKET – Parallelism – Usual Solution – Wait Type – Day 6 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/06/sql-server-cxpacket-parallelism-usual-solution-wait-type-day-6-of-28/">SQL SERVER – CXPACKET – Parallelism – Usual Solution – Wait Type – Day 6 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – CXPACKET – Parallelism – Advanced Solution – Wait Type – Day 7 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/07/sql-server-cxpacket-parallelism-advanced-solution-wait-type-day-7-of-28/">SQL SERVER – CXPACKET – Parallelism – Advanced Solution – Wait Type – Day 7 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – SOS_SCHEDULER_YIELD – Wait Type – Day 8 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/08/sql-server-sos_scheduler_yield-wait-type-day-8-of-28/">SQL SERVER – SOS_SCHEDULER_YIELD – Wait Type – Day 8 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – PAGEIOLATCH_DT, PAGEIOLATCH_EX, PAGEIOLATCH_KP, PAGEIOLATCH_SH, PAGEIOLATCH_UP – Wait Type – Day 9 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/09/sql-server-pageiolatch_dt-pageiolatch_ex-pageiolatch_kp-pageiolatch_sh-pageiolatch_up-wait-type-day-9-of-28/">SQL SERVER – PAGEIOLATCH_DT, PAGEIOLATCH_EX, PAGEIOLATCH_KP, PAGEIOLATCH_SH, PAGEIOLATCH_UP – Wait Type – Day 9 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – IO_COMPLETION – Wait Type – Day 10 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/10/sql-server-io_completion-wait-type-day-10-of-28/">SQL SERVER – IO_COMPLETION – Wait Type – Day 10 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – ASYNC_IO_COMPLETION – Wait Type – Day 11 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/11/sql-server-async_io_completion-wait-type-day-11-of-28/">SQL SERVER – ASYNC_IO_COMPLETION – Wait Type – Day 11 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – PAGELATCH_DT, PAGELATCH_EX, PAGELATCH_KP, PAGELATCH_SH, PAGELATCH_UP – Wait Type – Day 12 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/12/sql-server-pagelatch_dt-pagelatch_ex-pagelatch_kp-pagelatch_sh-pagelatch_up-wait-type-day-12-of-28/">SQL SERVER – PAGELATCH_DT, PAGELATCH_EX, PAGELATCH_KP, PAGELATCH_SH, PAGELATCH_UP – Wait Type – Day 12 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – FT_IFTS_SCHEDULER_IDLE_WAIT – Full Text – Wait Type – Day 13 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/13/sql-server-ft_ifts_scheduler_idle_wait-full-text-wait-type-day-13-of-28/">SQL SERVER – FT_IFTS_SCHEDULER_IDLE_WAIT – Full Text – Wait Type – Day 13 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – BACKUPIO, BACKUPBUFFER – Wait Type – Day 14 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/14/sql-server-backupio-backupbuffer-wait-type-day-14-of-28/">SQL SERVER – BACKUPIO, BACKUPBUFFER – Wait Type – Day 14 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – LCK_M_XXX – Wait Type – Day 15 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/15/sql-server-lck_m_xxx-wait-type-day-15-of-28/">SQL SERVER – LCK_M_XXX – Wait Type – Day 15 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – Guest Post – Jonathan Kehayias – Wait Type – Day 16 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/16/sql-server-guest-post-jonathan-kehayias-wait-type-day-16-of-28/">SQL SERVER – Guest Post – Jonathan Kehayias – Wait Type – Day 16 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – WRITELOG – Wait Type – Day 17 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/17/sql-server-writelog-wait-type-day-17-of-28/">SQL SERVER – WRITELOG – Wait Type – Day 17 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – LOGBUFFER – Wait Type – Day 18 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/18/sql-server-logbuffer-wait-type-day-18-of-28/">SQL SERVER – LOGBUFFER – Wait Type – Day 18 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – PREEMPTIVE and Non-PREEMPTIVE – Wait Type – Day 19 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/19/sql-server-preemptive-and-non-preemptive-wait-type-day-19-of-28/">SQL SERVER – PREEMPTIVE and Non-PREEMPTIVE – Wait Type – Day 19 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – MSQL_XP – Wait Type – Day 20 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/20/sql-server-msql_xp-wait-type-day-20-of-28/">SQL SERVER – MSQL_XP – Wait Type – Day 20 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – Guest Posts – Feodor Georgiev – The Context of Our Database Environment – Going Beyond the Internal SQL Server Waits – Wait Type – Day 21 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/21/sql-server-the-context-of-our-database-environment-going-beyond-the-internal-sql-server-waits-wait-type-day-21-of-28/">SQL   SERVER – Guest Posts – Feodor Georgiev – The Context of Our Database   Environment – Going Beyond the Internal SQL Server Waits – Wait Type –   Day 21 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – Guest Post – Jacob Sebastian – Filestream – Wait Types – Wait Queues – Day 22 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/22/sql-server-filestream-wait-types-wait-queues-day-22-of-28/">SQL SERVER – Guest Post – Jacob Sebastian – Filestream – Wait Types – Wait Queues – Day 22 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – OLEDB – Link Server – Wait Type – Day 23 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/23/sql-server-oledb-link-server-wait-type-day-23-of-28/">SQL SERVER – OLEDB – Link Server – Wait Type – Day 23 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – 2000 – DBCC SQLPERF(waitstats) – Wait Type – Day 24 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/24/sql-server-2000-dbcc-sqlperfwaitstats-wait-type-day-24-of-28/">SQL SERVER – 2000 – DBCC SQLPERF(waitstats) – Wait Type – Day 24 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – 2011 – Wait Type – Day 25 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/25/sql-server-2011-wait-type-day-25-of-28/">SQL SERVER – 2011 – Wait Type – Day 25 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – Guest Post – Glenn Berry – Wait Type – Day 26 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/26/sql-server-guest-post-glenn-berry-wait-type-day-26-of-28/">SQL SERVER – Guest Post – Glenn Berry – Wait Type – Day 26 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – Best Reference – Wait Type – Day 27 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/27/sql-server-best-reference-wait-type-day-27-of-28/">SQL SERVER – Best Reference – Wait Type – Day 27 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – Summary of Month – Wait Type – Day 28 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/28/sql-server-summary-of-month-wait-type-day-28-of-28/">SQL SERVER – Summary of Month – Wait Type – Day 28 of 28</a></p>
<p style="text-align:justify;">Reference:<strong> Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sql-wait-stats/'>SQL Wait Stats</a>, <a href='http://blog.sqlauthority.com/category/sql-wait-types/'>SQL Wait Types</a>, <a href='http://blog.sqlauthority.com/category/sqlserver/'>SQLServer</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/11794/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/11794/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/11794/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/11794/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/11794/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/11794/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/11794/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/11794/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/11794/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/11794/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/11794/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/11794/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/11794/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/11794/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11794&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/02/28/sql-server-summary-of-month-wait-type-day-28-of-28/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Wait Stats &#8211; Wait Types &#8211; Wait Queues &#8211; Day 0 of 28</title>
		<link>http://blog.sqlauthority.com/2011/02/01/sql-server-wait-stats-wait-types-wait-queues-day-0-of-28-2/</link>
		<comments>http://blog.sqlauthority.com/2011/02/01/sql-server-wait-stats-wait-types-wait-queues-day-0-of-28-2/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 01:30:53 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Wait Stats]]></category>
		<category><![CDATA[SQL Wait Types]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=12041</guid>
		<description><![CDATA[This blog post will have running account of the all the blog post I will be doing in this month related to SQL Server Wait Types and Wait Queues. SQL SERVER – Introduction to Wait Stats and Wait Types – Wait Type – Day 1 of 28 SQL SERVER – Signal Wait Time Introduction with Simple [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=12041&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">This  blog post will have running account of the all the blog post I will be  doing in this month related to SQL Server Wait Types and Wait Queues.</p>
<p style="text-align:justify;"><a href="http://blog.sqlauthority.com/2011/02/01/sql-server-introduction-to-wait-stats-and-wait-types-wait-type-day-1-of-28/" target="_blank">SQL SERVER – Introduction to Wait Stats and Wait Types – Wait Type – Day 1 of 28</a></p>
<p style="text-align:justify;"><a href="http://blog.sqlauthority.com/2011/02/02/sql-server-signal-wait-time-introduction-with-simple-example-day-2-of-28/" target="_blank">SQL SERVER – Signal Wait Time Introduction with Simple Example – Wait Type – Day 2 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – DMV – sys.dm_os_wait_stats Explanation – Wait Type – Day 3 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/03/sql-server-dmv-sys-dm_os_wait_stats-explanation-wait-type-day-3-of-28/">SQL SERVER – DMV – sys.dm_os_wait_stats Explanation – Wait Type – Day 3 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – DMV – sys.dm_os_waiting_tasks and sys.dm_exec_requests – Wait Type – Day 4 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/04/sql-server-dmv-sys-dm_os_waiting_tasks-and-sys-dm_exec_requests-wait-type-day-4-of-28/">SQL SERVER – DMV – sys.dm_os_waiting_tasks and sys.dm_exec_requests – Wait Type – Day 4 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – Capturing Wait Types and Wait Stats Information at Interval – Wait Type – Day 5 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/05/sql-server-capturing-wait-types-and-wait-stats-information-at-interval-wait-type-day-5-of-28/">SQL SERVER – Capturing Wait Types and Wait Stats Information at Interval – Wait Type – Day 5 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – CXPACKET – Parallelism – Usual Solution – Wait Type – Day 6 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/06/sql-server-cxpacket-parallelism-usual-solution-wait-type-day-6-of-28/">SQL SERVER – CXPACKET – Parallelism – Usual Solution – Wait Type – Day 6 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – CXPACKET – Parallelism – Advanced Solution – Wait Type – Day 7 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/07/sql-server-cxpacket-parallelism-advanced-solution-wait-type-day-7-of-28/">SQL SERVER – CXPACKET – Parallelism – Advanced Solution – Wait Type – Day 7 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – SOS_SCHEDULER_YIELD – Wait Type – Day 8 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/08/sql-server-sos_scheduler_yield-wait-type-day-8-of-28/">SQL SERVER – SOS_SCHEDULER_YIELD – Wait Type – Day 8 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – PAGEIOLATCH_DT, PAGEIOLATCH_EX, PAGEIOLATCH_KP, PAGEIOLATCH_SH, PAGEIOLATCH_UP – Wait Type – Day 9 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/09/sql-server-pageiolatch_dt-pageiolatch_ex-pageiolatch_kp-pageiolatch_sh-pageiolatch_up-wait-type-day-9-of-28/">SQL SERVER – PAGEIOLATCH_DT, PAGEIOLATCH_EX, PAGEIOLATCH_KP, PAGEIOLATCH_SH, PAGEIOLATCH_UP – Wait Type – Day 9 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – IO_COMPLETION – Wait Type – Day 10 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/10/sql-server-io_completion-wait-type-day-10-of-28/">SQL SERVER – IO_COMPLETION – Wait Type – Day 10 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – ASYNC_IO_COMPLETION – Wait Type – Day 11 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/11/sql-server-async_io_completion-wait-type-day-11-of-28/">SQL SERVER – ASYNC_IO_COMPLETION – Wait Type – Day 11 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – PAGELATCH_DT, PAGELATCH_EX, PAGELATCH_KP, PAGELATCH_SH, PAGELATCH_UP – Wait Type – Day 12 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/12/sql-server-pagelatch_dt-pagelatch_ex-pagelatch_kp-pagelatch_sh-pagelatch_up-wait-type-day-12-of-28/">SQL SERVER – PAGELATCH_DT, PAGELATCH_EX, PAGELATCH_KP, PAGELATCH_SH, PAGELATCH_UP – Wait Type – Day 12 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – FT_IFTS_SCHEDULER_IDLE_WAIT – Full Text – Wait Type – Day 13 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/13/sql-server-ft_ifts_scheduler_idle_wait-full-text-wait-type-day-13-of-28/">SQL SERVER – FT_IFTS_SCHEDULER_IDLE_WAIT – Full Text – Wait Type – Day 13 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – BACKUPIO, BACKUPBUFFER – Wait Type – Day 14 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/14/sql-server-backupio-backupbuffer-wait-type-day-14-of-28/">SQL SERVER – BACKUPIO, BACKUPBUFFER – Wait Type – Day 14 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – LCK_M_XXX – Wait Type – Day 15 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/15/sql-server-lck_m_xxx-wait-type-day-15-of-28/">SQL SERVER – LCK_M_XXX – Wait Type – Day 15 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – Guest Post – Jonathan Kehayias – Wait Type – Day 16 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/16/sql-server-guest-post-jonathan-kehayias-wait-type-day-16-of-28/">SQL SERVER – Guest Post – Jonathan Kehayias – Wait Type – Day 16 of 28</a></p>
<p style="text-align:justify;"><a title="Permanent Link to SQL SERVER – WRITELOG – Wait Type – Day 17 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/17/sql-server-writelog-wait-type-day-17-of-28/">SQL SERVER – WRITELOG – Wait Type – Day 17 of 28</a></p>
<p><a title="Permanent Link to SQL SERVER – LOGBUFFER – Wait Type – Day 18 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/18/sql-server-logbuffer-wait-type-day-18-of-28/">SQL SERVER – LOGBUFFER – Wait Type – Day 18 of 28</a></p>
<p><a title="Permanent Link to SQL SERVER – PREEMPTIVE and Non-PREEMPTIVE – Wait Type – Day 19 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/19/sql-server-preemptive-and-non-preemptive-wait-type-day-19-of-28/">SQL SERVER – PREEMPTIVE and Non-PREEMPTIVE – Wait Type – Day 19 of 28</a></p>
<p><a title="Permanent Link to SQL SERVER – MSQL_XP – Wait Type – Day 20 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/20/sql-server-msql_xp-wait-type-day-20-of-28/">SQL SERVER – MSQL_XP – Wait Type – Day 20 of 28</a></p>
<p><a title="Permanent Link to SQL SERVER – Guest Posts – Feodor Georgiev – The Context of Our Database Environment – Going Beyond the Internal SQL Server Waits – Wait Type – Day 21 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/21/sql-server-the-context-of-our-database-environment-going-beyond-the-internal-sql-server-waits-wait-type-day-21-of-28/">SQL  SERVER – Guest Posts – Feodor Georgiev – The Context of Our Database  Environment – Going Beyond the Internal SQL Server Waits – Wait Type –  Day 21 of 28</a></p>
<p><a title="Permanent Link to SQL SERVER – Guest Post – Jacob Sebastian – Filestream – Wait Types – Wait Queues – Day 22 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/22/sql-server-filestream-wait-types-wait-queues-day-22-of-28/">SQL SERVER – Guest Post – Jacob Sebastian – Filestream – Wait Types – Wait Queues – Day 22 of 28</a></p>
<p><a title="Permanent Link to SQL SERVER – OLEDB – Link Server – Wait Type – Day 23 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/23/sql-server-oledb-link-server-wait-type-day-23-of-28/">SQL SERVER – OLEDB – Link Server – Wait Type – Day 23 of 28</a></p>
<p><a title="Permanent Link to SQL SERVER – 2000 – DBCC SQLPERF(waitstats) – Wait Type – Day 24 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/24/sql-server-2000-dbcc-sqlperfwaitstats-wait-type-day-24-of-28/">SQL SERVER – 2000 – DBCC SQLPERF(waitstats) – Wait Type – Day 24 of 28</a></p>
<p><a title="Permanent Link to SQL SERVER – 2011 – Wait Type – Day 25 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/25/sql-server-2011-wait-type-day-25-of-28/">SQL SERVER – 2011 – Wait Type – Day 25 of 28</a></p>
<p><a title="Permanent Link to SQL SERVER – Guest Post – Glenn Berry – Wait Type – Day 26 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/26/sql-server-guest-post-glenn-berry-wait-type-day-26-of-28/">SQL SERVER – Guest Post – Glenn Berry – Wait Type – Day 26 of 28</a></p>
<p><a title="Permanent Link to SQL SERVER – Best Reference – Wait Type – Day 27 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/27/sql-server-best-reference-wait-type-day-27-of-28/">SQL SERVER – Best Reference – Wait Type – Day 27 of 28</a></p>
<p><a title="Permanent Link to SQL SERVER – Summary of Month – Wait Type – Day 28 of 28" rel="bookmark" href="http://blog.sqlauthority.com/2011/02/28/sql-server-summary-of-month-wait-type-day-28-of-28/">SQL SERVER – Summary of Month – Wait Type – Day 28 of 28</a></p>
<p style="text-align:justify;">Reference:<strong> Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sql-wait-stats/'>SQL Wait Stats</a>, <a href='http://blog.sqlauthority.com/category/sql-wait-types/'>SQL Wait Types</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/12041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/12041/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/12041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/12041/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/12041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/12041/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/12041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/12041/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/12041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/12041/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/12041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/12041/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/12041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/12041/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=12041&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/02/01/sql-server-wait-stats-wait-types-wait-queues-day-0-of-28-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Introduction to Wait Stats and Wait Types &#8211; Wait Type &#8211; Day 1 of 28</title>
		<link>http://blog.sqlauthority.com/2011/02/01/sql-server-introduction-to-wait-stats-and-wait-types-wait-type-day-1-of-28/</link>
		<comments>http://blog.sqlauthority.com/2011/02/01/sql-server-introduction-to-wait-stats-and-wait-types-wait-type-day-1-of-28/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 01:30:35 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[DMV]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Wait Stats]]></category>
		<category><![CDATA[SQL Wait Types]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11445</guid>
		<description><![CDATA[I have been working a lot on Wait Stats and Wait Types recently. Last Year, I requested blog readers to send me their respective server’s wait stats. I appreciate their kind response as I have received  Wait stats from my readers. I took each of the results and carefully analyzed them. I provided necessary feedback to the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11445&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I have been working a lot on Wait Stats and Wait Types recently. <a href="http://blog.sqlauthority.com/2010/11/05/sqlauthority-news-happy-deepavali-and-happy-news-year/" target="_blank">Last Year</a>, I requested blog readers to send me their respective server’s wait stats. I appreciate their kind response as I have received  Wait stats from my readers. I took each of the results and carefully analyzed them. I provided necessary feedback to the person who sent me his wait stats and wait types. Based on the feedbacks I got, many of the readers have tuned their server.</p>
<p style="text-align:justify;">After a while I got further feedbacks on my recommendations and again, I collected wait stats. I recorded the wait stats and my recommendations and did further research. At some point at time, there were more than 10 different round trips of the recommendations and suggestions. Finally, after six month of working my hands on performance tuning, I have collected some real world wisdom because of this.</p>
<p style="text-align:justify;">Now I plan to share my findings with all of you over here.</p>
<p style="text-align:justify;">Before anything else, please note that all of these are based on my personal observations and opinions. They may or may not match the theory available at other places. Some of the suggestions may not match your situation. Remember, every server is different and consequently, there is more than one solution to a particular problem. However, this series is written with <strong>kept wait stats</strong> in mind. While I was working on various performance tuning consultations, I did many more things than just tuning wait stats.</p>
<p style="text-align:justify;">Today we will discuss how to capture the wait stats. I use the script diagnostic script created by my friend and SQL Server Expert <a href="http://sqlserverperformance.wordpress.com/" target="_blank">Glenn Berry</a> to collect wait stats.</p>
<p style="text-align:justify;">Here is the script to collect the wait stats:</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:green;">-- Isolate top waits for server instance since last restart or statistics clear<br />
</span><span style="color:blue;">WITH </span><span style="color:black;">Waits </span><span style="color:blue;">AS<br />
</span><span style="color:gray;">(</span><span style="color:blue;">SELECT </span><span style="color:black;">wait_type</span><span style="color:gray;">, </span><span style="color:black;">wait_time_ms </span><span style="color:gray;">/ </span><span style="color:black;">1000. </span><span style="color:blue;">AS </span><span style="color:black;">wait_time_s</span><span style="color:gray;">,<br />
</span><span style="color:black;">100. </span><span style="color:gray;">* </span><span style="color:black;">wait_time_ms </span><span style="color:gray;">/ </span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:black;">wait_time_ms</span><span style="color:gray;">) </span><span style="color:blue;">OVER</span><span style="color:gray;">() </span><span style="color:blue;">AS </span><span style="color:black;">pct</span><span style="color:gray;">,<br />
</span><span style="color:black;">ROW_NUMBER</span><span style="color:gray;">() </span><span style="color:blue;">OVER</span><span style="color:gray;">(</span><span style="color:blue;">ORDER BY </span><span style="color:black;">wait_time_ms </span><span style="color:blue;">DESC</span><span style="color:gray;">) </span><span style="color:blue;">AS </span><span style="color:black;">rn<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.dm_os_wait_stats<br />
</span><span style="color:blue;">WHERE </span><span style="color:black;">wait_type </span><span style="color:gray;">NOT </span><span style="color:blue;">IN </span><span style="color:gray;">(</span><span style="color:red;">'CLR_SEMAPHORE'</span><span style="color:gray;">,</span><span style="color:red;">'LAZYWRITER_SLEEP'</span><span style="color:gray;">,</span><span style="color:red;">'RESOURCE_QUEUE'</span><span style="color:gray;">,</span><span style="color:red;">'SLEEP_TASK'<br />
</span><span style="color:gray;">,</span><span style="color:red;">'SLEEP_SYSTEMTASK'</span><span style="color:gray;">,</span><span style="color:red;">'SQLTRACE_BUFFER_FLUSH'</span><span style="color:gray;">,</span><span style="color:red;">'WAITFOR'</span><span style="color:gray;">, </span><span style="color:red;">'LOGMGR_QUEUE'</span><span style="color:gray;">,</span><span style="color:red;">'CHECKPOINT_QUEUE'<br />
</span><span style="color:gray;">,</span><span style="color:red;">'REQUEST_FOR_DEADLOCK_SEARCH'</span><span style="color:gray;">,</span><span style="color:red;">'XE_TIMER_EVENT'</span><span style="color:gray;">,</span><span style="color:red;">'BROKER_TO_FLUSH'</span><span style="color:gray;">,</span><span style="color:red;">'BROKER_TASK_STOP'</span><span style="color:gray;">,</span><span style="color:red;">'CLR_MANUAL_EVENT'<br />
</span><span style="color:gray;">,</span><span style="color:red;">'CLR_AUTO_EVENT'</span><span style="color:gray;">,</span><span style="color:red;">'DISPATCHER_QUEUE_SEMAPHORE'</span><span style="color:gray;">, </span><span style="color:red;">'FT_IFTS_SCHEDULER_IDLE_WAIT'<br />
</span><span style="color:gray;">,</span><span style="color:red;">'XE_DISPATCHER_WAIT'</span><span style="color:gray;">, </span><span style="color:red;">'XE_DISPATCHER_JOIN'</span><span style="color:gray;">, </span><span style="color:red;">'SQLTRACE_INCREMENTAL_FLUSH_SLEEP'</span><span style="color:gray;">))<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">W1.wait_type</span><span style="color:gray;">,<br />
</span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:black;">W1.wait_time_s </span><span style="color:blue;">AS DECIMAL</span><span style="color:gray;">(</span><span style="color:black;">12</span><span style="color:gray;">, </span><span style="color:black;">2</span><span style="color:gray;">)) </span><span style="color:blue;">AS </span><span style="color:black;">wait_time_s</span><span style="color:gray;">,<br />
</span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:black;">W1.pct </span><span style="color:blue;">AS DECIMAL</span><span style="color:gray;">(</span><span style="color:black;">12</span><span style="color:gray;">, </span><span style="color:black;">2</span><span style="color:gray;">)) </span><span style="color:blue;">AS </span><span style="color:black;">pct</span><span style="color:gray;">,<br />
</span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:black;">W2.pct</span><span style="color:gray;">) </span><span style="color:blue;">AS DECIMAL</span><span style="color:gray;">(</span><span style="color:black;">12</span><span style="color:gray;">, </span><span style="color:black;">2</span><span style="color:gray;">)) </span><span style="color:blue;">AS </span><span style="color:black;">running_pct<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">Waits </span><span style="color:blue;">AS </span><span style="color:black;">W1<br />
</span><span style="color:blue;">INNER JOIN </span><span style="color:black;">Waits </span><span style="color:blue;">AS </span><span style="color:black;">W2<br />
</span><span style="color:blue;">ON </span><span style="color:black;">W2.rn </span><span style="color:gray;">&lt;= </span><span style="color:black;">W1.rn<br />
</span><span style="color:blue;">GROUP BY </span><span style="color:black;">W1.rn</span><span style="color:gray;">, </span><span style="color:black;">W1.wait_type</span><span style="color:gray;">, </span><span style="color:black;">W1.wait_time_s</span><span style="color:gray;">, </span><span style="color:black;">W1.pct<br />
</span><span style="color:blue;">HAVING </span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:black;">W2.pct</span><span style="color:gray;">) - </span><span style="color:black;">W1.pct </span><span style="color:gray;">&lt; </span><span style="color:black;">99 </span><span style="color:blue;">OPTION </span><span style="color:gray;">(</span><span style="color:black;">RECOMPILE</span><span style="color:gray;">); </span><span style="color:green;">-- percentage threshold<br />
</span><span style="color:black;">GO<br />
</span></code></p>
<p style="text-align:justify;">This script uses Dynamic Management View sys.dm_os_wait_stats to collect the wait stats. It omits the system-related wait stats which are not useful to diagnose performance-related bottleneck. Additionally, note OPTION (RECOMPILE) at the end of the DMV will ensure that every time the query runs, it retrieves new data and not the cached data.</p>
<p style="text-align:justify;">This dynamic management view collects all the information since the time when the SQL Server services have been restarted. You can also manually clear the wait stats using the following command:</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">DBCC </span><span style="color:black;">SQLPERF</span><span style="color:gray;">(</span><span style="color:red;">'sys.dm_os_wait_stats'</span><span style="color:gray;">, </span><span style="color:black;">CLEAR</span><span style="color:gray;">);</span></code></p>
<p style="text-align:justify;">Once the wait stats are collected, we can start analysis them and try to see what is causing any particular wait stats to achieve higher percentages than the others.</p>
<p style="text-align:justify;">Many waits stats are related to one another. When the CPU pressure is high, all the CPU-related wait stats show up on top. But when that is fixed, all the wait stats related to the CPU start showing reasonable percentages. It is difficult to have a sure solution, but there are good indications and good suggestions on how to solve this.</p>
<p style="text-align:justify;">I will keep this blog post updated as I will post more details about wait stats and how I reduce them. The reference to Book On Line is over <a href="http://technet.microsoft.com/en-us/library/ms179984.aspx" target="_blank">here</a>.</p>
<p style="text-align:justify;">Of course, I have selected February to run this Wait Stats series. I am already cheating by having the smallest month to run this series. :)</p>
<p style="text-align:justify;">Read all the post in the <strong><a href="http://blog.sqlauthority.com/2011/02/01/sql-server-wait-stats-wait-types-wait-queues-day-0-of-28/" target="_blank">Wait Types and Queue</a></strong> series.</p>
<p style="text-align:justify;">Reference:<strong> Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/dmv/'>DMV</a>, <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sql-wait-stats/'>SQL Wait Stats</a>, <a href='http://blog.sqlauthority.com/category/sql-wait-types/'>SQL Wait Types</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/11445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/11445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/11445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/11445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/11445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/11445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/11445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/11445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/11445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/11445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/11445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/11445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/11445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/11445/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11445&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/02/01/sql-server-introduction-to-wait-stats-and-wait-types-wait-type-day-1-of-28/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Quick Look at SQL Server Configuration for Performance Indications</title>
		<link>http://blog.sqlauthority.com/2011/01/14/sql-server-quick-look-at-sql-server-configuration-for-performance-indications/</link>
		<comments>http://blog.sqlauthority.com/2011/01/14/sql-server-quick-look-at-sql-server-configuration-for-performance-indications/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 01:30:55 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11637</guid>
		<description><![CDATA[Earlier I wrote SQL SERVER – Beginning SQL Server: One Step at a Time – SQL Server Magazine. That was the first article on the series of my real world experience of Performance Tuning experience. I have written second part the same series over here. Read second part over here: Quick Look at SQL Server Configuration [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11637&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Earlier I wrote <strong><a href="http://blog.sqlauthority.com/2011/01/06/sql-server-beginning-sql-server-one-step-at-a-time-sql-server-magazine/" target="_blank">SQL SERVER – Beginning SQL Server: One Step at a Time – SQL Server Magazine</a></strong>. That was the first article on the series of my real world experience of Performance Tuning experience. I have written second part the same series over here.</p>
<p style="text-align:justify;">Read second part over here: <strong><a href="http://www.sqlmag.com/blogs/BeginningSQLServerOneStepataTime/tabid/3472/entryid/76045/Quick-Look-at-SQL-Server-Configuration-for-Performance-Indications.aspx" target="_blank">Quick Look at SQL Server Configuration for Performance Indications</a></strong>.</p>
<p style="text-align:justify;">In this second part I talk about two types of my clients.</p>
<p style="text-align:justify;">1) Those who want instant results</p>
<p style="text-align:justify;">2) Those who want the right results</p>
<p style="text-align:justify;">It is really fun to work with both the clients. I talk about various configuration options which I look at when I try to give very early opinion about SQL Server Performance.</p>
<p style="text-align:justify;">There are various eight configurations, I give quick look and start talking about performance.</p>
<p style="text-align:justify;">Head over to original article over here: <strong><a href="http://www.sqlmag.com/blogs/BeginningSQLServerOneStepataTime/tabid/3472/entryid/76045/Quick-Look-at-SQL-Server-Configuration-for-Performance-Indications.aspx" target="_blank">Quick Look at SQL Server Configuration for Performance Indications</a></strong>.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<p style="text-align:justify;"><strong> </strong><strong><br />
</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/11637/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/11637/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/11637/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/11637/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/11637/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/11637/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/11637/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/11637/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/11637/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/11637/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/11637/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/11637/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/11637/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/11637/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11637&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/01/14/sql-server-quick-look-at-sql-server-configuration-for-performance-indications/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; DMV &#8211; sys.dm_exec_query_optimizer_info &#8211; Statistics of Optimizer</title>
		<link>http://blog.sqlauthority.com/2011/01/07/sql-server-dmv-sys-dm_exec_query_optimizer_info-statistics-of-optimizer/</link>
		<comments>http://blog.sqlauthority.com/2011/01/07/sql-server-dmv-sys-dm_exec_query_optimizer_info-statistics-of-optimizer/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 01:30:08 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL DMV]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11525</guid>
		<description><![CDATA[Incredibly, SQL Server has so much information to share with us. Every single day, I am amazed with this SQL Server technology. Sometimes I find several interesting information by just querying few of the DMV. And when I present this info in front of my client during performance tuning consultancy, they are surprised with my findings. Today, I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11525&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Incredibly, SQL Server has so much information to share with us. Every single day, I am amazed with this SQL Server technology. Sometimes I find several interesting information by just querying few of the DMV. And when I present this info in front of my client during <a href="http://blog.sqlauthority.com/sql-server-service/sql-server-performance-tuning/" target="_blank"><strong>performance tuning consultancy</strong></a>, they are surprised with my findings. Today, I am going to share one of the hidden gems of DMV with you, the one which I frequently use to understand what’s going on under the hood of SQL Server.</p>
<p style="text-align:justify;">SQL Server keeps the record of most of the operations of the Query Optimizer. We can learn many interesting details about the optimizer which can be utilized to improve the performance of server.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.dm_exec_query_optimizer_info<br />
</span><span style="color:blue;">WHERE </span><span style="color:black;">counter </span><span style="color:blue;">IN </span><span style="color:gray;">(</span><span style="color:red;">'optimizations'</span><span style="color:gray;">, </span><span style="color:red;">'elapsed time'</span><span style="color:gray;">,</span><span style="color:red;">'final cost'</span><span style="color:gray;">,<br />
</span><span style="color:red;">'insert stmt'</span><span style="color:gray;">,</span><span style="color:red;">'delete stmt'</span><span style="color:gray;">,</span><span style="color:red;">'update stmt'</span><span style="color:gray;">,<br />
</span><span style="color:red;">'merge stmt'</span><span style="color:gray;">,</span><span style="color:red;">'contains subquery'</span><span style="color:gray;">,</span><span style="color:red;">'tables'</span><span style="color:gray;">,<br />
</span><span style="color:red;">'hints'</span><span style="color:gray;">,</span><span style="color:red;">'order hint'</span><span style="color:gray;">,</span><span style="color:red;">'join hint'</span><span style="color:gray;">,<br />
</span><span style="color:red;">'view reference'</span><span style="color:gray;">,</span><span style="color:red;">'remote query'</span><span style="color:gray;">,</span><span style="color:red;">'maximum DOP'</span><span style="color:gray;">,<br />
</span><span style="color:red;">'maximum recursion level'</span><span style="color:gray;">,</span><span style="color:red;">'indexed views loaded'</span><span style="color:gray;">,<br />
</span><span style="color:red;">'indexed views matched'</span><span style="color:gray;">,</span><span style="color:red;">'indexed views used'</span><span style="color:gray;">,<br />
</span><span style="color:red;">'indexed views updated'</span><span style="color:gray;">,</span><span style="color:red;">'dynamic cursor request'</span><span style="color:gray;">,<br />
</span><span style="color:red;">'fast forward cursor request'</span><span style="color:gray;">)<br />
</span></code></p>
<p style="text-align:justify;">All occurrence values are cumulative and are set to 0 at system restart. All values for value fields are set to NULL at system restart. I have removed a few of the internal counters from the script above, and kept only documented details. Let us check the result of the above query.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/optimizer_info.jpg" alt="" width="367" height="455" /></p>
<p style="text-align:justify;">As you can see, there is so much vital information that is revealed in above query. I can easily say so many things about how many times Optimizer was triggered and what the average time taken by it to optimize my queries was. Additionally, I can also determine how many times update, insert or delete statements were optimized.</p>
<p style="text-align:justify;">I was able to quickly figure out that my client was overusing the Query Hints using this dynamic management view. If you have been reading my blog, I am sure you are aware of my series related to SQL Server Views <a href="http://blog.sqlauthority.com/2010/10/03/sql-server-the-limitations-of-the-views-eleven-and-more/"><strong>SQL SERVER – The Limitations of the Views – Eleven and more…</strong></a>. With this, I can take a quick look and figure out how many times Views were used in various solutions within the query.</p>
<p style="text-align:justify;">Moreover, you can easily know what fraction of the optimizations has been involved in tuning server.</p>
<p style="text-align:justify;">For example, the following query would tell me, in total optimizations, what the fraction of time View was &#8220;reference&#8220;. As this View also includes system Views and DMVs, the number is a bit higher on my machine.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:gray;">(</span><span style="color:blue;">SELECT </span><span style="color:magenta;">CAST </span><span style="color:gray;">(</span><span style="color:black;">occurrence </span><span style="color:blue;">AS FLOAT</span><span style="color:gray;">)<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.dm_exec_query_optimizer_info </span><span style="color:blue;">WHERE </span><span style="color:black;">counter </span><span style="color:blue;">= </span><span style="color:red;">'view reference'</span><span style="color:gray;">) /<br />
(</span><span style="color:blue;">SELECT </span><span style="color:magenta;">CAST </span><span style="color:gray;">(</span><span style="color:black;">occurrence </span><span style="color:blue;">AS FLOAT</span><span style="color:gray;">)<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.dm_exec_query_optimizer_info </span><span style="color:blue;">WHERE </span><span style="color:black;">counter </span><span style="color:blue;">= </span><span style="color:red;">'optimizations'</span><span style="color:gray;">)<br />
</span><span style="color:blue;">AS </span><span style="color:black;">ViewReferencedFraction<br />
</span></code></p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-dmv/'>SQL DMV</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sqlserver/'>SQLServer</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/11525/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/11525/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/11525/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/11525/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/11525/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/11525/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/11525/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/11525/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/11525/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/11525/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/11525/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/11525/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/11525/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/11525/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11525&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/01/07/sql-server-dmv-sys-dm_exec_query_optimizer_info-statistics-of-optimizer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/optimizer_info.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Beginning SQL Server: One Step at a Time &#8211; SQL Server Magazine</title>
		<link>http://blog.sqlauthority.com/2011/01/06/sql-server-beginning-sql-server-one-step-at-a-time-sql-server-magazine/</link>
		<comments>http://blog.sqlauthority.com/2011/01/06/sql-server-beginning-sql-server-one-step-at-a-time-sql-server-magazine/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 01:30:19 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11539</guid>
		<description><![CDATA[I am glad to announce that along with SQLAuthority.com, I will be blogging on the prominent site of SQL Server Magazine. My very first blog post there is already live; read here: Beginning SQL Server: One Step at a Time. My association with SQL Server Magazine has been quite long, I have written nearly 7 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11539&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I am glad to announce that along with SQLAuthority.com, I will be blogging on the prominent site of <a target="_blank">SQL Server Magazine</a>. My very first blog post there is already live; read here: <a href="http://www.sqlmag.com/blogs/BeginningSQLServerOneStepataTime.aspx" target="_blank"><strong>Beginning SQL Server: One Step at a Time</strong></a>.</p>
<p style="text-align:justify;">My association with SQL Server Magazine has been quite long, I have written nearly 7 to 8 SQL Server articles for the print magazine and it has been a great experience. I used to stay in the United States at that time. I moved back to India for good, and during this process, I had put everything on hold for a while. Just like many things, &#8220;<strong>temporary</strong>&#8221; things become &#8220;<strong>permanent</strong>&#8221; &#8211; coming back to SQLMag was on hold for long time. Well, this New Year, things have changed &#8211; once again, I am back with my online presence at SQLMag.com.</p>
<p style="text-align:justify;">Everybody is a beginner at every task or activity at some point of his/her life: spelling words for the first time; learning how to drive for the first time, etc. No one is perfect at the start of any task, but every human is different. As time passes, we all develop our interests and begin to study our subject of interest. Most of us dream to get a job in the area of our study &#8211; however things change as time passes. I recently read somewhere online (I could not find the link again while writing this one) that all the successful people in various areas have never studied in the area in which they are successful. After going through a formal learning process of what we love, we refuse to stop learning, and we finally stop changing career and focus areas. We move, we dare and we progress.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/Learning.jpg" alt="" width="416" height="325" /></p>
<p style="text-align:justify;">IT field is similar to our life. New IT professionals come to this field every day. There are two types of beginners &#8211; a) those who are associated with IT field but not familiar with other technologies, and b) those who are absolutely new to the IT field. Learning a new technology is always exciting and overwhelming for enthusiasts. I am working with database (in particular) for SQL Server for more than 7 years but I am still overwhelmed with so many things to learn. I continue to learn and I do not think that I should ever stop doing so. Just like everybody, I want to be in the race and get ahead in learning the technology. For the same, I am always looking for good guidance. I always try to find a good article, blog or book chapter, which can teach me what I really want to learn at this stage in my career and can be immensely helpful. Quite often, I prefer to read the material where the author does not judge me or assume my understanding. I like to read new concepts like a child, who takes his/her first steps of learning without any prior knowledge.</p>
<p style="text-align:justify;">Keeping my personal philosophy and preference in mind, I will be blogging on SQL Server Magazine site. I will be blogging on the beginners stuff. I will be blogging for them, who really want to start and make a mark in this area. I will be blogging for all those who have an extreme passion for learning. I am happy that this is a good start for this year. One of my resolutions is to help every beginner. It is totally possible that in future they all will grow and find the same article quite &#8216;<strong>easy</strong>&#8216; &#8211; well when that happens, it indicates the success of the article and material!</p>
<p style="text-align:justify;">Well, I encourage everybody to read my SQL Server Magazine blog &#8211; I will be blogging there frequently on various topics. To begin, we will be talking about performance tuning, and I assure that I will not shy away from other multiple areas.</p>
<p style="text-align:justify;">Read my SQL Server Magazine Blog:</p>
<h3 style="text-align:justify;"><a href="http://www.sqlmag.com/blogs/BeginningSQLServerOneStepataTime.aspx" target="_blank">Beginning SQL Server: One Step at a Time</a></h3>
<p style="text-align:justify;">I think the title says it all. Do leave your comments and feedback to indicate your preference of subject and interest. I am going to continue writing on subject, and the aim is of course to help grow in this field.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sqlauthority/sqlauthority-news/'>SQLAuthority News</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/11539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/11539/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/11539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/11539/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/11539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/11539/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/11539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/11539/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/11539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/11539/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/11539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/11539/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/11539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/11539/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11539&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/01/06/sql-server-beginning-sql-server-one-step-at-a-time-sql-server-magazine/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/Learning.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Plan Cache and Data Cache in Memory</title>
		<link>http://blog.sqlauthority.com/2010/12/28/sql-server-plan-cache-and-data-cache-in-memory/</link>
		<comments>http://blog.sqlauthority.com/2010/12/28/sql-server-plan-cache-and-data-cache-in-memory/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 01:30:41 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[SQL Memory]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11375</guid>
		<description><![CDATA[I get following question almost all the time when I go for consultations or training. I often end up providing the scripts to my clients and attendees. Instead of writing new blog post, today in this single blog post, I am going to cover both the script and going to link to original blog posts [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11375&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I get following question almost all the time when I go for consultations or training. I often end up providing the scripts to my clients and attendees. Instead of writing new blog post, today in this single blog post, I am going to cover both the script and going to link to original blog posts where I have mentioned about this blog post.</p>
<h2 style="text-align:justify;">Plan Cache in Memory</h2>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">USE </span><span style="color:black;">AdventureWorks<br />
GO<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">[text]</span><span style="color:gray;">, </span><span style="color:black;">cp.size_in_bytes</span><span style="color:gray;">, </span><span style="color:black;">plan_handle<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.dm_exec_cached_plans </span><span style="color:blue;">AS </span><span style="color:black;">cp<br />
</span><span style="color:gray;">CROSS </span><span style="color:black;">APPLY sys.dm_exec_sql_text</span><span style="color:gray;">(</span><span style="color:black;">plan_handle</span><span style="color:gray;">)<br />
</span><span style="color:blue;">WHERE </span><span style="color:black;">cp.cacheobjtype </span><span style="color:blue;">= </span><span style="color:red;">N'Compiled Plan'</span><span style="color:black;"><br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">cp.size_in_bytes </span><span style="color:blue;">DESC<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;">Further explanation of this script is over here: <strong><a href="http://blog.sqlauthority.com/2010/08/28/sql-server-plan-cache-retrieve-and-remove-a-simple-script/" target="_blank">SQL SERVER – Plan Cache – Retrieve and Remove – A Simple Script</a></strong></p>
<h2 style="text-align:justify;">Data Cache in Memory</h2>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">USE </span><span style="color:black;">AdventureWorks<br />
GO<br />
</span><span style="color:blue;">SELECT </span><span style="color:magenta;">COUNT</span><span style="color:gray;">(*) </span><span style="color:blue;">AS </span><span style="color:black;">cached_pages_count</span><span style="color:gray;">,<br />
</span><span style="color:black;">name </span><span style="color:blue;">AS </span><span style="color:black;">BaseTableName</span><span style="color:gray;">, </span><span style="color:black;">IndexName</span><span style="color:gray;">,<br />
</span><span style="color:black;">IndexTypeDesc<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.dm_os_buffer_descriptors </span><span style="color:blue;">AS </span><span style="color:black;">bd<br />
</span><span style="color:blue;">INNER JOIN<br />
</span><span style="color:gray;">(<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">s_obj.name</span><span style="color:gray;">, </span><span style="color:black;">s_obj.index_id</span><span style="color:gray;">,<br />
</span><span style="color:black;">s_obj.allocation_unit_id</span><span style="color:gray;">, </span><span style="color:black;">s_obj.</span><span style="color:magenta;">OBJECT_ID</span><span style="color:gray;">,<br />
</span><span style="color:black;">i.name IndexName</span><span style="color:gray;">, </span><span style="color:black;">i.type_desc IndexTypeDesc<br />
</span><span style="color:blue;">FROM<br />
</span><span style="color:gray;">(<br />
</span><span style="color:blue;">SELECT </span><span style="color:magenta;">OBJECT_NAME</span><span style="color:gray;">(</span><span style="color:magenta;">OBJECT_ID</span><span style="color:gray;">) </span><span style="color:blue;">AS </span><span style="color:black;">name</span><span style="color:gray;">,<br />
</span><span style="color:black;">index_id </span><span style="color:gray;">,</span><span style="color:black;">allocation_unit_id</span><span style="color:gray;">, </span><span style="color:magenta;">OBJECT_ID<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.allocation_units </span><span style="color:blue;">AS </span><span style="color:black;">au<br />
</span><span style="color:blue;">INNER JOIN </span><span style="color:black;">sys.partitions </span><span style="color:blue;">AS </span><span style="color:black;">p<br />
</span><span style="color:blue;">ON </span><span style="color:black;">au.container_id </span><span style="color:blue;">= </span><span style="color:black;">p.hobt_id<br />
</span><span style="color:gray;">AND (</span><span style="color:black;">au.</span><span style="color:blue;">TYPE = </span><span style="color:black;">1 </span><span style="color:gray;">OR </span><span style="color:black;">au.</span><span style="color:blue;">TYPE = </span><span style="color:black;">3</span><span style="color:gray;">)<br />
</span><span style="color:blue;">UNION </span><span style="color:gray;">ALL<br />
</span><span style="color:blue;">SELECT </span><span style="color:magenta;">OBJECT_NAME</span><span style="color:gray;">(</span><span style="color:magenta;">OBJECT_ID</span><span style="color:gray;">) </span><span style="color:blue;">AS </span><span style="color:black;">name</span><span style="color:gray;">,<br />
</span><span style="color:black;">index_id</span><span style="color:gray;">, </span><span style="color:black;">allocation_unit_id</span><span style="color:gray;">, </span><span style="color:magenta;">OBJECT_ID<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.allocation_units </span><span style="color:blue;">AS </span><span style="color:black;">au<br />
</span><span style="color:blue;">INNER JOIN </span><span style="color:black;">sys.partitions </span><span style="color:blue;">AS </span><span style="color:black;">p<br />
</span><span style="color:blue;">ON </span><span style="color:black;">au.container_id </span><span style="color:blue;">= </span><span style="color:black;">p.partition_id<br />
</span><span style="color:gray;">AND </span><span style="color:black;">au.</span><span style="color:blue;">TYPE = </span><span style="color:black;">2<br />
</span><span style="color:gray;">) </span><span style="color:blue;">AS </span><span style="color:black;">s_obj<br />
</span><span style="color:magenta;">LEFT </span><span style="color:blue;">JOIN </span><span style="color:black;">sys.indexes i </span><span style="color:blue;">ON </span><span style="color:black;">i.index_id </span><span style="color:blue;">= </span><span style="color:black;">s_obj.index_id<br />
</span><span style="color:gray;">AND </span><span style="color:black;">i.</span><span style="color:magenta;">OBJECT_ID </span><span style="color:blue;">= </span><span style="color:black;">s_obj.</span><span style="color:magenta;">OBJECT_ID </span><span style="color:gray;">) </span><span style="color:blue;">AS </span><span style="color:black;">obj<br />
</span><span style="color:blue;">ON </span><span style="color:black;">bd.allocation_unit_id </span><span style="color:blue;">= </span><span style="color:black;">obj.allocation_unit_id<br />
</span><span style="color:blue;">WHERE </span><span style="color:black;">database_id </span><span style="color:blue;">= </span><span style="color:magenta;">DB_ID</span><span style="color:gray;">()<br />
</span><span style="color:blue;">GROUP BY </span><span style="color:black;">name</span><span style="color:gray;">, </span><span style="color:black;">index_id</span><span style="color:gray;">, </span><span style="color:black;">IndexName</span><span style="color:gray;">, </span><span style="color:black;">IndexTypeDesc<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">cached_pages_count </span><span style="color:blue;">DESC</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO<br />
</span></code></p>
<p style="text-align:justify;">Further explanation of this script is over here: <strong><a href="http://blog.sqlauthority.com/2009/08/21/sql-server-get-query-plan-along-with-query-text-and-execution-count/" target="_blank">SQL SERVER – Get Query Plan Along with Query Text and Execution Count</a></strong></p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a> Tagged: <a href='http://blog.sqlauthority.com/tag/sql-memory/'>SQL Memory</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/11375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/11375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/11375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/11375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/11375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/11375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/11375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/11375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/11375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/11375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/11375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/11375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/11375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/11375/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11375&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2010/12/28/sql-server-plan-cache-and-data-cache-in-memory/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQLAuthority News &#8211; 18 Seconds of Fame &#8211; My PASS Experience</title>
		<link>http://blog.sqlauthority.com/2010/12/25/sqlauthority-news-18-seconds-of-fame-my-pass-experience/</link>
		<comments>http://blog.sqlauthority.com/2010/12/25/sqlauthority-news-18-seconds-of-fame-my-pass-experience/#comments</comments>
		<pubDate>Sat, 25 Dec 2010 01:30:53 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[About Me]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLAuthority Author Visit]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11334</guid>
		<description><![CDATA[Happy Holidays to All of YOU! Life is full of little and happy surprises. I think Christmas and Santa are based on it. I just received very interesting email earlier today, I had no idea about it. Earlier this year, I had visited Seattle to attend SQLPASS &#8211; read the complete summary over here: SQLAuthority [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11334&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Happy Holidays to All of YOU!</p>
<p style="text-align:justify;">Life is full of little and happy surprises. I think Christmas and Santa are based on it. I just received very interesting email earlier today, I had no idea about it.</p>
<p style="text-align:justify;">Earlier this year, I had visited Seattle to attend SQLPASS &#8211; read the complete summary over here: <strong><a href="http://blog.sqlauthority.com/2010/11/23/sqlauthority-news-sqlpass-nov-8-11-2010-seattle-an-alternative-look-at-experience">SQLAuthority News – SQLPASS Nov 8-11, 2010-Seattle – An Alternative Look at Experience</a>. </strong></p>
<p style="text-align:justify;">While I was walking down, someone has stopped me and asked if they can talk to me for 15 seconds, I said yes and they had shot quick movie with mobile. The conversation was very quick and I had forgotten about it. Today I received email from one of the blog reader about it being on YouTube.</p>
<p style="text-align:justify;">Honestly, I did not know if this was ever going to be on YouTube. I am surprised and thrilled.</p>
<p style="text-align:justify;">Watch my 18 seconds fame movie.</p>
<p><object width="500" height="306"><param name="movie" value="http://www.youtube.com/v/hPj1K-yuiwM?fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/hPj1K-yuiwM?fs=1" type="application/x-shockwave-flash" width="500" height="306" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Reference: <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.sqlauthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/about-me/'>About Me</a>, <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sqlauthority/sqlauthority-author-visit/'>SQLAuthority Author Visit</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/11334/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/11334/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/11334/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/11334/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/11334/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/11334/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/11334/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/11334/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/11334/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/11334/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/11334/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/11334/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/11334/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/11334/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11334&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2010/12/25/sqlauthority-news-18-seconds-of-fame-my-pass-experience/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Index Created on View not Used Often &#8211; Observation of the View &#8211; Part 2</title>
		<link>http://blog.sqlauthority.com/2010/12/23/sql-server-index-created-on-view-not-used-often-observation-of-the-view-part-2/</link>
		<comments>http://blog.sqlauthority.com/2010/12/23/sql-server-index-created-on-view-not-used-often-observation-of-the-view-part-2/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 01:30:07 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL View]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11298</guid>
		<description><![CDATA[Earlier, I have written an article about SQL SERVER – Index Created on View not Used Often – Observation of the View. I received an email from one of the readers, asking if there would no problems when we create the Index on the base table. Well, we need to discuss this situation in two [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11298&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Earlier, I have written an article about <a href="http://blog.sqlauthority.com/2010/12/21/sql-server-index-created-on-view-not-used-often-observation-of-the-view/" target="_blank"><strong>SQL SERVER – Index Created on View not Used Often – Observation of the View</strong></a>. I received an email from one of the readers, asking if there would no problems when we create the Index on the base table.</p>
<p style="text-align:justify;">Well, we need to discuss this situation in two different cases.</p>
<p style="text-align:justify;">Before proceeding to the discussion, I strongly suggest you read my earlier articles. To avoid the duplication, I am not going to repeat the code and explanation over here.</p>
<p style="text-align:justify;">In all the earlier cases, I have explained in detail how Index created on the View is not utilized.</p>
<p style="text-align:justify;"><strong><a href="http://blog.sqlauthority.com/2010/12/18/sql-server-index-created-on-view-not-used-often-limitation-of-the-view-12/" target="_blank">SQL SERVER – Index Created on View not Used Often – Limitation of the View 12</a></strong></p>
<p style="text-align:justify;"><strong><a href="http://blog.sqlauthority.com/2010/12/21/sql-server-index-created-on-view-not-used-often-observation-of-the-view/" target="_blank">SQL SERVER – Index Created on View not Used Often – Observation of the View</a></strong></p>
<p style="text-align:justify;"><strong><a href="http://blog.sqlauthority.com/2010/10/12/sql-server-indexed-view-always-use-index-on-index/" target="_blank">SQL SERVER – Indexed View always Use Index on Table</a></strong></p>
<p style="text-align:justify;">As per earlier blog posts, so far we have done the following:</p>
<ul style="text-align:justify;">
<li>Create      a Table</li>
<li>Create      a View</li>
<li>Create      Index On View</li>
<li>Write      SELECT with ORDER BY on View</li>
</ul>
<p style="text-align:justify;">However, the blog reader who emailed me suggests the extension of the said logic, which is as follows:</p>
<ul style="text-align:justify;">
<li>Create      a Table</li>
<li>Create      a View</li>
<li>Create      Index On View</li>
<li>Write      SELECT with ORDER BY on View</li>
<li><strong>Create      Index on the Base Table</strong></li>
<li><strong>Write      SELECT with ORDER BY on View</strong></li>
</ul>
<p style="text-align:justify;">After doing the last two steps, the question is &#8220;<em><strong>Will the query on the View utilize the Index on the View, or will it still use the Index of the base table?</strong></em>&#8220;</p>
<p style="text-align:justify;">Let us first run the Create example.</p>
<p style="text-align:justify;"><span style="color:blue;">USE </span>tempdb</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:black;"> GO<br />
</span><span style="color:blue;">IF </span><span style="color:gray;">EXISTS (</span><span style="color:blue;">SELECT </span><span style="color:gray;">* </span><span style="color:blue;">FROM </span><span style="color:black;">sys.views </span><span style="color:blue;">WHERE </span><span style="color:magenta;">OBJECT_ID </span><span style="color:blue;">= </span><span style="color:magenta;">OBJECT_ID</span><span style="color:gray;">(</span><span style="color:red;">N'[dbo].[SampleView]'</span><span style="color:gray;">))<br />
</span><span style="color:blue;">DROP VIEW </span><span style="color:black;">[dbo].[SampleView]<br />
GO<br />
</span><span style="color:blue;">IF </span><span style="color:gray;">EXISTS (</span><span style="color:blue;">SELECT </span><span style="color:gray;">* </span><span style="color:blue;">FROM </span><span style="color:black;">sys.objects </span><span style="color:blue;">WHERE </span><span style="color:magenta;">OBJECT_ID </span><span style="color:blue;">= </span><span style="color:magenta;">OBJECT_ID</span><span style="color:gray;">(</span><span style="color:red;">N'[dbo].[mySampleTable]'</span><span style="color:gray;">) AND </span><span style="color:blue;">TYPE IN </span><span style="color:gray;">(</span><span style="color:red;">N'U'</span><span style="color:gray;">))<br />
</span><span style="color:blue;">DROP TABLE </span><span style="color:black;">[dbo].[mySampleTable]<br />
GO<br />
</span><span style="color:green;">-- Create SampleTable<br />
</span><span style="color:blue;">CREATE TABLE </span><span style="color:black;">mySampleTable </span><span style="color:gray;">(</span><span style="color:black;">ID1 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID2 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">SomeData </span><span style="color:blue;">VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">100</span><span style="color:gray;">))<br />
</span><span style="color:blue;">INSERT INTO </span><span style="color:black;">mySampleTable </span><span style="color:gray;">(</span><span style="color:black;">ID1</span><span style="color:gray;">,</span><span style="color:black;">ID2</span><span style="color:gray;">,</span><span style="color:black;">SomeData</span><span style="color:gray;">)<br />
</span><span style="color:blue;">SELECT TOP </span><span style="color:black;">100000 ROW_NUMBER</span><span style="color:gray;">() </span><span style="color:blue;">OVER </span><span style="color:gray;">(</span><span style="color:blue;">ORDER BY </span><span style="color:black;">o1.name</span><span style="color:gray;">),<br />
</span><span style="color:black;">ROW_NUMBER</span><span style="color:gray;">() </span><span style="color:blue;">OVER </span><span style="color:gray;">(</span><span style="color:blue;">ORDER BY </span><span style="color:black;">o2.name</span><span style="color:gray;">),<br />
</span><span style="color:black;">o2.name<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.all_objects o1<br />
</span><span style="color:gray;">CROSS </span><span style="color:blue;">JOIN </span><span style="color:black;">sys.all_objects o2<br />
GO<br />
</span><span style="color:green;">-- Create View<br />
</span><span style="color:blue;">CREATE VIEW </span><span style="color:black;">SampleView<br />
</span><span style="color:blue;">WITH </span><span style="color:black;">SCHEMABINDING<br />
</span><span style="color:blue;">AS<br />
SELECT </span><span style="color:black;">ID1</span><span style="color:gray;">,</span><span style="color:black;">ID2</span><span style="color:gray;">,</span><span style="color:black;">SomeData<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">dbo.mySampleTable<br />
GO<br />
</span><span style="color:green;">-- Create Index on View<br />
</span><span style="color:blue;">CREATE UNIQUE CLUSTERED INDEX </span><span style="color:black;">[IX_ViewSample] </span><span style="color:blue;">ON </span><span style="color:black;">[dbo].[SampleView]<br />
</span><span style="color:gray;">(<br />
</span><span style="color:black;">ID2 </span><span style="color:blue;">ASC<br />
</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:green;">-- Select from view<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">ID1</span><span style="color:gray;">,</span><span style="color:black;">ID2</span><span style="color:gray;">,</span><span style="color:black;">SomeData<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">SampleView<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">ID2<br />
GO<br />
</span><span style="color:green;">-- Create Index on Original Table<br />
-- On Column ID1<br />
</span><span style="color:blue;">CREATE UNIQUE CLUSTERED INDEX </span><span style="color:black;">[IX_OriginalTable] </span><span style="color:blue;">ON </span><span style="color:black;">mySampleTable<br />
</span><span style="color:gray;">(<br />
</span><span style="color:black;">ID1 </span><span style="color:blue;">ASC<br />
</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:green;">-- On Column ID2<br />
</span><span style="color:blue;">CREATE UNIQUE NONCLUSTERED INDEX </span><span style="color:black;">[IX_OriginalTable_ID2] </span><span style="color:blue;">ON </span><span style="color:black;">mySampleTable<br />
</span><span style="color:gray;">(<br />
</span><span style="color:black;">ID2<br />
</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:green;">-- Select from view<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">ID1</span><span style="color:gray;">,</span><span style="color:black;">ID2</span><span style="color:gray;">,</span><span style="color:black;">SomeData<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">SampleView<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">ID2<br />
GO<br />
</span></code></p>
<p style="text-align:justify;">Now let us see the execution plans for both of the SELECT statement.</p>
<p style="text-align:justify;"><strong>Before Index on Base Table (with Index on View):</strong></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/nolimitview.jpg" alt="" width="498" height="134" /></p>
<p style="text-align:justify;"><strong>After Index on Base Table (with Index on View):</strong></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/nolimitview.jpg" alt="" width="498" height="134" /></p>
<p style="text-align:justify;">Looking at both executions, it is very clear that with or without, the View is using Indexes.</p>
<p style="text-align:justify;">Alright, I have written 11 disadvantages of the Views. Now I have written one case where the View is using Indexes. Anybody who says that I am being harsh on Views can say now that I found one place where Index on View can be helpful.</p>
<p style="text-align:justify;">Reference:<strong> Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sql-view/'>SQL View</a>, <a href='http://blog.sqlauthority.com/category/sqlserver/'>SQLServer</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/11298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/11298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/11298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/11298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/11298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/11298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/11298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/11298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/11298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/11298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/11298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/11298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/11298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/11298/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11298&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2010/12/23/sql-server-index-created-on-view-not-used-often-observation-of-the-view-part-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/nolimitview.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/nolimitview.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Public Training and Private Training &#8211; Differences and Similarities &#8211; Public Training vs Private Training</title>
		<link>http://blog.sqlauthority.com/2010/12/22/sql-server-public-training-and-private-training-differences-and-similarities/</link>
		<comments>http://blog.sqlauthority.com/2010/12/22/sql-server-public-training-and-private-training-differences-and-similarities/#comments</comments>
		<pubDate>Wed, 22 Dec 2010 01:30:52 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Training]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11281</guid>
		<description><![CDATA[Earlier this year, I was on Road SQL Server Seminars. I did many SQL Server Performance Trainings and SQL Server Performance Consultations throughout the year but I feel the most rewarding exercise is always the one when instructor learns something from students, too. I was just talking to my wife, Nupur &#8211; she manages my logistics and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11281&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Earlier this year, I was on Road SQL Server Seminars. I did many <a href="http://blog.sqlauthority.com/sql-server-performance-tuning/" target="_blank"><strong>SQL Server Performance Trainings</strong></a> and<strong> </strong><a href="http://blog.sqlauthority.com/sql-server-performance-tuning/" target="_blank"><strong>SQL Server Performance Consultations</strong></a><strong> </strong>throughout the year but I feel the most rewarding exercise is always the one when instructor learns something from students, too.</p>
<p style="text-align:justify;">I was just talking to my wife, <strong><a href="http://www.nupurdave.com/" target="_blank">Nupur</a></strong> &#8211; she manages my logistics and administration related activities – and she pointed out that this year I have done 62% consultations and 38% trainings. I was bit surprised as I thought the numbers would be reversed. Every time I review the year, I think of training done at organizations. Well, I cannot argue with reality, I have done more consultations (some would call them projects) than training.</p>
<p style="text-align:justify;">I told my wife that I enjoy consultations more than training. She promptly asked me a question which was not directly related but made me think for long time, and in the end resulted in this blog post. Nupur asked me: <em><strong>what do I enjoy the most, public training or private training? </strong></em>I had a long conversation with her on this subject.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/training.jpg" alt="" width="497" height="497" /></p>
<p style="text-align:justify;">I am not going to write long blog post which can change your life here. This is rather a small post condensing my one hour discussion into 200 words.</p>
<p style="text-align:justify;"><strong>Public Training is fun because&#8230;</strong></p>
<ul style="text-align:justify;">
<li>There are lots of different kinds of attendees</li>
<li>There are always vivid questions</li>
<li>Lots of questions on questions</li>
<li>Less interest in theory and more interest in demos</li>
<li>Good opportunity of future business</li>
</ul>
<p style="text-align:justify;"><strong>Private Training is fun because&#8230;</strong></p>
<ul style="text-align:justify;">
<li>There is a focused interest</li>
<li>One question is discussed deeply because of existing company issues</li>
<li>More interest in “how it happened” concepts &#8211; under the hood operations</li>
<li>Good connection with attendees</li>
<li>This is also a good opportunity of future business</li>
</ul>
<p style="text-align:justify;">Here I will stop my monologue and I want to open up this question to all of you:</p>
<p style="text-align:justify;"><strong>Question to Attendees -</strong></p>
<p style="text-align:justify;">Which one do you enjoy the most &#8211; Public Training or Private Training?</p>
<p style="text-align:justify;"><strong>Question to Trainers -</strong></p>
<p style="text-align:justify;">What do you enjoy the most &#8211; Public Training or Private Training?</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.sqlauthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sqlauthority/sql-training/'>SQL Training</a>, <a href='http://blog.sqlauthority.com/category/sqlauthority/sqlauthority-news/'>SQLAuthority News</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/11281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/11281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/11281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/11281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/11281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/11281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/11281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/11281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/11281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/11281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/11281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/11281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/11281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/11281/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11281&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2010/12/22/sql-server-public-training-and-private-training-differences-and-similarities/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/training.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Index Created on View not Used Often &#8211; Observation of the View</title>
		<link>http://blog.sqlauthority.com/2010/12/21/sql-server-index-created-on-view-not-used-often-observation-of-the-view/</link>
		<comments>http://blog.sqlauthority.com/2010/12/21/sql-server-index-created-on-view-not-used-often-observation-of-the-view/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 01:30:39 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL View]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11265</guid>
		<description><![CDATA[I always enjoy writing about concepts on Views. Views are frequently used concepts, and so it’s not surprising that I have seen so many misconceptions about this subject. To clear such misconceptions, I have previously written the article SQL SERVER – The Limitations of the Views – Eleven and more…. I also wrote a follow [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11265&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I always enjoy writing about concepts on Views. Views are frequently used concepts, and so it’s not surprising that I have seen so many misconceptions about this subject. To clear such misconceptions, I have previously written the article <a href="http://blog.sqlauthority.com/2010/10/03/sql-server-the-limitations-of-the-views-eleven-and-more" target="_blank"><strong>SQL SERVER – The Limitations of the Views – Eleven and more…</strong></a>.</p>
<p style="text-align:justify;">I also wrote a follow up article wherein I demonstrated that without even creating index on the basic table, the query on the View will not use the View. You can read about this demonstration over here: <a href="http://blog.sqlauthority.com/2010/12/18/sql-server-index-created-on-view-not-used-often-limitation-of-the-view-12/" target="_blank"><strong>SQL SERVER – Index Created on View not Used Often – Limitation of the View 12</strong></a>. I promised in that post that I would also write an article where I would demonstrate the condition where the Index will be used. I got many responses suggesting that I can do that with using NOEXPAND; I agree. I have already written about this in my original summary article.</p>
<p style="text-align:justify;">Here is a way for you to see how Index created on View can be utilized.</p>
<p style="text-align:justify;">We will do the following steps on this exercise:</p>
<ul style="text-align:justify;">
<li>Create a Table</li>
<li>Create a View</li>
<li>Create Index On View</li>
<li>Write SELECT with ORDER BY on View</li>
</ul>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">USE </span><span style="color:black;">tempdb<br />
GO<br />
</span><span style="color:blue;">IF </span><span style="color:gray;">EXISTS (</span><span style="color:blue;">SELECT </span><span style="color:gray;">* </span><span style="color:blue;">FROM </span><span style="color:black;">sys.views </span><span style="color:blue;">WHERE </span><span style="color:magenta;">OBJECT_ID </span><span style="color:blue;">= </span><span style="color:magenta;">OBJECT_ID</span><span style="color:gray;">(</span><span style="color:red;">N'[dbo].[SampleView]'</span><span style="color:gray;">))<br />
</span><span style="color:blue;">DROP VIEW </span><span style="color:black;">[dbo].[SampleView]<br />
GO<br />
</span><span style="color:blue;">IF </span><span style="color:gray;">EXISTS (</span><span style="color:blue;">SELECT </span><span style="color:gray;">* </span><span style="color:blue;">FROM </span><span style="color:black;">sys.objects </span><span style="color:blue;">WHERE </span><span style="color:magenta;">OBJECT_ID </span><span style="color:blue;">= </span><span style="color:magenta;">OBJECT_ID</span><span style="color:gray;">(</span><span style="color:red;">N'[dbo].[mySampleTable]'</span><span style="color:gray;">) AND </span><span style="color:blue;">TYPE IN </span><span style="color:gray;">(</span><span style="color:red;">N'U'</span><span style="color:gray;">))<br />
</span><span style="color:blue;">DROP TABLE </span><span style="color:black;">[dbo].[mySampleTable]<br />
GO<br />
</span><span style="color:green;">-- Create SampleTable<br />
</span><span style="color:blue;">CREATE TABLE </span><span style="color:black;">mySampleTable </span><span style="color:gray;">(</span><span style="color:black;">ID1 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID2 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">SomeData </span><span style="color:blue;">VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">100</span><span style="color:gray;">))<br />
</span><span style="color:blue;">INSERT INTO </span><span style="color:black;">mySampleTable </span><span style="color:gray;">(</span><span style="color:black;">ID1</span><span style="color:gray;">,</span><span style="color:black;">ID2</span><span style="color:gray;">,</span><span style="color:black;">SomeData</span><span style="color:gray;">)<br />
</span><span style="color:blue;">SELECT TOP </span><span style="color:black;">100000 ROW_NUMBER</span><span style="color:gray;">() </span><span style="color:blue;">OVER </span><span style="color:gray;">(</span><span style="color:blue;">ORDER BY </span><span style="color:black;">o1.name</span><span style="color:gray;">),<br />
</span><span style="color:black;">ROW_NUMBER</span><span style="color:gray;">() </span><span style="color:blue;">OVER </span><span style="color:gray;">(</span><span style="color:blue;">ORDER BY </span><span style="color:black;">o2.name</span><span style="color:gray;">),<br />
</span><span style="color:black;">o2.name<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.all_objects o1<br />
</span><span style="color:gray;">CROSS </span><span style="color:blue;">JOIN </span><span style="color:black;">sys.all_objects o2<br />
GO<br />
</span><span style="color:green;">-- Create View<br />
</span><span style="color:blue;">CREATE VIEW </span><span style="color:black;">SampleView<br />
</span><span style="color:blue;">WITH </span><span style="color:black;">SCHEMABINDING<br />
</span><span style="color:blue;">AS<br />
SELECT </span><span style="color:black;">ID1</span><span style="color:gray;">,</span><span style="color:black;">ID2</span><span style="color:gray;">,</span><span style="color:black;">SomeData<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">dbo.mySampleTable<br />
GO<br />
</span><span style="color:green;">-- Create Index on View<br />
</span><span style="color:blue;">CREATE UNIQUE CLUSTERED INDEX </span><span style="color:black;">[IX_ViewSample] </span><span style="color:blue;">ON </span><span style="color:black;">[dbo].[SampleView]<br />
</span><span style="color:gray;">(<br />
</span><span style="color:black;">ID2 </span><span style="color:blue;">ASC<br />
</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:green;">-- Select from view<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">ID1</span><span style="color:gray;">,</span><span style="color:black;">ID2</span><span style="color:gray;">,</span><span style="color:black;">SomeData<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">SampleView<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">ID2<br />
GO<br />
</span></code><br />
When we check the execution plan for this , we find it clearly that the Index created on the View is utilized. ORDER BY clause uses the Index created on the View.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/nolimitview.jpg" alt="" width="498" height="134" /></p>
<p style="text-align:justify;">I hope this makes the puzzle simpler on how the Index is used on the View. Again, I strongly recommend reading my earlier series about the limitations of the Views found here: <a href="http://blog.sqlauthority.com/2010/10/03/sql-server-the-limitations-of-the-views-eleven-and-more" target="_blank"><strong>SQL SERVER – The Limitations of the Views – Eleven and more…</strong></a>.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.sqlauthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sql-view/'>SQL View</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/11265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/11265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/11265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/11265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/11265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/11265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/11265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/11265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/11265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/11265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/11265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/11265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/11265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/11265/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11265&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2010/12/21/sql-server-index-created-on-view-not-used-often-observation-of-the-view/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/nolimitview.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Server Side Paging in SQL Server Denali Performance Comparison</title>
		<link>http://blog.sqlauthority.com/2010/12/16/sql-server-server-side-paging-in-sql-server-2011-performance-comparison/</link>
		<comments>http://blog.sqlauthority.com/2010/12/16/sql-server-server-side-paging-in-sql-server-2011-performance-comparison/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 01:30:55 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Optimization]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11186</guid>
		<description><![CDATA[Earlier, I have written about SQL SERVER – Server Side Paging in SQL Server 2011 – A Better Alternative. I got many emails asking for performance analysis of paging. Here is the quick analysis of it. The real challenge of paging is all the unnecessary IO reads from the database. Network traffic was one of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11186&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Earlier, I have written about <a href="http://blog.sqlauthority.com/2010/12/15/sql-server-server-side-paging-in-sql-server-2011-a-better-alternative/" target="_blank"><strong>SQL SERVER – Server Side Paging in SQL Server 2011 – A Better Alternative</strong></a>. I got many emails asking for performance analysis of paging. Here is the quick analysis of it.</p>
<p style="text-align:justify;">The real challenge of paging is all the unnecessary IO reads from the database. Network traffic was one of the reasons why paging has become a very expensive operation. I have seen many legacy applications where a complete resultset is brought back to the application and paging has been done. As what you have read earlier, SQL Server 2011 offers a better alternative to an age-old solution.</p>
<p style="text-align:justify;">This article has been divided into two parts:</p>
<p style="text-align:justify;"><strong>Test 1: Performance Comparison of the Two Different Pages on SQL Server 2011 Method</strong></p>
<p style="text-align:justify;">In this test, we will analyze the performance of the two different pages where one is at the beginning of the table and the other one is at its end.</p>
<p style="text-align:justify;"><strong>Test 2: Performance Comparison of the Two Different Pages Using CTE (Earlier Solution from SQL Server 2005/2008) and the New Method of SQL Server 2011</strong></p>
<p style="text-align:justify;">We will explore this in the next article. This article will tackle test 1 first.</p>
<p style="text-align:justify;"><strong>Test 1: Retrieving Page from two different locations of the table.</strong></p>
<p style="text-align:justify;">Run the following T-SQL Script and compare the performance.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SET STATISTICS </span><span style="color:black;">IO </span><span style="color:blue;">ON</span><span style="color:gray;">;<br />
</span><span style="color:blue;">USE </span><span style="color:black;">AdventureWorks2008R2<br />
GO<br />
</span><span style="color:blue;">DECLARE </span><span style="color:#434343;">@RowsPerPage </span><span style="color:blue;">INT = </span><span style="color:black;">10</span><span style="color:gray;">, </span><span style="color:#434343;">@PageNumber </span><span style="color:blue;">INT = </span><span style="color:black;">5<br />
</span><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">Sales.SalesOrderDetail<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">SalesOrderDetailID<br />
OFFSET </span><span style="color:#434343;">@PageNumber</span><span style="color:gray;">*</span><span style="color:#434343;">@RowsPerPage </span><span style="color:black;">ROWS<br />
</span><span style="color:blue;">FETCH </span><span style="color:black;">NEXT 10 ROWS </span><span style="color:blue;">ONLY<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">USE </span><span style="color:black;">AdventureWorks2008R2<br />
GO<br />
</span><span style="color:blue;">DECLARE </span><span style="color:#434343;">@RowsPerPage </span><span style="color:blue;">INT = </span><span style="color:black;">10</span><span style="color:gray;">, </span><span style="color:#434343;">@PageNumber </span><span style="color:blue;">INT = </span><span style="color:black;">12100<br />
</span><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">Sales.SalesOrderDetail<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">SalesOrderDetailID<br />
OFFSET </span><span style="color:#434343;">@PageNumber</span><span style="color:gray;">*</span><span style="color:#434343;">@RowsPerPage </span><span style="color:black;">ROWS<br />
</span><span style="color:blue;">FETCH </span><span style="color:black;">NEXT 10 ROWS </span><span style="color:blue;">ONLY<br />
</span><span style="color:black;">GO<br />
</span></code></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/paging1.jpg" alt="" width="500" height="154" /></p>
<p style="text-align:justify;">You will notice that when we are reading the page from the beginning of the table, the database pages read are much lower than when the page is read from the end of the table. This is very interesting as when the the OFFSET changes, PAGE IO is increased or decreased. In the normal case of the search engine, people usually read it from the first few pages, which means that IO will be increased as we go further in the higher parts of navigation.</p>
<p style="text-align:justify;">I am really impressed because using the new method of SQL Server 2011,  PAGE IO will be much lower when the first few pages are searched in the navigation.</p>
<p style="text-align:justify;"><strong>Test 2: Retrieving Page from two different locations of the table and comparing to earlier versions.</strong></p>
<p style="text-align:justify;">In this test, we will compare the queries of the Test 1 with the earlier solution via Common Table Expression (CTE) which we utilized in SQL Server 2005 and SQL Server 2008.</p>
<p style="text-align:justify;"><strong>Test 2 A : Page early in the table</strong><br />
<code style="font-size:12px;"><span style="color:green;">-- Test with pages early in table<br />
</span><span style="color:blue;">USE </span><span style="color:black;">AdventureWorks2008R2<br />
GO<br />
</span><span style="color:blue;">DECLARE </span><span style="color:#434343;">@RowsPerPage </span><span style="color:blue;">INT = </span><span style="color:black;">10</span><span style="color:gray;">, </span><span style="color:#434343;">@PageNumber </span><span style="color:blue;">INT = </span><span style="color:black;">5<br />
</span><span style="color:gray;">;</span><span style="color:blue;">WITH </span><span style="color:black;">CTE_SalesOrderDetail </span><span style="color:blue;">AS<br />
</span><span style="color:gray;">(<br />
</span><span style="color:blue;">SELECT </span><span style="color:gray;">*, </span><span style="color:black;">ROW_NUMBER</span><span style="color:gray;">() </span><span style="color:blue;">OVER</span><span style="color:gray;">(<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">SalesOrderDetailID</span><span style="color:gray;">) </span><span style="color:blue;">AS </span><span style="color:black;">RowNumber<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">Sales.SalesOrderDetail PC</span><span style="color:gray;">)<br />
</span><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">CTE_SalesOrderDetail<br />
</span><span style="color:blue;">WHERE </span><span style="color:black;">RowNumber </span><span style="color:gray;">&gt;= </span><span style="color:#434343;">@PageNumber</span><span style="color:gray;">*</span><span style="color:#434343;">@RowsPerPage</span><span style="color:gray;">+</span><span style="color:black;">1 </span><span style="color:gray;">AND </span><span style="color:black;">RowNumber </span><span style="color:gray;">&lt;= (</span><span style="color:#434343;">@PageNumber</span><span style="color:gray;">+</span><span style="color:black;">1</span><span style="color:gray;">)*</span><span style="color:#434343;">@RowsPerPage<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">SalesOrderDetailID<br />
GO<br />
</span><span style="color:blue;">SET STATISTICS </span><span style="color:black;">IO </span><span style="color:blue;">ON</span><span style="color:gray;">;<br />
</span><span style="color:blue;">USE </span><span style="color:black;">AdventureWorks2008R2<br />
GO<br />
</span><span style="color:blue;">DECLARE </span><span style="color:#434343;">@RowsPerPage </span><span style="color:blue;">INT = </span><span style="color:black;">10</span><span style="color:gray;">, </span><span style="color:#434343;">@PageNumber </span><span style="color:blue;">INT = </span><span style="color:black;">5<br />
</span><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">Sales.SalesOrderDetail<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">SalesOrderDetailID<br />
OFFSET </span><span style="color:#434343;">@PageNumber</span><span style="color:gray;">*</span><span style="color:#434343;">@RowsPerPage </span><span style="color:black;">ROWS<br />
</span><span style="color:blue;">FETCH </span><span style="color:black;">NEXT 10 ROWS </span><span style="color:blue;">ONLY<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/paging2.jpg" alt="" width="500" height="154" /></p>
<p style="text-align:justify;"><strong>Test 2 B : Page later in the table</strong><br />
<code style="font-size:12px;"><span style="color:green;">-- Test with pages later in table<br />
</span><span style="color:blue;">USE </span><span style="color:black;">AdventureWorks2008R2<br />
GO<br />
</span><span style="color:blue;">DECLARE </span><span style="color:#434343;">@RowsPerPage </span><span style="color:blue;">INT = </span><span style="color:black;">10</span><span style="color:gray;">, </span><span style="color:#434343;">@PageNumber </span><span style="color:blue;">INT = </span><span style="color:black;">12100<br />
</span><span style="color:gray;">;</span><span style="color:blue;">WITH </span><span style="color:black;">CTE_SalesOrderDetail </span><span style="color:blue;">AS<br />
</span><span style="color:gray;">(<br />
</span><span style="color:blue;">SELECT </span><span style="color:gray;">*, </span><span style="color:black;">ROW_NUMBER</span><span style="color:gray;">() </span><span style="color:blue;">OVER</span><span style="color:gray;">(<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">SalesOrderDetailID</span><span style="color:gray;">) </span><span style="color:blue;">AS </span><span style="color:black;">RowNumber<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">Sales.SalesOrderDetail PC</span><span style="color:gray;">)<br />
</span><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">CTE_SalesOrderDetail<br />
</span><span style="color:blue;">WHERE </span><span style="color:black;">RowNumber </span><span style="color:gray;">&gt;= </span><span style="color:#434343;">@PageNumber</span><span style="color:gray;">*</span><span style="color:#434343;">@RowsPerPage</span><span style="color:gray;">+</span><span style="color:black;">1 </span><span style="color:gray;">AND </span><span style="color:black;">RowNumber </span><span style="color:gray;">&lt;= (</span><span style="color:#434343;">@PageNumber</span><span style="color:gray;">+</span><span style="color:black;">1</span><span style="color:gray;">)*</span><span style="color:#434343;">@RowsPerPage<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">SalesOrderDetailID<br />
GO<br />
</span><span style="color:blue;">SET STATISTICS </span><span style="color:black;">IO </span><span style="color:blue;">ON</span><span style="color:gray;">;<br />
</span><span style="color:blue;">USE </span><span style="color:black;">AdventureWorks2008R2<br />
GO<br />
</span><span style="color:blue;">DECLARE </span><span style="color:#434343;">@RowsPerPage </span><span style="color:blue;">INT = </span><span style="color:black;">10</span><span style="color:gray;">, </span><span style="color:#434343;">@PageNumber </span><span style="color:blue;">INT = </span><span style="color:black;">12100<br />
</span><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">Sales.SalesOrderDetail<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">SalesOrderDetailID<br />
OFFSET </span><span style="color:#434343;">@PageNumber</span><span style="color:gray;">*</span><span style="color:#434343;">@RowsPerPage </span><span style="color:black;">ROWS<br />
</span><span style="color:blue;">FETCH </span><span style="color:black;">NEXT 10 ROWS </span><span style="color:blue;">ONLY<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/paging3.jpg" alt="" width="500" height="155" /></p>
<p style="text-align:justify;">From the resultset, it is very clear that in the earlier case, the pages read in the solution are always much higher than the new technique introduced in SQL Server 2011 even if we don’t retrieve all the data to the screen.</p>
<p style="text-align:justify;">If you carefully look at both the comparisons, the PAGE IO is much lesser in the case of the new technique introduced in SQL Server 2011 when we read the page from the beginning of the table and when we read it from the end.</p>
<p style="text-align:justify;">I consider this as a big improvement as paging is one of the most used features for the most part of the application. The solution introduced in SQL Server 2011 is very elegant because it also improves the performance of the query and, at large, the database.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-optimization/'>SQL Optimization</a>, <a href='http://blog.sqlauthority.com/category/sql-performance/'>SQL Performance</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/11186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/11186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/11186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/11186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/11186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/11186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/11186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/11186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/11186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/11186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/11186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/11186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/11186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/11186/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=11186&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2010/12/16/sql-server-server-side-paging-in-sql-server-2011-performance-comparison/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/paging1.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/paging2.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/paging3.jpg" medium="image" />
	</item>
	</channel>
</rss>
