Denis Gobo : Performance Tuning, SQL Server 2005http://sqlblog.com/blogs/denis_gobo/archive/tags/Performance+Tuning/SQL+Server+2005/default.aspxTags: Performance Tuning, SQL Server 2005enCommunityServer 2.1 SP2 (Build: 61129.1)Interview With Kalen Delaney About Inside Microsoft SQL Server 2005 Query Tuning and Optimizationhttp://sqlblog.com/blogs/denis_gobo/archive/2007/10/15/2980.aspxMon, 15 Oct 2007 16:58:00 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:2980Denis Gobo4http://sqlblog.com/blogs/denis_gobo/comments/2980.aspxhttp://sqlblog.com/blogs/denis_gobo/commentrss.aspx?PostID=2980http://sqlblog.com/blogs/denis_gobo/rsscomments.aspx?PostID=2980<P>I am a big fan of Inside <A href="http://www.amazon.com/gp/product/0735621055/102-1687136-8876917?ie=UTF8&amp;tag=sql08-20&amp;linkCode=xm2&amp;camp=1789&amp;creativeASIN=0735621055">Microsoft SQL Server 2005 The Storage Engine</A> so when I saw that yet another book got published in this series I just had to check it out. <A href="http://www.amazon.com/gp/product/0735621969/102-5735017-0910517?ie=UTF8&amp;tag=sql08-20&amp;linkCode=xm2&amp;camp=1789&amp;creativeASIN=0735621969">Inside Microsoft SQL Server 2005: Query Tuning and Optimization</A> is very well written gets to the point and give you the answers that you need. I decided to contact Kalen to see if she would be willing to do an interview, by now you know that the answer is yes of course ;-) </P>
<P>The question-and-answer session with Kalen that follows was conducted via email. <STRONG>&nbsp;</STRONG></P>
<P><STRONG>What is the audience for this book, is it the enterprise user or can a small department benefit from the tips in this book? </STRONG></P>
<P>Because this book deals with query tuning, anyone who writes SQL queries for SQL Server can benefit. Very little in the book is geared towards system tuning, so the size of the machine doesn’t really matter. Now of course, if you have a very small system with very small tables, you won’t get as much benefit out of tuning your queries. However, if you have any tables of more than a few thousand rows, and you do any joins, you will need to tune your queries. In addition, the issues of blocking and concurrency control can impact any system, no matter how small. </P>
<P><STRONG>What new technologies in SQL Server 2005 do you think are the most beneficial for performance?</STRONG> </P>
<P>For very large databases, the best new technology is partitioning. For any size system, if you have had serious performance problems due to blocking, you might find a big performance benefit by using one of the snapshot-based isolation levels, but you really need to understand the resource costs that come along with the improved performance. For your individual queries, I think the new optimizer hints and query level recompiles can make a big difference. For indexes, the ability to add included columns to nonclustered indexes can give some of your hard-to-tune queries a major performance boost. </P>
<P><STRONG>What will a person who reads this book gain in terms of understanding how to performance tune a server?</STRONG> </P>
<P>The focus of this book is not so much on tuning the server, but on tuning queries. There is more in Inside SQL Server 2005: The Storage Engine on server issues such as memory and processor management. The biggest server wide issues are covered in Chapter 5, when I talk about managing the plan cache, and how and when query plans are reused. </P>
<P><STRONG>Is the book geared towards a beginner/intermediate level user or do you have to be an advanced user to really utilize the information in this book?</STRONG> </P>
<P>The book is not geared towards beginners, but everyone should be able to get something out of it. It’s primarily geared to SQL Server developers and DBA’s who have been working with SQL Server for a while, and have encountered performance problems that they are trying to find solutions for. </P>
<P><STRONG>With all the changes in SQL Server 2005, how critical has the tempdb become in regards to performance?</STRONG> </P>
<P>Tempdb has always been important. In SQL Server 2005, if you are using one of the snapshot-based isolation levels, you are going to have to be more aware of the demands placed on tempdb, both in the sizing requirements and the additional I/O resources needed. Fortunately, SQL Server 2005 provides tools to monitor tempdb, including a dozen new performance monitor counters, and a dynamic management view, sys.dm_db_file_space_usage, that keeps track of how much space in tempdb is being used for each of the different kind of object stored in tempdb. </P>
<P><STRONG>I understand that this is the first time you wrote with a team of other writers; can you tell us something about that experience?</STRONG> </P>
<P>I initially thought that not having to write the whole volume by myself meant that I could get it done sooner, but that was not the case. Everyone had their own schedule and their own way of writing. The personal aspect of working with the other authors was great. I deeply respect all of the others and it was an honor to be working so closely with them. I had some concerns about the depth of coverage and I wondered whether all the chapters would end up being as deep as I hoped for, but that turned out not to be a major problem. The only real issues were agreeing on a common terminology and coding style, and even that wasn’t that big of an issue, because I got to do a final editing pass on everyone’s chapters. </P>
<P><STRONG>What SQL Server books are on your bookshelf? </STRONG></P>
<P>All of the Inside SQL Server books are there, of course, and all of Ken Henderson’s books. Bob Beauchemin’s book is in my car, to read while I am waiting for the ferryboat, and while on the ferry. I also have technical books that aren’t SQL Server specific, such as Jim Gray’s Transaction Processing, Russinovich’s and Solomon’s Windows Internals, Chris Date’s Introduction to Database Systems and Mike Stonebraker’s Readings in Database Systems. </P>
<P><STRONG>Why do you write technical books? </STRONG></P>
<P>I love working with SQL Server and trying to find out all I can about it. When I found that I could explain difficult concepts in a training environment, I thought I could do the same thing in a written format, and reach more people that way. I have always loved explaining things, ever since I was a teaching assistant for High School Math. </P>
<P><STRONG>Will you be updating your books for SQL Server 2008? </STRONG></P>
<P>I have just started meeting with my editors at Microsoft Press about SQL Server 2008, and it looks like a revision is in the plans. We’re really looking at it as just a revision, with the same structures as the current books, with straightforward changes and the inclusion of new features. </P>
<P><STRONG>Name three things that are new in SQL Server 2005 that you find are the most valuable? </STRONG></P>
<P>Dynamic Management Views, Dynamic Management Views, and Dynamic Management Views! Oh, you wanted three different things? ;-) How about XML query plans and optimization hints. (I’m also very fond of many of the new TSQL constructs, but I was only talking about things that I cover in my new book.) </P>
<P><STRONG>Name three things which are coming in SQL Server 2008 that you are most excited about? </STRONG></P>
<P>You’ll have to ask me this next time. I have actually been avoiding SQL Server 2008 while I was getting my Query Tuning and Optimization book finished, because I didn’t want to get distracted. </P>
<P><STRONG>Can you list any third party tools that you find useful to have as a SQL Server developer/admin?</STRONG> </P>
<P>I’ve tried a few other products, but usefully I find that it is much easier to just stick with the Microsoft line and use the tools provided with the product. <STRONG>&nbsp;</STRONG></P>
<P><STRONG>Name some of your favorite non-technical books.</STRONG> </P>
<P>Oh, I love to read. It would be impossible to list my favorite books, but I can tell you my favorite authors, most of whom write science fiction: Lois McMaster Bujold, Ursula LeGuin, Sheri Tepper, Orson Scott Card, Octavia Butler, Elizabeth Moon. I also love to read historical fiction like Leon Uris. </P><img src="http://sqlblog.com/aggbug.aspx?PostID=2980" width="1" height="1">PerformanceSQL Server 2005BookInterviewPerformance TuningTuning