Oracle Tuning Power Scripts: With 100+ High Performance SQL Scripts
暫譯: Oracle 調優強力腳本:包含 100+ 高效能 SQL 腳本

Harry Conway, Mike Ault, Don Burleson

  • 出版商: Rampant Tech Press
  • 出版日期: 2006-01-01
  • 售價: $1,020
  • 貴賓價: 9.5$969
  • 語言: 英文
  • 頁數: 467
  • 裝訂: Paperback
  • ISBN: 0974448672
  • ISBN-13: 9780974448671
  • 相關分類: OracleSQL
  • 無法訂購

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

相關主題

商品描述

Description

Written by the world's most widely-read Oracle script developers and authors of over 50 best-selling Oracle books, Mike Ault, Don Burleson and Harry Conway shares their personal arsenal of Oracle data dictionary scripts in this comprehensive book. With over 50 years of combined experience using Oracle monitoring scripts and Oracle tuning scripts, this is the most comprehensive Oracle script collection ever assembled.

Packed with over 100 ready-to-user Oracle scripts, this is the definitive collection for every Oracle professional DBA. It would take man-years to develop these scripts from scratch, making this book the best value in the Oracle industry.

Caution - These are extremely powerful undocumented Oracle data dictionary scripts. They should only be used by a certified Oracle DBA, and after a careful review of the Oracle data dictionary script functionality. These Oracle scripts are not for beginners and knowledge of the Oracle data dictionary is required to fully utilize these scripts. USE AT YOUR OWN RISK.

 

Table of Contents

Using the Online Code Depot 1
Conventions Used in this Book 2
Acknowledgements 4
Preface 6
Chapter 1: CPU, Enqueue, and Wait Event Monitoring 7
CPU Usage Statistics 7
SQL by CPU Usage 9
Enqueues 11
Monitoring Events 14
System Events by Percent 16
System Events by Percent - Sample Report 18
SYS_EVENTS 19
Events Related to ORA-4031 Error 21
Snap_delta_sys_events_pct90 23
Oracle10g Wait Events 26
Oracle10g Enqueues 28
dba_hist_enqueue_stat 28
10g Time Model Statistics dba_hist Views 31
dba_hist_sys_time_model 32
Conclusion 37
Chapter 2: File I/O Monitoring 38
Monitoring I/O 38
Global Basic Queries 39
DATAFILE I/O 44
PL/SQL to Calculate I/O per Second Data 48
I/O Timing Analysis 50
Calculate I/O Timing Values for Datafiles 50
SNAP FILE I/O 52
Find the Current I/O Session Bandits 54
Report on 9i DBWR Statistics 60
Oracle 10g FILE I/O 62
New Analysis Techniques for Oracle10g and Above 62
Oracle 10g Segment Statistics 65
Oracle 10g Datafile I/O Statistics 69
Conclusion 94
Chapter 3: Monitoring Locks, Latches, and Waits 95
Latches 95
Locks 99
Monitoring Sessions Causing Blocked Locks 100
Monitoring DDL and DML Locks 102
Monitoring Internal Locks 104
Monitoring Waits 107
Data Block Waits 109
Monitoring Oracle 10g 117
dba_hist_system_event 124
dba_hist_event_name 127
dba_hist_waitstat 128
dba_hist_waitclassmet_history 130
dba_hist_latch 132
dba_hist_latch_misses_summary 135
Oracle 10g Instance Wait Tuning 139
Oracle10g Wait Event Tuning 141
Not all Events are Created Equal 141
Event Wait Analysis with ASH 143
Inside the Active Session History Tables 145
Signature Analysis of Wait Events 149
Conclusion 165
Chapter 4: Monitoring Users and Processes 167
Monitoring Currently Logged-in User Processes 167
Locating Top Resource Sessions 170
Session Bottleneck Analysis 176
Investigating Session Memory Usage 183
Examining Background Processes 185
Monitoring Rollback Activity 188
Oracle 10g 190
Session Wait Analysis in Oracle10g 190
dba_hist_sessmetric_history 195
dba_hist_bg_event_summary 196
Conclusion 199
Chapter 5: Objects 200
Determine Global Object Access Patterns 200
Removing Storage-Related Performance Vampires 208
Detecting Space-Related Object Performance Problems 208
Locating Hot I/O Objects 216
Oracle10g 220
Viewing Table and Index Access with AWR 225
Tracking SQL Nested Loop Joins 225
Counting Index Usage Inside SQL 233
Tracking Full Scan Access 240
Conclusion 254
Chapter 6: SGA Monitoring 255
Importance of Proper Configuration 255
Getting a Handle on Memory Usage 257
Understanding the SGA 260
Gaining Insight into Memory Use 262
More on Memory Ratios 266
How to Keep Data Where It Belongs 269
Structure of the Shared Pool 274
Monitoring and Tuning the Shared Pool 276
Looking into the Shared Pool 277
When Does Less Become More? 278
Conclusions about the Shared Pool 295
Examining the Log Buffer 306
Miscellaneous Memory Issues 306
Buffer Busy Waits 306
Oracle 10g 308
Oracle10g Automatic Memory Management 308
Ratio Coverage in Oracle10g 308
dba_hist_librarycache 310
dba_hist_rowcache_summary 312
dba_hist_buffer_pool_stat 315
Plotting the Data Buffer Usage by Hour of the Day 320
Plotting the DBHR by Day of the Week 323
Automating KEEP Pool Assignment 325
Conclusion 328
Chapter 7: SQL 329
Sorting in Oracle9i and Above 329
Pinpointing Sessions with Problem SQL 334
What is Bad SQL? 338
Pinpointing Bad SQL 340
Historical SQL Analysis 340
Current SQL Analysis 345
New Techniques for Analyzing SQL Execution 346
Interrogating SQL Execution Plans 351
SQL Tuning Roadmap 356
Understand the Query and Dependent Objects 356
Look for SQL Rewrite Possibilities 362
Look for Object-Based Solutions 364
Oracle 10g 368
SQL Statistics 368
dba_hist_sqlstat 369
Oracle10g SQL Tuning Scripts 376
dba_hist_sqlstat 384
dba_hist_sql_plan 390
Interrogating Table Join Methods 393
Conclusion 404
Chapter 8: Storage and Space Management 405
Avoiding Database Downtime 405
Automatic Growth 406
Unlimited Object Extents 410
Correcting Space-Related Object Performance Problems 421
Oracle 10g 424
Oracle10g Storage Diagnostics 424
Oracle 10g ASSM 425
Segment Space Growth Prediction 432
Conclusion 434
Chapter 9: Miscellaneous Scripts 435
Workspaces in Oracle9i 435
pga_aggregate_target in Oracle9i 437
Uncovering Security Holes 438
Finding Storage Hogs 443
Oracle10g 447
Metric dba_hist Views 447
dba_hist_sysmetric_history 448
dba_hist_sysmetric_summary 449
System Statistics 451
dba_hist_sysstat 452
Operating System Statistics 454
Conclusion 457
Index 458
About Harry Conway 458
About Mike Ault 465
About Don Burleson 466
About Mike Reed 467

