SQL Tuning: Generating Optimal Execution Plans

A poorly performing database application not only costs users time, but also has an impact on other applications running on the same computer or the same network. SQL Tuning provides an essential next step for SQL developers and database administrators who want to extend their SQL tuning expertise and get the most from their database applications.There are two basic issues to focus on when tuning SQL: how to find and interpret the execution plan of an SQL statement and how to change SQL to get a specific alternate execution plan. SQL Tuning provides answers to these questions and addresses a third issue that's even more important: how to find the optimal execution plan for the query to use.Author Dan Tow outlines a timesaving method he's developed for finding the optimum execution plan--rapidly and systematically--regardless of the complexity of the SQL or the database platform being used. You'll learn how to understand and control SQL execution plans and how to diagram SQL queries to deduce the best execution plan for a query. Key chapters in the book include exercises to reinforce the concepts you've learned. SQL Tuning concludes by addressing special concerns and unique solutions to "unsolvable problems."Whether you are a programmer who develops SQL-based applications or a database administrator or other who troubleshoots poorly tuned applications, SQL Tuning will arm you with a reliable and deterministic method for tuning your SQL queries to gain optimal performance.

1100302855
SQL Tuning: Generating Optimal Execution Plans

A poorly performing database application not only costs users time, but also has an impact on other applications running on the same computer or the same network. SQL Tuning provides an essential next step for SQL developers and database administrators who want to extend their SQL tuning expertise and get the most from their database applications.There are two basic issues to focus on when tuning SQL: how to find and interpret the execution plan of an SQL statement and how to change SQL to get a specific alternate execution plan. SQL Tuning provides answers to these questions and addresses a third issue that's even more important: how to find the optimal execution plan for the query to use.Author Dan Tow outlines a timesaving method he's developed for finding the optimum execution plan--rapidly and systematically--regardless of the complexity of the SQL or the database platform being used. You'll learn how to understand and control SQL execution plans and how to diagram SQL queries to deduce the best execution plan for a query. Key chapters in the book include exercises to reinforce the concepts you've learned. SQL Tuning concludes by addressing special concerns and unique solutions to "unsolvable problems."Whether you are a programmer who develops SQL-based applications or a database administrator or other who troubleshoots poorly tuned applications, SQL Tuning will arm you with a reliable and deterministic method for tuning your SQL queries to gain optimal performance.

17.99 In Stock
SQL Tuning: Generating Optimal Execution Plans

SQL Tuning: Generating Optimal Execution Plans

by Dan Tow
SQL Tuning: Generating Optimal Execution Plans

SQL Tuning: Generating Optimal Execution Plans

by Dan Tow

eBook

$17.99  $31.99 Save 44% Current price is $17.99, Original price is $31.99. You Save 44%.

Available on Compatible NOOK devices, the free NOOK App and in My Digital Library.
WANT A NOOK?  Explore Now

Related collections and offers


Overview

A poorly performing database application not only costs users time, but also has an impact on other applications running on the same computer or the same network. SQL Tuning provides an essential next step for SQL developers and database administrators who want to extend their SQL tuning expertise and get the most from their database applications.There are two basic issues to focus on when tuning SQL: how to find and interpret the execution plan of an SQL statement and how to change SQL to get a specific alternate execution plan. SQL Tuning provides answers to these questions and addresses a third issue that's even more important: how to find the optimal execution plan for the query to use.Author Dan Tow outlines a timesaving method he's developed for finding the optimum execution plan--rapidly and systematically--regardless of the complexity of the SQL or the database platform being used. You'll learn how to understand and control SQL execution plans and how to diagram SQL queries to deduce the best execution plan for a query. Key chapters in the book include exercises to reinforce the concepts you've learned. SQL Tuning concludes by addressing special concerns and unique solutions to "unsolvable problems."Whether you are a programmer who develops SQL-based applications or a database administrator or other who troubleshoots poorly tuned applications, SQL Tuning will arm you with a reliable and deterministic method for tuning your SQL queries to gain optimal performance.


Product Details

ISBN-13: 9780596552367
Publisher: O'Reilly Media, Incorporated
Publication date: 11/19/2003
Sold by: Barnes & Noble
Format: eBook
Pages: 338
File size: 6 MB

About the Author

Dan Tow is an independent consultant, operating under the banner SingingSQL (www.singingsql.com). His experience solving Oracle-related performance problems goes all the way back to his 1989 hire by Oracle Corporation. During most of his tenure at Oracle, Dan focused on the performance of Oracle Applications, managing the performance group for that division. In this role, he found a fertile testing ground for his SQL tuning method applied to the huge set of complex SQL included in those applications, including both online SQL and diverse batch processes. In 1998, Dan left Oracle to lead performance for TenFold Corporation, where he applied the same methods to tuning questions on DB2, and SQL Server, and Sybase, as well as on Oracle. In 2002, Dan started his own business, SingingSQL, through which he offers diverse database-related tuning services, including SQL tuning and systematically analyzing load to learn which SQL should be tuned. He has introduced his SQL tuning method to over 1,000 people in short lectures, and now offers in-depth courses in the material, using this book as textbook. Dan has a Ph.D. in chemical engineering from the University of Wisconsin at Madison. He lives in Palo Alto, California, and can be reached at dantow@singingsql.com.

Table of Contents

Forewordxi
Prefacexiii
1.Introduction1
Why Tune SQL?1
Who Should Tune SQL?3
How This Book Can Help4
A Bonus6
Outside-the-Box Solutions7
2.Data-Access Basics8
Caching in the Database9
Tables12
Indexes15
Uncommon Database Objects18
Single-Table Access Paths22
Calculating Selectivity27
Joins36
3.Viewing and Interpreting Execution Plans43
Reading Oracle Execution Plans44
Reading DB2 Execution Plans54
Reading SQL Server Execution Plans65
4.Controlling Execution Plans73
Universal Techniques for Controlling Plans73
Controlling Plans on Oracle84
Controlling Plans on DB298
Controlling Plans on SQL Server102
5.Diagramming Simple SQL Queries108
Why a New Method?108
Full Query Diagrams110
Interpreting Query Diagrams126
Simplified Query Diagrams128
Exercises130
6.Deducing the Best Execution Plan134
Robust Execution Plans134
Standard Heuristic Join Order136
Simple Examples137
A Special Case145
A Complex Example147
Special Rules for Special Cases151
Exercise174
7.Diagramming and Tuning Complex SQL Queries176
Abnormal Join Diagrams177
Queries with Subqueries203
Queries with Views216
Queries with Set Operations225
Exercise227
8.Why the Diagramming Method Works228
The Case for Nested Loops228
Choosing the Driving Table230
Choosing the Next Table to Join233
Summary236
9.Special Cases238
Outer Joins238
Merged Join and Filter Indexes243
Missing Indexes246
Unfiltered Joins247
Unsolvable Problems248
10.Outside-the-Box Solutions to Seemingly Unsolvable Problems250
When Very Fast Is Not Fast Enough250
Queries that Return Data from Too Many Rows254
Tuned Queries that Return Few Rows, Slowly265
A.Exercise Solutions269
B.The Full Process, End to End282
Glossary295
Index303
From the B&N Reads Blog

Customer Reviews