Relational Database Index Design and the Optimizers (Hardcover)
暫譯: 關聯式資料庫索引設計與優化器 (精裝版)

Tapio Lahdenmaki, Mike Leach

  • 出版商: Wiley
  • 出版日期: 2005-07-01
  • 定價: $4,600
  • 售價: 8.5$3,910
  • 語言: 英文
  • 頁數: 328
  • 裝訂: Hardcover
  • ISBN: 0471719994
  • ISBN-13: 9780471719991
  • 相關分類: 資料庫SQL
  • 相關翻譯: 數據庫索引設計與優化 (簡中版)
  • 立即出貨 (庫存=1)

買這商品的人也買了...

商品描述

Description:

The most common reason for performance problems with database applications is inadequate indexing.
This book covers index design, one aspect of database tuning. It will teach the reader how to improve the performance of relational databases (IBM DB2, Oracle, Microsoft SQL Server and others) with indexes designed for current hardware (gigabytes of central storage, large disk drives with RAID 5, etc...).
Other common reasons are poor table design, SQL optimizer and long lock waits, all covered in this book. This is a very important topic for database specialists and application developers but most database product manuals and books cover indexing very briefly - perhaps because index design issues are not product specific. Unlike table design, index design can be relatively easily improved while the application is already in production.

 

 

Table of Contents:

Preface.

1. Introduction.

Another Book About SQL Performance!

Inadequate Indexing.

Myths and Misconceptions.

2. Table and Index Organization.

Introduction.

Index Rows.

Index Structure.

Table Row.

Buffer Pools and Disk I/Os.

Hardware Specifics.

DBMS Specifics.

3. SQL Processing.

Introduction.

Predicates.

Optimizers and Access Paths.

Filter Factors.

Materializing the Result Rows.

Exercises.

4. Deriving the Ideal Index for a SELECT.

Introduction.

Basic Assumptions for Disk and CPU Times.

Inadequate Index.

Three-Star Index—The Ideal Index for a SELECT.

Algorithm to Derive the Best Index for a SELECT.

Ideal Index for Every SELECT?

Cost of an Additional Index.

Recommendation.

Exercises.

5. Proactive Index Design.

Detection of Inadequate Indexing.

Basic Question (BQ).

Quick Upper-Bound Estimate (QUBD).

Cheapest Adequate Index or Best Possible Index: Example 1.

Cheapest Adequate Index or Best Possible Index: Example 2.

When to Use the QUBE.

6. Factors Affecting the Index Design Process.

I/O Time Estimate Verification.

Multiple Thin Index Slices.

Difficult Predicates.

Filter Factor Pitfall.

Filter Factor Pitfall Example.

Exercises.

7. Reactive Index Design.

Introduction.

EXPLAIN Describes the Selected Access Paths.

Monitoring Reveals the Reality.

LRT-Level Exception Monitoring.

Call-Level Exception Monitoring.

DBMS-Specific Monitoring Issues.

Exercises.

8. Indexing for Table Joins.

Introduction.

Two Simple Joins.

Impact of Table Access Order on Index Design.

Basic Joint Question (BJQ).

Predicting the Table Access Order.

Merge Scan Joins and Hash Joins.

Nested-Loop Joins Versus MS/HJ and Ideal Indexes.

Joining More Than Two Tables.

Why Joins Often Perform Poorly.

Designing Indexes for Subqueries.

Designing Indexes for Unions.

Table Design Considerations.

Exercises.

9. Star Join Considerations.

Introduction.

Indexes on Dimension tables.

Huge Impact of the Table Access Order.

Indexes on Fact Tables.

Summary Tables.

10. Multiple Index Access.

Introduction.

Index ANDing.

Index ORing.

Index Join.

Exercises.

11. Indexes and Reorganization.

Physical Structure of a B-Tree Index.

How the DBMS Finds an Index Row.

What Happens When a Row IS Inserted?

Are Leaf Page Splits Serious?

When Should an Index Be reorganized?

Volatile Index Columns.

Long Index Rows.

Example: Order-Sensitive Batch Job.

Table Rows Stored in Leaf Pages.

Cost of Index Reorganization.

Split Monitoring.

Summary.

12. DBMS-Specific Indexing Restrictions.

Introduction.

Number of Index Columns,

Total Length of the Index Columns.

Variable-Length Columns.

Number of Indexes per Table.

Maximum Index Size.

Index Locking.

Index Row Suppression.

DBMS Index Creation Examples.

13. DBMS-Specific Indexing Options.

Introduction.

Index Row Suppression.

Additional Index Columns After the Index Key.

Constraints to Enforce Uniqueness.

DBMS Able to Read an Index in Both Directions.

Index Key Truncation.

Function-Based Indexes.

Index Skip Scan.

Block Indexes.

Data-Partitioned Secondary Indexes.

Exercises.

14. Optimizers Are Not Perfect.

Introduction.

