SQL Tuning: Generating Optimal Execution Plans

Front Cover
"O'Reilly Media, Inc.", Nov 19, 2003 - Computers - 338 pages

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.

 

Contents

Introduction
1
DataAccess Basics
8
Viewing and Interpreting Execution Plans
43
Controlling Execution Plans
73
Diagramming Simple SQL Queries
108
Deducing the Best Execution Plan
134
Diagramming and Tuning Complex SQL Queries
176
Why the Diagramming Method Works
228
Special Cases
238
OutsidetheBox Solutions to Seemingly Unsolvable Problems
250
Exercise Solutions
269
The Full Process End to End
282
Glossary
295
Index
303

Other editions - View all

Common terms and phrases

Popular passages

Page 8 - Come, fill the Cup, and in the fire of Spring Your Winter-garment of Repentance fling: The Bird of Time has but a little way To flutter — and the Bird is on the Wing.
Page xiii - The seaman's story is of the tempest; the plowman's of his team of bulls; the soldier tells his wounds; the shepherd his tale of sheep.
Page 25 - Index reads are almost always cached. • Table blocks reached by an index tend to be hotter...

Bibliographic information