<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'performance' and 'DBA'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=performance,DBA&amp;orTags=0</link><description>Search results matching tags 'performance' and 'DBA'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Read the New TPC Database Benchmarking Series</title><link>http://sqlblog.com/blogs/kevin_kline/archive/2013/04/22/read-the-new-tpc-database-benchmarking-series.aspx</link><pubDate>Mon, 22 Apr 2013 18:17:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:48816</guid><dc:creator>KKline</dc:creator><description>&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&lt;span style="line-height:19px;"&gt;Let's talk about database application benchmarking.&lt;/span&gt;&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&lt;span style="line-height:19px;"&gt;This is a skill set which, in my opinion, is one of the major differentiators between a journeyman-level DBA and a true master of the trade. In this article published in my monthly column at&amp;nbsp;&lt;a target="_blank" href="http://www.dbta.com/"&gt;&lt;em&gt;Database Trends &amp;amp; Applications magazine&lt;/em&gt;&lt;/a&gt;, I'll give you a brief introduction to TPC benchmarks and, in future articles, I'll be telling you how to extract specific pieces of valuable information from the published benchmark results.&lt;/span&gt;&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&lt;span style="line-height:19px;"&gt;But let's get started with an overview …&amp;nbsp;&lt;/span&gt;&lt;a target="_blank" style="line-height:19px;" href="http://www.dbta.com/Articles/Columns/SQL-Server-Drill-Down/Introduction-to-TPC-Database-Benchmarks-86891.aspx"&gt;read more.&lt;/a&gt;&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&lt;span style="font-family:Arial, Helvetica, sans-serif;font-size:small;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;Many thanks,&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&lt;span style="font-family:Arial, Helvetica, sans-serif;font-size:small;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;-Kevin&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&lt;span style="font-family:Arial, Helvetica, sans-serif;font-size:small;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&lt;a href="http://twitter.com/kekline"&gt;- Follow me on Twitter!&lt;/a&gt;&lt;br&gt;&lt;a href="https://plus.google.com/u/1/113032055249023350257?rel=author"&gt;- Google Author&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Learn More About SQL Server IO and Query Tuning in These Webcasts</title><link>http://sqlblog.com/blogs/kevin_kline/archive/2012/12/14/learn-more-about-sql-server-io-and-query-tuning-in-these-webcasts.aspx</link><pubDate>Fri, 14 Dec 2012 18:50:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:46662</guid><dc:creator>KKline</dc:creator><description>
&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;I'm doing two new webcasts next week on Wednesday, December 19th, one in the morning and the other after lunch.&lt;/p&gt;
&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2 style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;SSDs are a Game Changer for SQL Server Storage&lt;/h2&gt;
&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;No, session is not exclusively about SSDs. &amp;nbsp;But this is my first session on IO and storage tuning that emphasizes SSDs over hard disks. &amp;nbsp;As Bob Dylan said "Times, they are a'changin'". &amp;nbsp;This session on Wednesday, December 19th at 11:30 AM EST, sponsored by Astute Networks, takes you through all of the basics of storage and IO tuning, regardless of the underlying storage technology. &amp;nbsp;I'll show you how SQL Server handles storage structures, how to identify IO activity on Windows and SQL Server, and best practices for minimizing IO bottlenecks. &amp;nbsp;Register now for:&lt;a title="Kevin Kline's Storage IO Best Practices for SQL Server" href="http://bit.ly/UcXYI3"&gt;&amp;nbsp;Storage IO Best Practices for SQL Server and a New Approach to Solving Application Performance Issues&lt;/a&gt;.&lt;/p&gt;
&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2 style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;Write Better SQL Queries&lt;/h2&gt;
&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;The next webcast on Wednesday, December 19th at 2 PM EST, is with me, Aaron Bertrand &amp;nbsp;(&lt;a href="https://twitter.com/#!/AaronBertrand"&gt;Twitter&amp;nbsp;&lt;/a&gt;|&amp;nbsp;&lt;a href="http://sqlblog.com/blogs/aaron_bertrand/rss.aspx"&gt;Blog&lt;/a&gt;)&amp;nbsp;and SQLCruise Impresario &amp;amp; Microsoft MVP Tim Ford &amp;nbsp;(&lt;a href="https://twitter.com/#!/sqlagentman"&gt;Twitter&lt;/a&gt;&amp;nbsp;|&amp;nbsp;&lt;a href="http://www.ford-it.com/sqlagentman/"&gt;Blog&lt;/a&gt;)&amp;nbsp;as we take you through the query tuning process, discussing important DMVs to use during query tuning, as well as demonstrating several essential query tuning techniques that every SQL developer should know. &amp;nbsp;Not only are we presenting an hour of top quality technical content, we’ll also be giving away some cool prizes, including the grand prize of a paid registration for the upcoming&amp;nbsp;&lt;a target="_blank" href="http://elink.sqlsentry.net/c/1/?aId=67857085&amp;amp;requestId=b34612-273953cd-e600-4a18-979a-a9f2ded860bd&amp;amp;rId=lead-a407ed107f65de119513001e0b614992-c233a49718324979b0d8efc0614ff5d0&amp;amp;ea=aunefuonetre=pbz=vagrepreir&amp;amp;dUrl=http%3A%2F%2Fsqlcruise.com%2F2013-cruises%3F_cldee%3DbmhhcnNoYmFyZ2VyQGludGVyY2VydmUuY29t&amp;amp;uId=0"&gt;SQLCruise Miami&lt;/a&gt;, a $1,395 value! &amp;nbsp;Register now for:&amp;nbsp;&lt;a title="SQL Server Query Tuning Best Practices, Hosted by Kevin Kline, Aaron Bertrand, and Tim Ford" href="http://bit.ly/UskPPm"&gt;SQL Server Query Tuning Best Practices, Hosted by Kevin Kline and Aaron Bertrand with special guest Tim Ford&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;I hope to see you at both of these sessions next week! &amp;nbsp;Best regards,&lt;/p&gt;
&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;-Kev&lt;/p&gt;
&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;a title="Kevin E. Kline on Twitter" href="http://twitter.com/kekline"&gt;-Follow me on Twitter!&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Quick Tip - Speed a Slow Restore from the Transaction Log</title><link>http://sqlblog.com/blogs/kevin_kline/archive/2012/11/14/quick-tip-speed-a-slow-restore-from-the-transaction-log.aspx</link><pubDate>Wed, 14 Nov 2012 15:59:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:46209</guid><dc:creator>KKline</dc:creator><description>&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;Here's a quick tip for you:&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;During some restore operations on Microsoft SQL Server, the transaction log redo step might be taking an unusually long time. &amp;nbsp;Depending somewhat on the version and edition of SQL Server you've installed, you may be able to increase performance by tinkering with the readahead performance for the redo operations. &amp;nbsp;To do this, you should use the MAXTRANSFERSIZE parameter of the RESTORE statement. &amp;nbsp;For example, if you set MAXTRANSFERSIZE=1048576, it'll use 1MB buffers.&lt;/p&gt;&lt;div style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;div align="left"&gt;If you change the MAXTRANSFERSIZE, keep an eye on the PerfMon objects for Buffer Manager and Readahead IO. &amp;nbsp;You may also wish to keep an eye on LOGBUFFER wait stats.&lt;/div&gt;&lt;div align="left"&gt;&lt;br&gt;&lt;/div&gt;&lt;div align="left"&gt;I'd love to hear your feedback. &amp;nbsp;Have you tried this technique? &amp;nbsp;Did it work as advertised? &amp;nbsp;Did it require some changes to work on a specific version or edition?&lt;/div&gt;&lt;/div&gt;&lt;div align="left" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div align="left" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;Many thanks,&lt;/div&gt;&lt;div align="left" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div align="left" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;-Kev&lt;/div&gt;&lt;div align="left" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div align="left" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;-&lt;a title="Kevin E. Kline's Twitter Feed" href="http://twitter.com/kekline"&gt;Follow me on Twitter!&lt;/a&gt;&lt;/div&gt;</description></item><item><title>The Zombie PerfMon Counter That Never Dies! Quick Tip</title><link>http://sqlblog.com/blogs/kevin_kline/archive/2012/10/08/the-zombie-perfmon-counter-that-never-dies-quick-tip.aspx</link><pubDate>Mon, 08 Oct 2012 11:55:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:45480</guid><dc:creator>KKline</dc:creator><description>&lt;h2 style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;/h2&gt;&lt;h2&gt;The PerfMon Counters That Just Won't Die&lt;/h2&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;img class="alignright size-medium wp-image-2093" title="zombie-baby1" width="300" height="296" style="border:1px solid black;cursor:default;float:right;font-size:13px;font-weight:normal;margin:2px;" src="http://kevinekline.com/wp-content/uploads/2012/10/zombie-baby1-300x296.jpg"&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;One of the things that's simultaneously great and horrible about the Internet is that once something gets posted out in the ether, it basically never goes away. &amp;nbsp;(Some day, politicians will realize this. &amp;nbsp;We can easily fact check their consistency). &amp;nbsp;Because of longevity of content posted to the Internet, a lot of performance tuning topics become "zombies". &amp;nbsp;We shoot 'em in dead, but they keep coming back!&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;In other words, those old recommendations&amp;nbsp;&lt;em&gt;were&amp;nbsp;&lt;/em&gt;a suggested best practices for long ago, for a specific version of SQL Server, but are now inappropriately for the newer version. &amp;nbsp;It's not uncommon for me, when speaking at a conference, to encounter someone who's still clinging to settings and techniques which haven't been good practice since the days of SQL Server 2000. &amp;nbsp;Here's an example of&amp;nbsp;&lt;a href="http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlops6.mspx"&gt;Microsoft SQL Server 2000 Best Practices that are very version-specific&lt;/a&gt;.&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;So here's an example. &amp;nbsp;The %Disk Time counter and the Disk Queue Length were heavily recommended as a key performance indicator for IO performance. &amp;nbsp;SQL Server throws a lot of IO at the disks using scatter/gather to maximize the utilization of the disk-based IO subsystem. &amp;nbsp;This approach leads to short bursts of long queue depths during checkpoints and readaheads for an instance of SQL Server. &amp;nbsp;Sometimes the server workload is such that your disk can't keep up with the IO shoved at it and when that happens, you'll see long queue lengths too.&amp;nbsp; The short burst scenario isn't a problem. &amp;nbsp;The lengthening queue length scenario usually is a problem. &amp;nbsp;&amp;nbsp;So is that a good practice?&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;strong&gt;In a word, not-so-much.&lt;/strong&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;Those counters can still be of some use on an instance of SQL Server which only has one hard disk drive. &amp;nbsp;But that's&amp;nbsp;&lt;em&gt;exceedingly&lt;/em&gt;&amp;nbsp;rare these days. &amp;nbsp;Why?&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;The PerfMon counter %Disk time is a bogus performance metric for several reasons. &amp;nbsp;It does not take into account&amp;nbsp;asynchronous&amp;nbsp;I/O requests. &amp;nbsp;It can't tell what the real performance profile is for an underlying&amp;nbsp;&amp;nbsp;RAID set may be, since they contain multiple disk drives. &amp;nbsp;The PerfMon counter Disk Queue Length is also mostly useless, except on SQL Server's with a single physical disk, because the hard disk controller cache obfuscates how many IO operations are actually pending on the queue or not. &amp;nbsp;In fact, some hard disks even have tiny write caches as well, which further muddies the water was to whether the IO is truly queued, in a cache somewhere between the OS and the disk, or has finally made it all the way to the&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Cmos"&gt;CMOS&lt;/a&gt;&amp;nbsp;on the disk.&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;h2&gt;Better IO PerfMon Counters&lt;/h2&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;Instead of using those PerfMon counters, use the Ave Disk Reads /sec, Avg Disk Write /sec, and Avg Disk &amp;nbsp;Transfers/sec&amp;nbsp;to track the performance of disk subsystems. &amp;nbsp;These counters track the average number of read IOs, write IOs, and combined read and write IOs to occured in the last second. &amp;nbsp;Occassionally, I like to track the same metrics by volume of data rather than the rate of IO operations. &amp;nbsp;So, to get that data, you may wish to give these volume-specific PerfMon counters a try:&amp;nbsp;Avg Disk &amp;nbsp;Transfer Bytes/sec, Ave Disk Read Bytes /sec, and Avg Disk Write Bytes/sec&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;h2&gt;For SQL Server IO Performance, Use Dynamic Management Views (DMV)&lt;/h2&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;And unless you've been living in a cave, you should make sure to use SQL Server's Dynamic Management Views (DMVs) to check on IO performance for recent versions of SQL Server. &amp;nbsp;Some of my favorite DMV's for IO include:&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;ul&gt;&lt;li&gt;Sys.dm_os_wait_stats&lt;/li&gt;&lt;li&gt;Sys.dm_os_waiting_tasks&lt;/li&gt;&lt;li&gt;Sys.dm_os_performance_counters&lt;/li&gt;&lt;li&gt;Sys.dm_io_virtual_file_stats&lt;/li&gt;&lt;li&gt;Sys.dm_io_pending_io_requests&lt;/li&gt;&lt;li&gt;Sys.dm_db_index_operational_stats&lt;/li&gt;&lt;li&gt;Sys.dm_db_index_usage_stats&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;Many of these DMVs are fully document in this Books Online article here at&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/library/ms187974.aspx"&gt;Microsoft SQL Server 2012&amp;nbsp;Index Related Dynamic Management Views and Functions&lt;/a&gt;.&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;So how are you tracking IO performance metrics? &amp;nbsp;Which ones are you using?&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;I look forward to hearing back from you!&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;Enjoy,&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;-Kev&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;p&gt;-&lt;a href="http://twitter.com/kekline"&gt;Follow me on Twitter!&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;</description></item><item><title>Two New Slide Decks. Plus, the Week in Colorado.</title><link>http://sqlblog.com/blogs/kevin_kline/archive/2012/08/20/two-new-slide-decks-plus-the-week-in-colorado.aspx</link><pubDate>Mon, 20 Aug 2012 15:03:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:44792</guid><dc:creator>KKline</dc:creator><description>&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;a href="http://kevinekline.com/wp-content/uploads/2012/08/IMAG2488.jpg"&gt;&lt;img class="alignright  wp-image-2027" title="Kevin and the SpringSQL Leadership" alt="" width="240" height="143" style="border:0px;cursor:default;float:right;" src="http://kevinekline.com/wp-content/uploads/2012/08/IMAG2488-300x179.jpg"&gt;&lt;/a&gt;I had the honor of traveling the great state of Colorado last week, speaking at the PASS chapters in&amp;nbsp;&lt;a title="Boulder, CO SQL Server Users Group" href="https://groups.google.com/forum/?fromgroups#!forum/boulder-sql-server-users-group"&gt;Boulder&lt;/a&gt;,&amp;nbsp;&lt;a title="Colorado Springs, CO SQL Server Users Group" href="http://www.springssql.sqlpass.org/"&gt;Colorado Springs&lt;/a&gt;, and&amp;nbsp;&lt;a title="Denver, CO SQL Server Users Group" href="http://denver.sqlpass.org/"&gt;Denver&lt;/a&gt;. &amp;nbsp;At all three events, we had a stellar attendance and, at least&amp;nbsp;&lt;a title="A Huge Crowd for the Denver SQL Server User Group!" href="http://img.ly/m6ZG"&gt;in Denver, broke all the records&lt;/a&gt;&amp;nbsp;in recent memory both in terms of overall attendance and in first-timers. &amp;nbsp;Denver, in fact, was standing room only and had nearly 30 first time attendees. &amp;nbsp;Great news! &amp;nbsp;I also want to give a special shout-out of thanks and appreciation to&amp;nbsp;Chris Shaw (&lt;a href="https://twitter.com/#!/SQLShaw"&gt;Twitter&lt;/a&gt;&amp;nbsp;|&amp;nbsp;&lt;a href="http://chrisshaw.wordpress.com/feed/"&gt;Blog&lt;/a&gt;) whose hard work and tenacity ensured that all of Colorado got to see me speak. From left to right, Gabriel Villa (&lt;a title="Gabriel Villa on Twitter" href="http://twitter.com/extofer"&gt;Twitter&lt;/a&gt;), me, Chris Shaw, and Rebecca Mitchell (&lt;a title="Rebecca Mitchell on Twitter" href="http://twitter.com/sqlprincess"&gt;Twitter&lt;/a&gt;). &amp;nbsp;If it weren't for Chris, I wouldn't have been there. &amp;nbsp;Thanks for putting in the time, amigo!&lt;/p&gt;&lt;h2 style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;New Slide Decks!&lt;/h2&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;During the 3-day jaunt, I presented two of my more popular sessions. &amp;nbsp;These are updated slide decks, in case you want to download them here:&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;a title="End-to-End Troubleshooting for Microsoft SQL Server" href="http://kevinekline.com/wp-content/uploads/2012/08/UG-End-to-End-Troubleshooting.zip"&gt;UG - End-to-End Troubleshooting&lt;/a&gt;&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;and&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;a title="Top 10 DBA Blunders on Microsoft SQL Server" href="http://kevinekline.com/wp-content/uploads/2012/08/UG-Top-10-SQL-Server-Administration-Mistakes.zip"&gt;UG - Top 10 SQL Server Administration Mistakes&lt;/a&gt;&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;a href="http://kevinekline.com/wp-content/uploads/2012/08/IMAG2492.jpg"&gt;&lt;img class="alignright  wp-image-2033" title="Kevin &amp;amp; Steve Murchie" alt="" width="125" height="210" style="border:0px;cursor:default;float:right;" src="http://kevinekline.com/wp-content/uploads/2012/08/IMAG2492-179x300.jpg"&gt;&lt;/a&gt;Be sure to check in the Slides area of the website, if you want to see the links for SpeakerRate, and in the case of several of my presentations, white papers, video recordings, etc. It's the People that Matter&lt;/p&gt;&lt;h2 style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;A Blast from the SQLPASS Past!&lt;/h2&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;I've always tried to maintain the relationships I built with the founding members of the&amp;nbsp;&lt;a title="The Professional Association for SQL Server" href="http://www.sqlpass.org/"&gt;PASS&lt;/a&gt;&amp;nbsp;board of directors. &amp;nbsp;After their time on the PASS board, almost all of them have moved on from SQL Server to other adventures. &amp;nbsp;Pam Smith, the first president of the organization, is now a professor. &amp;nbsp;Guy Brown, the second president, is now the director of IT at his same employer, rather than just SQL Server as when he was on the PASS board. &amp;nbsp;A few, such as Kurt Windisch, a former VP of PASS, and my good friend&amp;nbsp;Joe Webb (&lt;a href="https://twitter.com/#!/joewebb"&gt;Twitter&lt;/a&gt;&amp;nbsp;|&amp;nbsp;&lt;a target="_blank" href="http://www.webbtechsolutions.com/blog"&gt;Blog&lt;/a&gt;), are still active in the SQL Server space. &amp;nbsp;One relationship that I've enjoyed over the years is with PASS' original Microsoft liaison and now a Denver-area software entrepreneur Steve Murchie (at right) running his own healthcare IT outfit. &amp;nbsp;Steve has been a source of inspiration to me and also of great advice for all things startup-related. &amp;nbsp;It was great to connect with Steve and catch up on his latest doings.&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;I also got to enjoy an evening out with the local attendees after the Denver user group meeting. &amp;nbsp;It was great to hang out with folks there. &amp;nbsp;I got to meet&amp;nbsp;&lt;a title="Kevin Cox on deck for 24HOP of SQLPASS.ORG" href="http://www.sqlpass.org/24hours/fall2012/SessionsbySchedule/SpeakerDetails.aspx?spid=480"&gt;Kevin Cox&lt;/a&gt;&amp;nbsp;(&lt;a title="Kevin Cox's Twitter Feed" href="http://twitter.com/KevinCoxSQL"&gt;twitter&lt;/a&gt;), a member of Microsoft's incredibly talented&amp;nbsp;&lt;a title="The Microsoft SQL Server Customer Advisory Team" href="http://www.sqlcat.com/"&gt;SQLCAT&lt;/a&gt;&amp;nbsp;group, and for whom I was a technical editor on a SQL Server v6.5 book back in the Neanderthal era. &amp;nbsp;That shows just how old both Kevin and I actually are. &amp;nbsp;Other cool folks that I got to meet included&amp;nbsp;&lt;a href="http://twitter.com/stevewake"&gt;Steve Wake&lt;/a&gt;,&amp;nbsp;&lt;a href="http://twitter.com/mike_fal"&gt;Mike Fal&lt;/a&gt;,&amp;nbsp;&lt;a href="http://twitter.com/marcbeacom"&gt;Marc Beacom&lt;/a&gt;,&amp;nbsp;&lt;a href="http://twitter.com/jasonkassay"&gt;Jason Kassay&lt;/a&gt;,&amp;nbsp;&lt;a href="http://twitter.com/jasonhorner"&gt;Jason Horner&lt;/a&gt;&amp;nbsp;and my ol' buddy,&amp;nbsp;&lt;a href="http://twitter.com/greeleygeek"&gt;Kelly the Greeley Geek&lt;/a&gt;.&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;On top of that, long-time SQL Server MVP and all-around awesome guy&amp;nbsp;Steve Jones (&lt;a href="https://twitter.com/#!/way0utwest"&gt;Twitter&lt;/a&gt;&amp;nbsp;|&amp;nbsp;&lt;a href="http://feeds.feedburner.com/sqlmusings"&gt;Blog&lt;/a&gt;) visited. &amp;nbsp;I kept him out way too late that night which, to be honest, isn't usually my style. &amp;nbsp;But the good conversation propelled us on past midnight.&lt;/p&gt;&lt;h2 style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;The Good Folks at SQL Server Professional and Windows IT Professional Magazines&lt;/h2&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;a href="http://kevinekline.com/wp-content/uploads/2012/08/IMAG2486.jpg"&gt;&lt;img class="alignright  wp-image-2036" title="Kevin and the Ladies of SQLMag" alt="" width="240" height="143" style="border:0px;cursor:default;float:right;" src="http://kevinekline.com/wp-content/uploads/2012/08/IMAG2486-300x179.jpg"&gt;&lt;/a&gt;I've written for SQL Server Professional (formerly the artist known as "SQLMag") in some form or another starting from my first cover article for them way back in the mid 1990's. &amp;nbsp;My&amp;nbsp;&lt;a title="Kevin Kline's Tool Time column at SQL Server Professional Magazine" href="http://www.sqlmag.com/blogcontent/seriespath/tool-time-blog-16"&gt;Tool Time column&lt;/a&gt;&amp;nbsp;has been going strong there since, oh, around 2006 iirc. &amp;nbsp;For most of the time I've known the folks at SQLMag, they were located in Loveland, CO but they were able to move to some incredibly nice digs just up the road in Fort Collins. &amp;nbsp;In all the many years, I've written for them, I'd never been to their offices - until now. &amp;nbsp;It was great to visit and break bread with Megan (to my right), Blair (across), and Jaylee (across and to my right)!&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;I've always supported SQLMag and encourage you to subscribe. &amp;nbsp;On top of the goodness already in the digital magazine, there are some neat developments coming down the pipeline with SQLMag which I think we'll all enjoy. &amp;nbsp;Be sure to subscribe today! &amp;nbsp;(You can click the badge on the left or simply go to&amp;nbsp;&lt;a title="SQL Server Professional Magazine" href="http://www.sqlmag.com/"&gt;http://www.sqlmag.com&lt;/a&gt;).&lt;/p&gt;&lt;h2 style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&amp;nbsp;What's Next?&lt;/h2&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;My current travel schedule is pinned up on&amp;nbsp;&lt;a title="Kevin Kline's appearance schedule" href="http://kevinekline.com/2012/07/31/come-see-me-ill-probably-be-just-down-the-street-soon/"&gt;this blog post HERE&lt;/a&gt;. &amp;nbsp;However, I also know of a couple on-line appearances and probably a trip between the long gap between now and my next in-person appearance at the&amp;nbsp;&lt;a title="Orlando SQL Saturday 151" href="http://www.sqlsaturday.com/151/eventhome.aspx"&gt;Orlando SQL Saturday&lt;/a&gt;&amp;nbsp;at the end of&amp;nbsp;September, where I'll also be teaching a pre-conference seminar (&lt;a title="SQL Server Configuration and Tuning Seminar" href="http://www.eventbrite.com/event/3895236758?ref=ebtn"&gt;register HERE for the seminar&lt;/a&gt;).&lt;/p&gt;&lt;h3 style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;SSWUG&lt;/h3&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;The first on-line event to note is my a presentation by&amp;nbsp;&lt;a title="SQL Server Worldwide User Group" href="http://www.sswug.org/"&gt;SSWUG&lt;/a&gt;&amp;nbsp;of my&amp;nbsp;&lt;a title="Kevin Kline and SSWUG bring you &amp;quot;Leadership Skills for IT Professionals&amp;quot;" href="http://www.vconferenceonline.com/event/home.aspx?id=769"&gt;Leadership Skills for IT Professionals video series&lt;/a&gt;, starting on August 24th. &amp;nbsp;Sign up using the hyperlink (note that a video plays immediately upon loading the webpage, in case you want to be ready to pause or stop it). &amp;nbsp;You can also buy a DVD set of the 14 hours of leadership training content.&lt;/p&gt;&lt;h3 style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;24HOP - The 24 Hours of PASS Event&lt;/h3&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;I'll also be speaking on the topic of influence in the next&amp;nbsp;&lt;a title="The 2012 24 Hours of PASS session schedule" href="http://www.sqlpass.org/24hours/fall2012/SessionsbySchedule.aspx"&gt;24 Hours of PASS coming up on September 20th and 21st&lt;/a&gt;. &amp;nbsp;Registration for the twenty-four hours of around the clock presentations is completely free and well worth your time. &amp;nbsp;Check the schedule for the event and register! &amp;nbsp;Even if you can only watch one or two sessions (or even zero sessions), be sure to register so that you'll automatically be notified when the sessions become available as streaming media.&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;Enjoy!&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;-Kev&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;-Follow me on&amp;nbsp;&lt;a title="Kevin Kline on Twitter" href="http://twitter.com/kekline"&gt;Twitter&lt;/a&gt;,&amp;nbsp;&lt;a title="Kevin Kline on LinkedIn" href="http://linkedin.com/kekline"&gt;LinkedIn&lt;/a&gt;, and&amp;nbsp;&lt;a title="Kevin Kline on Facebook" href="http://facebook.com/kekline"&gt;Facebook&lt;/a&gt;&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>New White Paper: SQL Server Extended Events and Notifications</title><link>http://sqlblog.com/blogs/kevin_kline/archive/2012/04/25/new-white-paper-sql-server-extended-events-and-notifications.aspx</link><pubDate>Wed, 25 Apr 2012 13:13:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:42932</guid><dc:creator>KKline</dc:creator><description>&lt;p&gt;SQL Server comes with a wide array of tools for monitoring your environment. There are logs and traces that provide information when errors occur, but these are often used passively to react to events that have already occurred. &amp;nbsp;There's PerfMon, and Profiler, and loads of Dynamic Management Views to check. &amp;nbsp;But where to look?&lt;/p&gt;&lt;p&gt;As database administrators (DBA), we need to monitor our environments proactively and create solutions as issues arise. In this white paper, we will look at a couple technologies – event notifications and extended events – that can help you achieve these goals. With these two features, we’ll look at the error log and deadlocks, and demonstrate how you can get relevant information delivered as it occurs. We’ll also look at ways that run-time errors can be captured and used to help reduce the amount of time required to investigate issues.&lt;/p&gt;&lt;p&gt;This white paper, written by SQL Server MVP Jason Strate (&lt;a title="Jason Strate's SQL Server Blog" href="http://www.jasonstrate.com/"&gt;blog&lt;/a&gt;&amp;nbsp;|&amp;nbsp;&lt;a title="Jason Strate's Twitter Feed" href="http://twitter.com/stratesql"&gt;twitter&lt;/a&gt;), is a free download &lt;em&gt;but requires a registration&lt;/em&gt;.&amp;nbsp; &lt;a title="Microsoft SQL Server Extended Events White Paper" href="http://www.quest.com/whitepaper/how-to-use-sql-servers-extended-events-and-notifications816315.aspx"&gt;Download the Extended Events white paper here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;And, as always, I enjoy your feedback. &amp;nbsp;Thanks!&lt;/p&gt;&lt;p&gt;-Kev&lt;/p&gt;&lt;p&gt;&amp;nbsp;Follow me on&amp;nbsp;&lt;a title="Kevin Kline's Twitter Feed" href="http://twitter.com/kekline"&gt;Twitter&lt;/a&gt;!&lt;/p&gt;</description></item><item><title>Accelerate OLTP with HP and Microsoft's New High Performance Reference Architecture</title><link>http://sqlblog.com/blogs/kevin_kline/archive/2012/03/06/accelerate-oltp-with-hp-and-microsoft-s-new-high-performance-reference-architecture.aspx</link><pubDate>Tue, 06 Mar 2012 15:25:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:42126</guid><dc:creator>KKline</dc:creator><description>&lt;p&gt;If you haven't started to read Shashank Pawar (&lt;a title="Shashank Pawar's Blog" href="http://blogs.technet.com/b/sqlman/"&gt;blog&lt;/a&gt;), you're missing out.  Shashank is part of Microsoft Australia and has been writing some very good content lately.  Here's an example from the Reference Architecture for High Performance SQL Server:&lt;/p&gt;&lt;p style="padding-left:30px;"&gt;&lt;span&gt;HP and Microsoft engineering teams have worked together to create a reference architecture to Accelerate Online Transaction Processing (OLTP) database workloads with a fully-flash based HP/Microsoft architecture and achieve significant performance increases, simplified database manageability, and industry leading TCO.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The details come in a torrent after that leading paragraph with lots of pretty pictures and charts to help explain.  This is great stuff, especially for competitive platforms such as Oracle Exadata. &lt;/p&gt;&lt;p&gt;Read more about the new &lt;a title="High Performance SQL Server 2012" href="http://blogs.technet.com/b/sqlman/archive/2012/02/16/reference-architecture-for-high-performance-sql-server.aspx"&gt;HP High Performance Reference Architecture for SQL Server 2012&lt;/a&gt; here.&lt;/p&gt;&lt;p&gt;And just out of curiousity, are any of you using high performance architectures such as Oracle Exadata, IBM Netezza, or Teradata?  I'd love to hear your feedback, questions, and comments.&lt;/p&gt;&lt;p&gt;Enjoy,&lt;/p&gt;&lt;p&gt;-Kev &lt;/p&gt;&lt;p&gt;-&lt;a title="Kevin Kline's Twitter Feed" href="http://twitter.com/kekline"&gt;Follow me on Twitter&lt;/a&gt;&lt;/p&gt;&lt;p&gt;-&lt;a title="Kevin Kline's Blog" href="http://KevinEKline.com"&gt;More on my KevinEKline.com&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Everybody Needs a Test Harness</title><link>http://sqlblog.com/blogs/kevin_kline/archive/2011/10/31/everybody-needs-a-test-harness.aspx</link><pubDate>Mon, 31 Oct 2011 14:17:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:39489</guid><dc:creator>KKline</dc:creator><description>&lt;p&gt;When you're developing new Transact-SQL code or modifying some existing code, do you just launch directly into programming?&lt;/p&gt;&lt;p&gt;I know that I did just that, for years.  It wasn't until I was trying to performance tune some existing code that I realized I hadn't actually taken caching of data and execution plans into account.  So all those modified stored procedures that I was so proud of might not actually be faster than the first generation of procedures because I hadn't checked to ensure that I was testing cached programs against uncached programs (and, by extension, the data used by those programs).  That's easy enough to fix with a &lt;em&gt;test harness.&lt;/em&gt;  Test harness were originally an actual, physical harness used by engineers to clamp down parts of an electrical or mechanical device they were prototyping.  Ours is no different.  It locks down all of the assumptions about our code (like my early, false assumption that I didn't need to clear the caches) and adds a metric or two for good measure - literally - so we can better measure what's happening in that code.&lt;/p&gt;&lt;p&gt;Here's what my test harness looks like: &lt;/p&gt;&lt;pre style="padding-left:30px;"&gt;/* Transact-SQL test harness by Kevin Kline, http://KevinEKline.com, Twitter at kekline */ &lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;/* Flush dirty pages from the buffer to the database files. */&lt;/pre&gt; &lt;pre style="padding-left:30px;"&gt;CHECKPOINT;&lt;/pre&gt; &lt;pre style="padding-left:30px;"&gt;/* Flush the data cache and procedure cache, respectively. For DEV environments only! */&lt;/pre&gt; &lt;pre style="padding-left:30px;"&gt;DBCC DROPCLEANBUFFERS; &lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;DBCC FREEPROCCACHE;&lt;/pre&gt; &lt;pre style="padding-left:30px;"&gt;/* Enable statistics tracking for IO and timings. Remember, SET commands remain enabled during a session until disabled. */&lt;/pre&gt; &lt;pre style="padding-left:30px;"&gt;SET STATISTICS IO ON; &lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;SET STATISTICS TIME ON;&lt;/pre&gt; &lt;pre style="padding-left:30px;"&gt;-- Whatever SQL code you'd like to process goes below.&lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;SELECT SalesOrderID&lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;FROM Sales.SalesOrderHeader H&lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;WHERE CustomerID = 344&lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;GO&lt;/pre&gt; &lt;pre style="padding-left:30px;"&gt;SET STATISTICS IO OFF; &lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;SET STATISTICS TIME OFF;&lt;/pre&gt; &lt;pre style="padding-left:30px;"&gt;/* Textual Execution Plans, if desired. &lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;SET SHOWPLAN_TEXT ON; &lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;SET SHOWPLAN_TEXT OFF; &lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;*/&lt;/pre&gt;&lt;p&gt; I also like to include the execution plans a lot of the time.  You might wonder why I don't save the execution plans for the GUI in SSMS?  Well, I'm a big advocate of scripting in general because I like to automate activities.  By pulling the execution plans using scripts, I can use SQLCMD to schedule a large number of query executions during the evening and have the results ready for analysis when I come back into the office in the morning.  &lt;em&gt;Workin' smarter, not harder, Baby!&lt;/em&gt;&lt;/p&gt;&lt;p&gt;So how does this test harness work for you?  Do you use other elements in yours?  If so, share your experiences here!&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;-Kevin&lt;/p&gt;&lt;p&gt;-&lt;a title="C'mon. You know you want to." href="http://twitter.com/kekline" target="_blank"&gt;Follow me on Twitter&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Sometimes you just have to break it up</title><link>http://sqlblog.com/blogs/andrew_kelly/archive/2009/04/14/sometimes-you-just-have-to-break-it-up.aspx</link><pubDate>Tue, 14 Apr 2009 23:19:02 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:13294</guid><dc:creator>Andrew Kelly</dc:creator><description>&lt;p&gt;I will be the 1st to admit that I am no &lt;a href="http://www.solidq.com/na/MentorDetail.aspx?Id=37" target="_blank"&gt;Itzik Ben-Gan&lt;/a&gt; when it comes to writing complex SQL statements and I wonder at times how people come up with some of the Selects that I see.&amp;#160; Sometimes they are so complex or convoluted that I simply have a hard time figuring out the intent or the logic behind them. But as a performance consultant I pretty much find myself looking at these on a regular basis when they end up scanning very large tables or indexes. I find that many developers have a hard time splitting up the query into what I think are more manageable pieces, especially if there is a temp table involved. Lets face it temp tables are evil aren’t they :).&amp;#160; Well that’s a whole another discussion which we won’t get into now but sometimes they can be be your friend. For instance today I took a rather unwieldy query that was being used in a stored procedure in which the optimizer simply couldn’t come up with an efficient query the way it was written. And one of the issues was that they needed a total count for paging purposes so they were running the same query twice, once for the count and once to get the TOP xx rows. In a nutshell I changed the query to use a UNION which allowed the optimizer to focus better on the SARG’s for each part of the query and placed the resultant rows into a temp table. This gave me the ability to get a count and retrieve the rows using TOP xx without running it twice.&amp;#160; As you can see from the picture the costs were dramatic. The reads went from over 3 Million to just under 5 thousand and the duration went from over 23 seconds to 150 milliseconds.&amp;#160; So bottom line is don’t be afraid to make the query more maintainable and break it up at times. You might be surprised what you can accomplish.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/andrew_kelly/clip_image002_5FA5E00C.jpg"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:block;float:none;margin-left:auto;border-top:0px;margin-right:auto;border-right:0px;" title="clip_image002" border="0" alt="clip_image002" src="http://sqlblog.com/blogs/andrew_kelly/clip_image002_thumb_456576E8.jpg" width="368" height="165" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>