商品描述(中文翻譯)

描述
由全球最受歡迎的 Oracle 腳本開發者及超過 50 本暢銷 Oracle 書籍的作者 Mike Ault、Don Burleson 和 Harry Conway 所撰寫,本書分享了他們個人收藏的 Oracle 數據字典腳本。這三位作者擁有超過 50 年的 Oracle 監控腳本和 Oracle 調優腳本的綜合經驗,這是有史以來最全面的 Oracle 腳本集合。

本書包含超過 100 個可立即使用的 Oracle 腳本,是每位 Oracle 專業 DBA 的權威收藏。從零開始開發這些腳本需要數年的時間,使得本書在 Oracle 行業中具有最佳的價值。

警告 - 這些是極其強大的未記錄的 Oracle 數據字典腳本。這些腳本僅應由經過認證的 Oracle DBA 使用,並在仔細審查 Oracle 數據字典腳本功能後使用。這些 Oracle 腳本不適合初學者,使用這些腳本需要對 Oracle 數據字典有充分的了解。使用風險自負。

目錄
使用在線代碼庫 1
本書中使用的約定 2
致謝 4
前言 6
第 1 章:CPU、佇列和等待事件監控 7
CPU 使用統計 7
按 CPU 使用的 SQL 9
佇列 11
監控事件 14
按百分比的系統事件 16
按百分比的系統事件 - 範例報告 18
SYS_EVENTS 19
與 ORA-4031 錯誤相關的事件 21
Snap_delta_sys_events_pct90 23
Oracle10g 等待事件 26
Oracle10g 佇列 28
dba_hist_enqueue_stat 28
10g 時間模型統計 dba_hist 視圖 31
dba_hist_sys_time_model 32
結論 37
第 2 章:文件 I/O 監控 38
監控 I/O 38
全局基本查詢 39
DATAFILE I/O 44
PL/SQL 計算每秒 I/O 數據 48
I/O 時間分析 50
計算數據文件的 I/O 時間值 50
SNAP 文件 I/O 52
查找當前 I/O 會話的盜賊 54
報告 9i DBWR 統計 60
Oracle 10g 文件 I/O 62
Oracle10g 及以上的新分析技術 62
Oracle 10g 段統計 65
Oracle 10g 數據文件 I/O 統計 69
結論 94
第 3 章:監控鎖、鎖存器和等待 95
鎖存器 95
鎖 99
監控導致鎖定的會話 100
監控 DDL 和 DML 鎖 102
監控內部鎖 104
監控等待 107
數據塊等待 109
監控 Oracle 10g 117
dba_hist_system_event 124
dba_hist_event_name 127
dba_hist_waitstat 128
dba_hist_waitclassmet_history 130
dba_hist_latch 132
dba_hist_latch_misses_summary 135
Oracle 10g 實例等待調優 139
Oracle10g 等待事件調優 141
並非所有事件都是平等的 141
使用 ASH 進行事件等待分析 143
深入了解活動會話歷史表 145
等待事件的簽名分析 149
結論 165
第 4 章:監控用戶和進程 167
監控當前登錄用戶進程 167
定位資源佔用最高的會話 170
會話瓶頸分析 176
調查會話內存使用情況 183
檢查後台進程 185
監控回滾活動 188
Oracle 10g 190
Oracle10g 中的會話等待分析 190
dba_hist_sessmetric_history 195
dba_hist_bg_event_summary 196
結論 199
第 5 章:對象 200
確定全局對象訪問模式 200
消除與存儲相關的性能吸血鬼 208
檢測與空間相關的對象性能問題 208
定位熱 I/O 對象 216
Oracle10g 220
使用 AWR 查看表和索引訪問 225
跟踪 SQL 嵌套循環連接 225
計算 SQL 中的索引使用 233
跟踪全掃描訪問 240
結論 254
第 6 章:SGA 監控 255
正確配置的重要性 255
掌握內存使用情況 257
理解 SGA 260
深入了解內存使用 262
有關內存比率的更多信息 266
如何保持數據在其應有的位置 269
共享池的結構 274
監控和調優共享池 276
深入了解共享池 277
何時少即是多? 278
關於共享池的結論 295
檢查日誌緩衝區 306
其他內存問題 306
緩衝區繁忙等待 306
Oracle 10g 308
Oracle10g 自動內存管理 308
Oracle10g 中的比率覆蓋 308
dba_hist_librarycache 310
dba_hist_rowcache_summary 312
dba_hist_buffer_pool_stat 315
按小時繪製數據緩衝區使用情況 320
按星期幾繪製 DBHR 323
自動化 KEEP 池分配 325
結論 328
第 7 章:SQL 329
Oracle9i 及以上的排序 329
精確定位有問題的 SQL 的會話 334
什麼是糟糕的 SQL? 338
精確定位糟糕的 SQL 340
歷史 SQL 分析 340
當前 SQL 分析 345
分析 SQL 執行的新技術 346
查詢 SQL 執行計劃 351
SQL 調優路線圖 356
理解查詢及其依賴對象 356
尋找 SQL 重寫的可能性 362
尋找基於對象的解決方案 364
Oracle 10g 368
SQL 統計 368
dba_hist_sqlstat 369
Oracle10g SQL 調優腳本 376
dba_hist_sqlstat 384
dba_hist_sql_plan 390
查詢表連接方法 393
結論 404
第 8 章:存儲和空間管理 405
避免數據庫停機 405
自動增長 406
無限對象擴展 410
糾正與空間相關的對象性能問題 421
Oracle 10g 424
Oracle10g 存儲診斷 424
Oracle 10g ASSM 425
段空間增長預測 432
結論 434
第 9 章:其他腳本 435
Oracle9i 中的工作區 435
Oracle9i 中的 pga_aggregate_target 437
揭露安全漏洞 438
查找存儲佔用者 443
Oracle10g 447
指標 dba_hist 視圖 447
dba_hist_sysmetric_history 448
dba_hist_sysmetric_summary 449
系統統計 451
dba_hist_sysstat 452
操作系統統計 454
結論 457
索引 458
關於 Harry Conway 458
關於 Mike Ault 465
關於 Don Burleson 466
關於 Mike Reed 467