買這商品的人也買了...
-
$680$537 -
$2,660$2,527 -
$680$537 -
$2,870$2,727 -
$1,880$1,786 -
$1,274Computer Architecture: A Quantitative Approach, 3/e(精裝本)
-
$860$679 -
$450$360 -
$560$476 -
$750$638 -
$1,930$1,834 -
$620$527 -
$780$741 -
$280$218 -
$350$277 -
$580$458 -
$590$466 -
$620$490 -
$690$538 -
$380$342 -
$720$562 -
$750$638 -
$2,390$2,271 -
$400$316 -
$780$741
商品描述
One of the most important challenges faced by Oracle database administrators
and Oracle developers is the need to tune SQL statements so that they execute
efficiently. Poorly tuned SQL statements are one of the leading causes of
substandard database performance and poor response time. SQL statements that
perform poorly result in frustration for users, and can even prevent a company
from serving its customers in a timely manner.
In this book, Mark Gurry
shares his in-depth knowledge of Oracle's SQL statement optimizers. Mark's
knowledge is the result of many hard-fought tuning battles during his many years
of providing Oracle tuning services to clients. Mark provides insights into the
workings of the rule-based optimizer that go well beyond what the rules tell
you. Mark also provides solutions to many common problems that occur with both
the rule-based and cost-based optimizers.
In addition to the specific
problem/solution scenarios for the optimizers, Mark provides a number of handy
SQL tuning tips. He discusses the various optimizer hints, telling you when they
can be used to good effect. Finally, Mark discusses the use of the DBMS_STATS
package to manage database statistics, and the use of outlines to specify
execution plans for SQL statements in third-party applications that you can't
otherwise modify.
Table of Contents
Introduction
The SQL Optimizers
Understanding the Rule-Based Optimizer
Understanding the Cost-Based Optimizer
Some Common Optimizer Misconceptions
Which Optimizer to Use?Rule-Based Optimizer Problems and Solutions
Problem 1: Incorrect Driving Table
Problem 2: Incorrect Index
Problem 3: Incorrect Driving Index
Problem 4: Using the ORDER BY Index and notthe WHERE IndexCost-Based Optimizer Problems and Solutions
Problem 1: The Skewness Problem
Problem 2: Analyzing with Wrong Data
Problem 3: Mixing the Optimizers in Joins
Problem 4: Choosing an Inferior Index
Problem 5: Joining Too Many Tables
Problem 6: Incorrect INIT.ORA Parameter SettingsProblems Common to Rule and Cost with Solutions
Problem 1: Statement Not Written for Indexes
Problem 2: Indexes Are Missing or Inappropriate
Problem 3: Use of Single-Column Index Merge
Problem 4: Misuse of Nested Loop, Sort Merge,or Hash Join
Problem 5: Misuse of IN, EXISTS, NOT IN, NOT EXISTS,or Table Joins
Problem 6: Unnecessary Sorts
Problem 7: Too Many Indexes on a Table
Problem 8: Use of OR Instead of UNION
Problem 9: Tables and Indexes with Many Deletes
Other Problems: Heavy Usage of Views
Other Problems: Joining Too Many TablesHandy SQL Tuning Tips
Identify Bad SQL
Identify Long-Running SQL Statements
Use DECODE for IF/ELSE Selection
Encourage Bind VariablesUsing SQL Hints
When Are Hints Ignored?
Using Hints in Views
Available HintsUsing DBMS_STATS to Manage Statistics
Using DBMS_STATS to Analyze Faster
Copying Statistics Using DBMS_STATS
Manipulating Statistics Using DBMS_STATS
Reverting to Previous StatisticsUsing Outlines for Consistent Execution Plans
Recording Outlines
Enabling Outlines
Managing Outlines
商品描述(中文翻譯)
一個Oracle資料庫管理員和Oracle開發者面臨的最重要挑戰之一是需要調整SQL語句,以便它們能夠高效執行。調整不當的SQL語句是導致資料庫性能不佳和響應時間過長的主要原因之一。執行不佳的SQL語句會讓用戶感到沮喪,甚至可能使公司無法及時為客戶提供服務。
在這本書中,Mark Gurry分享了他對Oracle SQL語句優化器的深入知識。Mark的知識源於他多年來為客戶提供Oracle調整服務的艱苦調整經歷。Mark提供了對基於規則的優化器運作的見解,這些見解遠超過規則所告訴你的內容。他還提供了針對基於規則和基於成本的優化器常見問題的解決方案。
除了針對優化器的具體問題/解決方案場景外,Mark還提供了一些實用的SQL調整技巧。他討論了各種優化器提示,告訴你何時可以有效使用它們。最後,Mark討論了使用DBMS_STATS套件來管理資料庫統計信息,以及使用大綱來指定無法修改的第三方應用程序中的SQL語句執行計劃。
目錄
引言
SQL優化器
理解基於規則的優化器
理解基於成本的優化器
一些常見的優化器誤解
使用哪個優化器?
基於規則的優化器問題與解決方案
問題1:錯誤的驅動表
問題2:錯誤的索引
問題3:錯誤的驅動索引
問題4:使用ORDER BY索引而非WHERE索引
基於成本的優化器問題與解決方案
問題1:偏斜問題
問題2:使用錯誤數據進行分析
問題3:在聯接中混合優化器
問題4:選擇劣質索引
問題5:聯接過多表
問題6:INIT.ORA參數設置錯誤
基於規則和基於成本的共同問題及解決方案
問題1:語句未針對索引編寫
問題2:索引缺失或不合適
問題3:使用單列索引合併
問題4:錯誤使用嵌套循環、排序合併或哈希聯接
問題5:錯誤使用IN、EXISTS、NOT IN、NOT EXISTS或表聯接
問題6:不必要的排序
問題7:表上索引過多
問題8:使用OR而非UNION
問題9:有大量刪除的表和索引
其他問題:大量使用視圖
其他問題:聯接過多表
實用的SQL調整技巧
識別不良SQL
識別長時間運行的SQL語句
使用DECODE進行IF/ELSE選擇
鼓勵使用綁定變數
使用SQL提示
何時忽略提示?
在視圖中使用提示
可用提示
使用DBMS_STATS管理統計信息
使用DBMS_STATS進行更快的分析
使用DBMS_STATS複製統計信息
使用DBMS_STATS操作統計信息
還原到先前的統計信息
使用大綱以保持一致的執行計劃
記錄大綱
啟用大綱
管理大綱