SQL Tuning
By
Dan Tow
November 2003
Pages: 336
| Table of Contents
| Index
| Sample Chapter
| Colophon
Table of Contents
-
Chapter 1 Introduction
-
Why Tune SQL?
-
Who Should Tune SQL?
-
How This Book Can Help
-
A Bonus
-
Outside-the-Box Solutions
-
Chapter 2 Data-Access Basics
-
Caching in the Database
-
Tables
-
Indexes
-
Uncommon Database Objects
-
Single-Table Access Paths
-
Calculating Selectivity
-
Joins
-
Chapter 3 Viewing and Interpreting Execution Plans
-
Reading Oracle Execution Plans
-
Reading DB2 Execution Plans
-
Reading SQL Server Execution Plans
-
Chapter 4 Controlling Execution Plans
-
Universal Techniques for Controlling Plans
-
Controlling Plans on Oracle
-
Controlling Plans on DB2
-
Controlling Plans on SQL Server
-
Chapter 5 Diagramming Simple SQL Queries
-
Why a New Method?
-
Full Query Diagrams
-
Interpreting Query Diagrams
-
Simplified Query Diagrams
-
Exercises (See Section
A.1 for the solution to each exercise.)
-
Chapter 6 Deducing the Best Execution Plan
-
Robust Execution Plans
-
Standard Heuristic Join Order
-
Simple Examples
-
A Special Case
-
A Complex Example
-
Special Rules for Special Cases
-
Exercise (See Section
A.2 for the solution to the exercise.)
-
Chapter 7 Diagramming and Tuning Complex SQL Queries
-
Abnormal Join Diagrams
-
Queries with Subqueries
-
Queries with Views
-
Queries with Set Operations
-
Exercise (See Section
A.3 for the solution to the exercise.)
-
Chapter 8 Why the Diagramming Method Works
-
The Case for Nested Loops
-
Choosing the Driving Table
-
Choosing the Next Table to Join
-
Summary
-
Chapter 9 Special Cases
-
Outer Joins
-
Merged Join and Filter Indexes
-
Missing Indexes
-
Unfiltered Joins
-
Unsolvable Problems
-
Chapter 10 Outside-the-Box Solutions to Seemingly Unsolvable Problems
-
When Very Fast Is Not Fast Enough
-
Queries that Return Data from Too Many Rows
-
Tuned Queries that Return Few Rows, Slowly
-
Appendix A Exercise Solutions
-
Chapter 5 Exercise
Solutions
-
Chapter 6 Exercise
Solution
-
Chapter 7 Exercise
Solution
-
Appendix B The Full Process, End to End
-
Reducing the Query to a Query Diagram
-
Solving the Query Diagram
-
Checking the Execution Plans
-
Altering the Database to Enable the Best Plan
-
Altering the SQL to Enable the Best Plan
-
Altering the Application
-
Putting the Example in Perspective
-
Glossary
-
Colophon
Return to SQL Tuning