Optimizers Do Not Always See the Best Alternative.

Optimizers’ Cost Estimates May Be Very Wrong.

Cost Estimate Formulas.

Do Optimizer Problems Affect Index Design?

Exercises.

15. Additional Estimation Considerations.

Assumptions Behind the QUBE Formula.

Nonleaf Index Pages in Memory.

When the Actual Response Time Can Be Much Shorter Than the QUBE.

Estimating CPU Time (CQUBE).

CPU Estimation Examples.

16. Organizing the Index Design Process.

Introduction.

Computer-Assisted Index Design.

Nine Steps Toward Excellent Indexes.

References.

Glossary.

Index.

商品描述(中文翻譯)

描述:

資料庫應用程式性能問題最常見的原因是索引不足。本書涵蓋了索引設計,這是資料庫調優的一個方面。它將教導讀者如何利用為當前硬體(如:數十億位元組的中央儲存、大型RAID 5磁碟驅動器等)設計的索引來改善關聯式資料庫(如:IBM DB2、Oracle、Microsoft SQL Server等)的性能。其他常見原因包括表設計不良、SQL優化器和長時間鎖定等待,這些都在本書中有所涵蓋。這是一個對於資料庫專家和應用程式開發者非常重要的主題,但大多數資料庫產品手冊和書籍對於索引的介紹都非常簡略,或許是因為索引設計問題並不特定於某一產品。與表設計不同,索引設計在應用程式已經投入生產後相對容易改善。

目錄:

前言。

1. 介紹。

另一部關於SQL性能的書!

索引不足。

迷思與誤解。

2. 表與索引組織。

介紹。

索引行。

索引結構。

表行。

緩衝池與磁碟I/O。

硬體特性。

DBMS特性。

3. SQL處理。

介紹。

謂詞。

優化器與存取路徑。

過濾因子。

物化結果行。

練習。

4. 為SELECT推導理想索引。

介紹。

磁碟與CPU時間的基本假設。

索引不足。

三顆星索引—SELECT的理想索引。

推導SELECT最佳索引的演算法。

每個SELECT的理想索引?

額外索引的成本。

建議。

練習。

5. 主動索引設計。

檢測索引不足。

基本問題(BQ)。

快速上限估算(QUBD)。

最便宜的適當索引或最佳可能索引:範例1。

最便宜的適當索引或最佳可能索引:範例2。

何時使用QUBE。

6. 影響索引設計過程的因素。

I/O時間估算驗證。

多個薄索引切片。

困難的謂詞。

過濾因子陷阱。

過濾因子陷阱範例。

練習。

7. 被動索引設計。

介紹。

EXPLAIN描述所選的存取路徑。

監控揭示現實。

LRT級別例外監控。

呼叫級別例外監控。

DBMS特定的監控問題。

練習。

8. 表連接的索引設計。

介紹。

兩個簡單的連接。

表存取順序對索引設計的影響。

基本聯合問題(BJQ)。

預測表存取順序。

合併掃描連接與哈希連接。

嵌套迴圈連接與MS/HJ及理想索引。

連接多於兩個表。

為何連接經常表現不佳。

為子查詢設計索引。

為聯合設計索引。

表設計考量。

練習。

9. 星型連接考量。

介紹。

維度表上的索引。

表存取順序的巨大影響。

事實表上的索引。

摘要表。

10. 多重索引存取。

介紹。

索引AND運算。

索引OR運算。

索引連接。

練習。

11. 索引與重組。

B樹索引的物理結構。

DBMS如何找到索引行。

當行被插入時會發生什麼?

葉頁分裂是否嚴重?

何時應重組索引?

易變的索引欄位。

長索引行。

範例:順序敏感的批次作業。

存儲在葉頁中的表行。

索引重組的成本。

分裂監控。

總結。

12. DBMS特定的索引限制。

介紹。

索引欄位的數量。

索引欄位的總長度。

可變長度欄位。

每個表的索引數量。

最大索引大小。

索引鎖定。

索引行抑制。

DBMS索引創建範例。

13. DBMS特定的索引選項。

介紹。

索引行抑制。

索引鍵後的額外索引欄位。

強制唯一性的約束。

DBMS能夠雙向讀取索引。

索引鍵截斷。

基於函數的索引。

索引跳過掃描。

區塊索引。

數據分區的次級索引。

練習。

14. 優化器並不完美。

介紹。

優化器並不總是看到最佳選擇。

優化器的成本估算可能非常錯誤。

成本估算公式。

優化器問題是否影響索引設計?

練習。

15. 額外的估算考量。

QUBE公式背後的假設。

記憶體中的非葉索引頁。

當實際響應時間可能比QUBE短得多時。

估算CPU時間(CQUBE)。

CPU估算範例。

16. 組織索引設計過程。

介紹。

計算機輔助索引設計。

邁向卓越索引的九個步驟。

參考文獻。

術語表。

索引。