Chapter 11: Oracle Tuning Tools
The Evolution of Oracle
Tuning
Tools
The Spirit of Independence
A Best Practices Approach to Oracle Tuning
The History of Oracle Tuning Techniques
An Automated Approach to SQL Tuning
How Fully Automated SQL Tuning Works
Fully Automated SQL Tuning is not a Panacea
Oracle Trace Analyzer (sqltxplain)
Oracle Lightweight Onboard Monitor (LTOM)
LTOM Features
Oracle Trace Utility
Inside Oracle Event Tracing
Oracle 12c
Real-time ADDM
Conclusion
Chapter 12: Server & Network Tuning
Oracle Server Tuning
Outside the Oracle Instance
Oracle Server Bottlenecks
Oracle Server Monitoring
Capturing Server-side Metrics
OS Statistics for the Cost-based Optimizer
OS data inside Oracle views
Understanding the load average
OS delta report
The Oracle OS Watcher utility
Starting Oracle OSWatcher
Oracle RAM Tuning
Memory Limits
File Caching
RAM swapping
Oracle CPU Tuning
Viewing CPU Utilization for Oracle
Identifying High CPU Usage with vmstat
Storing Information from vmstat
Disk I/O and Oracle
Moore’s Law and Disk Speed
Server RAM and Oracle
Oracle and the 64-bit Server Technology
The New Age of Oracle Server Consolidation
Server Metrics and SQL Execution
Oracle Network Tuning
Conclusion
Chapter 13: Tuning the I/O Subsystem
Inside Oracle Disk Architecture
The Plague of Large Oracle Disks
Manual File Placement
Oracle 12c Intelligent File Placement
ASM File Striping
File Segregation
Oracle redo log I/O
RAID Technology and Oracle
RAID 5 is Not for Every Database
Oracle and Direct I/O
Enabling Oracle Direct I/O
Calibrating your disk I/O
Monitoring External Disk I/O
Capturing external iostat Information
Generating iostat Reports
Generating ASM disk Reports
Solutions to Physical Read Waits
Choosing a default blocksize
Using Oracle Multiple Blocksizes
Reducing Data Buffer Waste with multiple blocksizes
Reducing Logical I/O with Multiple Blocksizes
Improving Buffer Efficiency with Multiple Blocksizes
Improving SQL Execution with Multiple Blocksizes
Real World Applications of Multiple Blocksizes
Setting the db_block_size with Multiple Blocksizes
Allocating Objects into Multiple Block Buffers
Oracle Blocksize & Index I/O
The Latest Consensus on Using Multiple Blocksizes
Vendor Notes on Oracle Multiple Blocksizes
Reducing Disk I/O with SSD
SSD Vendors for Oracle
Oracle Disk Monitoring
Examining Global I/O
Tracking I/O for Specific Tables
Measuring Disk I/O Speed
Time Series Monitoring of logical I/O
Monitoring Disk I/O with AWR
Conclusion
Chapter 14: Oracle Instance Tuning
Inside Instance Tuning
Tune the Instance Before Tuning SQL
Automatic Memory Management
Manual RAM allocation vs. AMM
Sizing the Oracle SGA and PGA Regions
Viewing Server RAM Resources
Viewing RAM on Solaris
Viewing Oracle RAM on IBM-AIX UNIX
Sizing your SGA
SGA Sizing on a Dedicated Server
Using AMM
RAM and Virtual Memory for Oracle
Finding the High Water Mark of Oracle User Connections
Determining the Optimal PGA Size
A Script for Estimating Total PGA RAM
Optimizing pga_aggregate_target
Rules for adjusting
The memory_max_target and memory_target parameters
Important caveats in PGA management
Sizing your PGA for hash joins
Sizing the PGA for Batch Processing
Supersizing the PGA
A case study RAM hash joins
Monitoring Server Resources in MS Windows
OS Kernel Parameters
Server Settings for Windows Servers
Kernel Setting for UNIX and Linux Servers
Oracle Parameter Tuning
Oracle Hidden Parameters
Oracle Parallel Query Parameters
SQL Optimizer Parameters
Instance Wait Event Tuning
Tuning the Oracle Data Buffer Pools
Data Buffer Cache Hidden Parameters
The Problem of Duplicate RAM Caches
Why is Oracle Logical I/O So Slow?
Data Block Caching in the SGA
Full Table Caching in Oracle
Oracle Data Buffer Metrics
Using AWR for Buffer Pool Statistics
Oracle’s Eight Data Buffer Hit Ratios
Viewing Information about SGA Performance
AMM and Oracle Instance Tuning
Internals of the Oracle Data Buffers
Finding Hot Blocks inside the Oracle Data Buffers
Viewing the Data Buffer Contents
Oracle 12c flash_cache Internals
Flash cache; The new data buffer in town
The Downside of Mega Data Buffers
Allocating Oracle Objects into Multiple RAM data Buffers
Automating KEEP Pool Assignment
Sizing the KEEP Pool
Oracle 12c flash cache
Enabling the flash_cache
Tuning the RECYCLE Pool
Large Blocks and Oracle Instance Caching
Finding Baselines
Learning Instance Tuning from TPC Performance Benchmarks
Rules for adjusting
shared_pool_size
Sizing the Shared Pool with the Oracle Advisory Utility
Rules for Adjusting the Data Buffer Sizes
Monitoring RAM usage
Tracking hash joins
Viewing RAM usage for hash joins in SQL
Conclusion
Chapter 15: Tablespace Tuning
Oracle Tablespace Tuning
Inside Oracle Tablespace Tuning
ASSM and Tablespace Performance
Internal Freelist Management
Characteristics of Bitmap Segment Management
New High Watermark Pointers
Extent Control Header Block
Using ASSM with RAC Databases
Potential Performance Issues with ASSM
Detecting Tablespace Fragmentation
Tablespace tuning tips
Conclusion
Chapter 16: Oracle Table Tuning
Oracle table performance
The
Freelist
Unlink Process
The Issue of
pctused
Setting pctfree and pctused
Freelists and segment Performance
Oracle 11g table compression
The overhead of Oracle table compression
Faster SQL with Database Reorganizations
Managing Row Chaining in Oracle
Function-based virtual columns
Features and limitations of 11g virtual columns
A Summary of Object Tuning Rules
Reorganizing Tables for High Performance
Oracle Partitioning and table tuning
Partition-wise joins
Partition pruning
Partition Pruning Internals
Online Reorganization
Tuning SQL Access with
clustering_factor
Sorted hash cluster tables
Creating a sorted hash cluster
External Tables and SQL
Defining an External Table
Internals of External Tables
Conclusion
Chapter 17: Tuning with indexes
SQL Tuning with Indexes
Do I have missing indexes?
The types of Oracle indexes
The Oracle b-tree index
Creating a b-tree index
Does block size matter?
Tuning SQL with bitmapped indexes
Distinct key values and bitmap indexes!
SQL Tuning with bitmap join indexes
How bitmap join indexes work
Bitmap join index example
When Oracle SQL chooses the wrong index
Beware of the fast fix
Forcing index usage
Not all Indexes are Used in Range Scans
Why doesn’t Oracle use my index?
When to Rebuild Indexes
Tuning with Index Organized Tables
Index usage and built-in functions
Finding BIF’s
Tuning SQL with Function-based Indexes (FBI)
Using case statements with a function-based index
Indexing on complex functions
Statistics and function-based indexes
Locating function-based indexes
Conclusions on function-based indexes
Doing case sensitive searches with indexes
SQL Tuning with Oracle*Text Indexes
Oracle Text Index re-synchronization
Testing new Oracle indexes
Testing SQL workloads with invisible indexes
Monitoring index usage
Monitoring for Index Range Scans
Verifying optimal index usage
Finding indexing opportunities
Find SQL that uses sub-optimal indexes
Finding SQL with excessive I/O
Finding sub-optimal SQL in the library cache
Finding index opportunities in AWR
Locating un-used indexes
Finding un-used indexes
Dropping un-used indexes
Locating infrequently used indexes
The problem of too many indexes
Determining which indexes to delete
Large Multi-column Indexes
Table Rows and the clustering factor
Index reorganization and SQL Performance
When rebuilding indexes may help SQL performance
When rebuilding indexes might hurt performance
Index behavior and Oracle blocksize
Choosing candidates for index maintenance
Conclusion
Chapter 18: Oracle Troubleshooting
Introduction to Oracle Troubleshooting
What to do with a hung database
Emergency Troubleshooting Methods
Troubleshooting Limitations
Troubleshooting Triage
Accurately Measuring Oracle Performance
Locating Top Resource Sessions
Chapter Conclusion
Book Conclusion
Index
About
the Author