<?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', 'Troubleshooting', 'Developer', and 'DBA'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=Performance,Troubleshooting,Developer,DBA&amp;orTags=0</link><description>Search results matching tags 'Performance', 'Troubleshooting', 'Developer', and 'DBA'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><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>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></channel></rss>