Tuning your database for optimal performance means more than following a few short steps in a vendor-specific guide. For maximum improvement, you need a broad and deep knowledge of basic tuning principles, the ability to gather data in a systematic way, and the skill to make your system run faster. This is an art as well as a science, and Database Tuning: Principles, Experiments, and Troubleshooting Techniques will help you develop portable skills that will allow you to tune a wide variety of database systems on a multitude of hardware and operating systems. Further, these skills, combined with the scripts provided for validating results, are exactly what you need to evaluate competing database products and to choose the right one.
- Forward by Jim Gray, with invited chapters by Joe Celko and Alberto Lerner
- Includes industrial contributions by Bill McKenna (RedBrick/Informix), Hany Saleeb (Oracle), Tim Shetler (TimesTen), Judy Smith (Deutsche Bank), and Ron Yorita (IBM)
- Covers the entire system environment: hardware, operating system, transactions, indexes, queries, table design, and application analysis
- Contains experiments (scripts available on the author's site) to help you verify a system's effectiveness in your own environment
- Presents special topics, including data warehousing, Web support, main memory databases, specialized databases, and financial time series
- Describes performance-monitoring techniques that will help you recognize and troubleshoot problems
Inhaltsverzeichnis
1;Front Cover;1 2;Database Tuning: Principles, Experiments, and Troubleshooting Techniques;6 3;Copyright Page;7 4;Contents;12 5;Foreword;10 6;Preface;20 7;CHAPTER 1. BASIC PRINCIPLES;26 7.1;1.1 The Power of Principles;26 7.2;1.2 Five Basic Principles;27 7.3;1.3 Basic Principles and Knowledge;32 8;CHAPTER 2. TUNING THE GUTS;34 8.1;2.1 Goal of Chapter;34 8.2;2.2 Locking and Concurrency Control;34 8.3;2.3 Logging and the Recovery Subsystem;61 8.4;2.4 Operating System Considerations;74 8.5;2.5 Hardware Tuning;84 8.6;Bibliography;96 8.7;Exercises;99 9;CHAPTER 3. INDEX TUNING;102 9.1;3.1 Goal of Chapter;102 9.2;3.2 Types of Queries;102 9.3;3.3 Key Types;106 9.4;3.4 Data Structures;106 9.5;3.5 Sparse Versus Dense Indexes;114 9.6;3.6 To Cluster or Not to Cluster;115 9.7;3.7 Joins, Foreign Key Constraints, and Indexes;127 9.8;3.8 Avoid Indexes on Small Tables;130 9.9;3.9 Summary: Table Organization and Index Selection;130 9.10;3.10 Distributing the Indexes of a Hot Table;135 9.11;3.11 General Care and Feeding of Indexes;136 9.12;Bibliography;140 9.13;Exercises;141 10;CHAPTER 4. TUNING RELATIONAL SYSTEMS;148 10.1;4.1 Goal of Chapter;148 10.2;4.2 Table Schema and Normalization;149 10.3;4.3 Clustering Two Tables;162 10.4;4.4 Aggregate Maintenance;163 10.5;4.5 Record Layout;165 10.6;4.6 Query Tuning;168 10.7;4.7 Triggers;183 10.8;Bibliography;186 10.9;Exercises;187 11;CHAPTER 5. COMMUNICATING WITH THE OUTSIDE;190 11.1;5.1 Talking to the World;190 11.2;5.2 Client-Server Mechanisms;192 11.3;5.3 Objects, Application Tools, and Performance;193 11.4;5.4 Tuning the Application Interface;196 11.5;5.5 Bulk Loading Data;204 11.6;5.6 Accessing Multiple Databases;205 11.7;Bibliography;208 12;CHAPTER 6. CASE STUDIES FROM WALL STREET;210 12.1;6.1 Techniques for Circumventing Superlinearity;210 12.2;6.2 Perform Data Integrity Checks at Input Time;213 12.3;6.3 Distribution and Heterogeneity;213 12.4;6.4 Trading Space for Time in History-Dependent Queries;218 12.5;6.5 Chopping to Facilitate Glo
bal Trades;219 12.6;6.6 Clustering Index Woes;220 12.7;6.7 Beware the Optimization;220 12.8;6.8 Disaster Planning and Performance;221 12.9;6.9 Keeping Nearly Fixed Data Up to Date;226 12.10;6.10 Deletions and Foreign Keys;227 12.11;6.11 Partitioning Woes: The Hazards of Meaningful Keys;228 12.12;6.12 The Problem of Time;228 12.13;Bibliography;234 12.14;Exercises;235 13;CHAPTER 7. TROUBLESHOOTING;238 13.1;7.1 Introduction;238 13.2;7.2 How to Gather Information: The Tools;242 13.3;7.3 Queries from Hell;251 13.4;7.4 Are DBMS Subsystems Working Satisfactorily?;256 13.5;7.5 Is the DBMS Getting All It Needs?;261 13.6;7.6 Conclusion;265 13.7;Bibliography;265 14;CHAPTER 8. TUNING E-COMMERCE APPLICATIONS;268 14.1;8.1 Goal;268 14.2;8.2 E-commerce Architecture;268 14.3;8.3 Tuning the E-commerce Architecture;271 14.4;8.4 Case Study: Shop Comparison Portal;275 14.5;8.5 Capacity Planning in a Nutshell;278 14.6;Bibliography;282 14.7;Exercises;283 15;CHAPTER 9. CELKO ON DATA WAREHOUSES: TECHNIQUES, SUCCESSES, AND MISTAKES;286 15.1;9.1 Early History;286 15.2;9.2 Forget What the Elders Taught You;287 15.3;9.3 Building a Warehouse Is Hard;292 15.4;9.4 The Effect on the Bottom Line;293 16;CHAPTER 10. DATA WAREHOUSE TUNING;300 16.1;10.1 What's Different About Data Warehouses;300 16.2;10.2 Tuning for Customer Relationship Management Systems;314 16.3;10.3 Federated Data Warehouse Tuning;319 16.4;10.4 Product Selection;320 16.5;Bibliography;322 16.6;Exercises;324 17;APPENDIX A. REAL-TIME DATABASES;326 17.1;A.1 Overview;326 17.2;A.2 Replicated State Machine Approach;328 18;APPENDIX B. TRANSACTION CHOPPING;330 18.1;B.1 Assumptions;330 18.2;B.2 Correct Choppings;332 18.3;B.3 Finding the Finest Chopping;337 18.4;B.4 Optimal Chopping Algorithm;340 18.5;B.5 Application to Typical Database Systems;342 18.6;B.6 Related Work;344 18.7;Bibliography;348 19;APPENDIX C. TIME SERIES, ESPECIALLY FOR FINANCE ;350 19.1;C.1 Setting Up a Time Series Database;351 19.2;C.2 FAME;352 19.3;C.3 S-Plus;354 19.4;C.4
SAS;354 19.5;C.5 KDB;355 19.6;C.6 Oracle 8i Time Series;357 19.7;C.7 Features You Want for Time Series;357 19.8;C.8 Time Series Data Mining ;358 20;APPENDIX D. UNDERSTANDING ACCESS PLANS ;362 20.1;D.1 Data Access Operators;364 20.2;D.2 Query Structure Operators;367 20.3;D.3 Auxiliary Operators;371 20.4;Bibliography;373 21;APPENDIX E. CONFIGURATION PARAMETERS ;374 21.1;E.1 Oracle;375 21.2;E.2 SQL Server;379 21.3;E.3 DB2 UDB;380 22;Glossary;386 23;Index;412 24;Author Biographies;441