Book description
"Offers hundreds of hints, tips, and tricks of the trade that can be useful to any DBA wanting to achieve maximum performance of Oracle applications. No Oracle library would be complete without this book." --Ken (Dr. DBA) Jacobs, Vice President of Product Strategy for Server Technologies, Oracle Corporation
"Rich is the first and last stop for Oracle Database technology and performance tuning. His knowledge is a vital tool that you need to successfully negotiate the waters of Oracle database development." --Mike Frey, Principal Architect, Navteq
Table of contents
- Cover Page
- Oracle Database 10g Performance Tuning Tips & Techniques
- Copyright Page
- Dedication Page
- Contents
- Acknowledgments
- Introduction
-
1 Oracle Database 10g New Features (DBA and Developer)
- Installation Improvements
- SYSAUX Tablespace
- Automatic Storage Management
- Cluster Ready Services (CRS)
- Server-Generated Alerts
- Automatic Workload Repository (AWR)
- Automatic Database Diagnostic Monitor (ADDM)
- SQL Tuning Advisor
- Automatic Shared Memory Management (ASMM)
- Flash Recovery Area
- Recycle Bin
- Recovery Manager Changes
- Transparent Data Encryption (10gR2)
- LogMiner Changes
- New DBMS_STATS Options
- Tracing Enhancements
- DBMS_SCHEDULER
- Default (Permanent) Tablespace
- Temporary Tablespace Groups
- Rename Tablespaces
- Bigfile Tablespaces
- Shrinking Segments
- Data Pump
- Cross-Platform Transportable Tablespaces
- Write to External Table
- Automatic Undo Retention Tuning
- V$SESSION Include New Information
- OEM Changes
- Grid Control
- New Background Processes in 10g
- Version Comparison Table
- New Features Review
- References
- 2 Basic Index Principles (Beginner Developer and Beginner DBA)
-
3 Disk Implementation Methodology and ASM (DBA)
- Disk Arrays: Not a Choice Anymore
- Setup and Maintenance of the Traditional File System
- Distributing "Key" Data Files Across Hardware Disks
- Locally Managed Tablespaces
-
ASM Introduction
- Communication Across IT Roles
- ASM Instances
- ASM init.ora Parameters
- ASM Installation
- ASM Parameters and SGA Sizing
- ASM and Privileges
- ASM Disks
- ASM and Multipathing
- ASM DiskGroups
- ASM Diskgroups and Databases
- ASM Redundancy and Failure Groups
- New Space-Related Columns in Oracle Database 10g Release 2
- Cluster Synchronization Services
- Database Instances and ASM
- Database Consolidation and Clustering with ASM
- Database Processes to Support ASM
- Bigfile and ASM
- Database Init.ora Parameters to Support ASM
- ASM and Database Deployment Best Practices
- ASM Storage Management and Allocation
- ASM Rebalance and Redistribution
- Avoiding Disk Contention by Using Partitions
- Index Partitioning
- Exporting Partitions
- Eliminating Fragmentation
- Increasing the Log File Size and LOG_CHECKPOINT_INTERVAL for Speed
- Flash Recovery
- Increasing Chances of Recovery: Committing after Each Batch
- Using Rollback Segments
- Don't Sort in the SYSTEM or SYSAUX Tablespaces
- Have Multiple Control Files on Different Disks and Controllers
- Using Raw Devices to Improve I/O for Write-Intensive Data
- Other Disk I/O Precautions and Tips
- Issues to Consider in the Planning Stages
- Tips Review
- References
-
4 Tuning the Database with Initialization Parameters (DBA)
- Identifying Crucial Initialization Parameters
- Changing the Initialization Parameters Without a Restart
- Viewing the Initialization Parameters with Enterprise Manager
- Increasing Performance by Tuning the DB_CACHE_SIZE
-
Setting DB_BLOCK_SIZE to Reflect the Size of Your Data Reads
- Tuning the SHARED_POOL_SIZE for Optimal Performance
- Using Oracle Multiple Buffer Pools
- Tuning the PGA_AGGREGATE_TARGET for Optimal Use of Memory
- Modifying the Size of Your SGA to Avoid Paging and Swapping
- Understanding the Cost-Based Optimizer
- Creating Enough Dispatchers
- 25 Important Initialization Parameters to Consider
- Finding Undocumented Initialization Parameters
- Understanding the Typical Server
- Modeling a Typical Server
- Sizing the Oracle Applications Database
- Tips Review
- References
-
5 Enterprise Manager and Grid Control (DBA and Developer)
- The Enterprise Manager (EM) Basics
- Starting with All Targets and Other Groupings
- Policies (Violations) Tab
-
Monitoring the Database
- Database Administration Tab
- Database Administration Tab: Tablespaces
- Database Administration Tab: Instance Level
- Database Administration Tab: All Initialization Parameters
- Database Administration Tab: Manage Optimizer Statistics
- Database Administration Tab, Instance Level: Resource Manager (Consumer Groups)
- Database Maintenance Tab
- Database Topology Tab
- Database Performance Tab
- Monitoring the Hosts
- Monitoring the Application Servers
- Monitoring the Web Applications
- Deployments Tab (Patching Options)
- Jobs Tab
- Reports Tab
- Automatic Storage Management Performance
- Summary
- Tips Review
- References
-
6 Using EXPLAIN and STORED OUTLINES (Developer and DBA)
-
The Oracle SQL TRACE Utility
- Simple Steps for SQL TRACE with a Simple Query
- The Sections of a TRACE Output
- A More Complex TKPROF Output
- Digging into the TKPROF Output
- Using DBMS_MONITOR (10g New Feature)
- TRCSESS Multiple Trace Files into One File (10g New Feature)
- Using EXPLAIN PLAN Alone
- EXPLAIN PLAN—Read It Top to Bottom or Bottom to Top?
- Reading the EXPLAIN PLAN
- Using DBMS_XPLAN
- Yet Another EXPLAIN PLAN Output Method: Building the Tree Structure
- Another Example Using the Tree Approach
- Tracing/Explaining Problem Queries in Developer Products
- Important Columns in the PLAN_TABLE Table
- Helpful Oracle-Supplied Packages
- Initialization Parameters for Undocumented TRACE
- Using Stored Outlines
- Using Plan Stability (Stored Outlines)
- Tips Review
- References
-
The Oracle SQL TRACE Utility
-
7 Basic Hint Syntax (Developer and DBA)
- Top Hints Used
- Available Hints and Groupings
- Specifying a Hint
- Specifying Multiple Hints
- When Using an Alias, Hint the Alias, Not the Table
-
The Hints
- The FIRST_ROWS Hint
- The ALL_ROWS Hint
- The FULL Hint
- The INDEX Hint
- The NO_INDEX Hint
- The INDEX_ JOIN Hint
- The INDEX_COMBINE Hint
- The INDEX_ASC Hint
- The INDEX_DESC Hint
- The INDEX_FFS Hint
- The ORDERED Hint
- The LEADING Hint
- The NO_EXPAND Hint
- The DRIVING_SITE Hint
- The USE_MERGE Hint
- The USE_NL Hint
- The USE_HASH Hint
- The PUSH_SUBQ Hint
- The PARALLEL Hint
- The NO_PARALLEL Hint
- The APPEND Hint
- The NOAPPEND Hint
- The CACHE Hint
- The NOCACHE Hint
- The CLUSTER Hint
- The HASH Hint
- The CURSOR_SHARING_EXACT Hint
- The QB_NAME Hint
- Some Miscellaneous Hints and Notes
- Why Isn't My Hint Working?
- Hints at a Glance
- Tips Review
- References
-
8 Query Tuning: Developer and Beginner DBA
- What Queries Do I Tune? Querying V$SQLAREA
- New 10g Views for Locating Resource-Intensive Sessions and Queries
- When Should an Index Be Used?
- What Happens When I Forget the Index?
- Creating an Index
- Check the Index on a Table
- What If I Create a Bad Index?
- Caution Should Be Exercised When Dropping Indexes
- Indexing the Columns Used in the SELECT and WHERE
- The Fast Full Scan
- A "Magically" Faster Query
- Caching a Table in Memory
- Using Multiple Indexes (Use the Most Selective)
- The Index Merge
- Indexes That Get Suppressed
- Function-Based Indexes
- The "Curious" OR
- The EXISTS Function
- That Table Is Actually a View!
- SQL and Grand Unified Theory
- Tuning Changes in Oracle Database 10g
- 10g Automatic SQL Tuning
- Tips Review
- References
-
9 Table Joins and Other Advanced Tuning (Advanced DBA and Developer)
- Join Methods
- Table Join Initialization Parameters
- A Two-Table Join: Equal-Sized Tables (Cost-Based)
- A Two-Table INDEXED Join: Equal-Sized Tables (Cost-Based)
- Forcing a Specific Join Method
- Eliminating Join Records (Candidate Rows) in Multitable Joins
- A Two-Table Join Between a Large and Small Table
- Three-Table Joins: Not as Much Fun (Cost-Based)
- Bitmap Join Indexes
- Third-Party Product Tuning
- Tuning Distributed Queries
- When You Have Everything Tuned
- Miscellaneous Tuning Snippets
- Tuning at the Block Level (Advanced)
- Tuning Using Simple Mathematical Techniques
- Join Tuning: Relational vs. Object-Relational Performance
- Tips Review
- References
-
10 Using PL/SQL to Enhance Performance (Developer and DBA)
- Use DBMS_APPLICATION_INFO for Real-Time Monitoring
- Use a Custom Replacement of DBMS_ APPLICATION_INFO for Real-Time Monitoring in a RAC Environment
- Log Timing Information in a Database Table
- Reduce PL/SQL Program Unit Iterations and Iteration Time
- Use ROWID for Iterative Processing
- Standardize on Data Types, IF Statement Order, and PLS_INTEGER
- Reduce the Calls to SYSDATE
- Reduce the Use of the MOD Function
- Shared Pool and Pinning PL/SQL Objects
- Identifying PL/SQL Objects That Need to Be Pinned
- Using and Modifying DBMS_SHARED_POOL.SIZES
- Get Detailed Object Information from DBA_OBJECT_SIZE
- Finding Invalid Objects
- Finding Disabled Triggers
- Use PL/SQL Associative Arrays for Fast Reference Table Lookups
- Finding and Tuning the SQL When Objects Are Used
- The Time Component When Working with DATE Data Types
- Tuning and Testing PL/SQL
- PL/SQL Object Location Implications
- Use Rollback Segments to Open Large Cursors
- Use Temporary Database Tables for Increased Performance
- Integrate a User Tracking Mechanism to Pinpoint Execution Location
- Limit the Use of Dynamic SQL
- Use Pipelined Table Functions to Build Complex Result Sets
- Leave Those Debugging Commands Alone!
- The "Look and Feel" Just for the Beginners
- Tips Review
- References
-
11 Tuning RAC and Using Parallel Features
- Real Application Clusters (RAC)
- Basic Concepts of Parallel Operations
- Parallel DML and DDL Statements and Operations
- Parallel DML Statements and Operations Since Oracle 9i
- Parallelism and Partitions
- Inter- and Intraoperation Parallelization
- Creating Table and Index Examples Using Parallel Operations
- Parallel DML Statements and Examples
- Monitoring Parallel Operations via the V$ Views
- Using EXPLAIN PLAN and AUTOTRACE on Parallel Operations
- Tuning Parallel Execution and the Oracle Initialization Parameters
- Parallel Loading
- Performance Comparisons and Monitoring Parallel Operations
- Optimizing Parallel Operations in RAC
- Other Parallel Notes
- Oracle Documentation Is Online
- Tips Review
- References
-
12 The V$ Views (Developer and DBA)
-
V$ View Creation and Access
- Obtaining a Count and Listing of All V$ Views
- Finding the X$ Tables Used to Create the V$ Views
- Finding the Underlying Objects That Make Up the DBA_ views
- Using Helpful V$ Scripts
- Summary of Memory Allocated (V$SGA)
- Detail of Memory Allocated (V$SGASTAT)
- Finding Initialization Settings in V$PARAMETER
- Determining Hit Ratio for Data (V$SYSSTAT)
- Determining Hit Ratio for the Data Dictionary (V$ROWCACHE)
- Determining Hit Ratio for the Shared SQL and PL/SQL (V$LIBRARYCACHE)
- Identifying PL/SQL Objects That Need to Be Kept (Pinned)
- Finding Problem Queries by Querying V$SQLAREA
- Finding Out What Users Are Doing and Which Resources They Are Using
- Finding Out Which Objects a User Is Accessing
- Using Indexes
- Identifying Locking Issues
- Killing the Problem Session
- Finding Users with Multiple Sessions
- Finding Disk I/O Issues
- Finding Rollback Segment Contention
- Determining Whether Freelists Are Sufficient
- Checking Privileges and Roles
- Wait Events V$ Views
- Some of the Major V$ View Categories
- Tips Review
- References
-
V$ View Creation and Access
-
13 The X$ Tables (Advanced DBA)
- Introducing the X$ Tables
- Creating V$ Views and X$ Tables
- Obtaining a List of All the X$ Tables
- Obtaining a List of All the X$ Indexes
- Using Hints with X$ Tables and Indexes
- Shared Pool
- Queries to Monitor the Shared Pool
- Redo
- Initialization Parameters
- Buffer Cache/Data Blocks
- Instance/Database
- Effective X$ Table Use and Strategy
- Related Oracle Internals Topics
- Reading the Trace File
- Some Common X$ Table Groups
- Some Common X$ Table and Non-V$ Fixed View Associations
- Common X$ Table Joins
- X$ Table Naming Conventions
- Tips Review
- References
-
14 Using STATSPACK and the AWR Report to Tune Waits and Latches
- What's New in 10gR2 (10.2) STATSPACK
- New Features in 10gR2 (10.2) STATSPACK
- Installing STATSPACK
- The Automatic Workload Repository (AWR) and the AWR Report
-
Interpreting the STATSPACK Output
- The Header Information
- The Load Profile
- Instance Efficiency
- Top Wait Events
- Oracle Bugs
- The Life of an Oracle Shadow Process
- RAC Wait Events and Interconnect Statistics
- Top SQL Statements
- Instance Activity Statistics
- Tablespace and File I/O Statistics
- Segment Statistics
- Additional Memory Statistics
- UNDO Statistics
- Latch Statistics
- Tuning and Viewing at the Block Level (Advanced)
- Dictionary and Library Cache Statistics
- SGA Memory Statistics
- Non-Default Initialization Parameters
- Top 10 Things to Look for in AWR Report and STATSPACK Output
- Quick Notes on the New ADDM Report
- Scripts 10gR2
- Tips Review
- References
-
15 Performing a Quick System Review (DBA)
- Total Performance Index (TPI)
- Education Performance Index (EPI)
- System Performance Index (SPI)
- Memory Performance Index (MPI)
- Disk Performance Index (DPI)
- Total Performance Index (TPI)
- Overall System Review Example
- System Information List
- Other Items to Consider in Your TPI and System Review
- Tips Review
- References
-
16 Monitor the System Using Unix Utilities (DBA)
- Unix/Linux Utilities
- Using the sar Command to Monitor CPU Usage
- Using the sar and vmstat Commands to Monitor Paging/Swapping
- Finding the Worst User on the System Using the top Command
- Using the uptime Command to Monitor CPU Load
- Using the mpstat Command to Identify CPU Bottlenecks
- Combining ps with Selected V$ Views
- Using the iostat Command to Identify Disk I/O Bottlenecks
- Using the ipcs Command to Determine Shared Memory
- Using the vmstat Command to Monitor System Load
- Monitoring Disk Free Space
- Monitoring Network Performance
- Tips Review
- References
-
A Key Initialization Parameters (DBA)
- Desupported Initialization Parameters
- Deprecated Initialization Parameters
- Top 25 Initialization Parameters
- Top 10 Initialization Parameters Not to Forget
- Top 13 Undocumented Initialization Parameters (As I See It)
- Listing of Documented Initialization Parameters (V$PARAMETER)
- Listing of Undocumented Initialization Parameters (x$ksppi/x$ksppcv)
- Oracle Applications 11i Recommendations (Note: 216205.1)
- Top 10 Reasons Not to Write a Book
- Tips Review
- References
- B The V$ Views (DBA and Developer)
- C The X$ Tables (DBA)
- Index
Product information
- Title: Oracle Database 10g Performance Tuning Tips & Techniques
- Author(s):
- Release date: July 2007
- Publisher(s): McGraw Hill Computing
- ISBN: 9780071596435
You might also like
book
RMAN Recipes for Oracle Database 11g: A Problem-Solution Approach
It's sometimes said that the true job of an Oracle database administrator can be summed up …
book
Oracle Database 11g New Features
FOREWORD by Tom Kyte Your Must-Have Guide to Everything New in Oracle Database 11 g Realize …
book
OCA/OCP Oracle Database 11g All-in-One Exam Guide
A Fully Integrated Study System for OCA Exams 1Z0-051 and 1Z0-052, and OCP Exam 1Z0-053 Prepare …
book
Oracle® Database 10g Insider Solutions
Oracle Database 10g Insider Solutions is a must-have reference guide for all Oracle professionals. It provides …