Oracle 9i SQL Training
Oracle9i SQL Tuning for Developers and DBAs - 24.5 Hour Online Class or 3.5 Day Classroom Workshop
Focusing on SQL Statement tuning and creating scalable, high-performance SQL-intensive Oracle applications, this class is intended for developers and DBAs with a strong Oracle SQL background and some PL/SQL experience. Covers an introduction to SQL tuning including what can be tuned and accomplished; SQL Statement Processing including the SGA and PGA; Execution Plans; SQL Trace and 10053 Event; an overview of Cost Benefit Optimization (CBO); Indexes; Oracle Access Paths; CBO Transformations; SQL coding tips; Join Methods; Bind Variables and Table Types. Optional appendices include Optimizer hints, new Performance and Tuning features in Oracle 10g and Concurrency Control.
Class Description:
This course will provide you with the skills needed to tune SQL statements and create scalable, high performance SQL-intensive Oracle applications.Particular attention is paid to:
Approximately 50% of class time is spent on hands-on workshops and case studies where you will often be given an underperforming query and the challenge of "make this query perform better."Working examples are included throughout the course book (see the sample chapter). Electronic versions of all course book examples and workshop solutions are also provided.This course now includes an optional lesson on Oracle10g New Tuning Features.Audience: Application developers and database administrators. Not intended for end-users.Prerequisites: Programming experience with Oracle databases. This includes a strong Oracle SQL background as well as some PL/SQL programming experience. This knowledge can be obtained via the following SkillBuilders courses:
Look Inside This Book:
|
Objectives: After successfully completing this course, you will be able to:
|
Topic summary
- Introduction to SQL Tuning
- Course Agenda
- What Can Be Tuned?
- What Can We Do?
- What You Need to Learn
- A Primer
- Introduction Workshop
- SQL Statement Processing
- The Big Picture
- Program Global Area - PGA
- The Oracle9i SGA
- SGA Areas
- Buffer Cache
- Database Block Size
- Non-Standard DB Size
- Keep and Recycle Caches
- Shared Pool
- Library Cache
- Shared Pool Retention
- SQL Statement Processing
- The SQL Processing Steps
- Soft Parse
- Hard Parse: Optimization
- Hard Parse: Row-Source Generation
- Execute
- Fetch
- SQL Statement Processing Workshop
- Creating and Reading Execution Plans
- EXPLAIN PLAN Statement
- Create PLAN_TABLE
- PLAN_TABLE Columns
- EXPLAIN Syntax
- Executing EXPLAIN
- Using DBMS_XPLAN
- Reading Execution Plans
- Execution Plans Workshop: EXPLAIN
- Introduction to AUTOTRACE
- Using AUTOTRACE
- Execution Plans Workshop: AUTOTRACE
- Displaying Runtime Plan
- V$SQL_PLAN Example
- Execution Plans Workshop: V$SQL_PLAN
- SQL Trace and 10053 Event
- SQL Trace Concepts
- SQL Trace Steps
- Check Parameters
- Enable Trace
- Find Trace File
- TKPROF Utility
- Trace Analysis Tips
- SQL Trace/100053 Workshop: SQL Trace
- Introduction to 10053 Trace
- Enable 10053 Trace
- 10053 Trace Report
- Base Table Statistics
- Base Index Statistics
- 10053 Trace Contents
- SQL Trace/10053 Workshop: 10053 Event Trace
- Getting to Know CBO
- Optimization Concepts
- Rule-Based Optimizer
- RBO Rankings
- Rule-Based Optimizer
- Cost-Based Optimizer
- Enable CBO
- Check the Optimizer Setting
- Optimizer Statistics
- Collecting Statistics
- Statistics Updated
- Check Statistics Creation
- CBO Workshop: DBMS_STATS
- Tweaking CBO
- System Statistics
- Using the Statistics
- Calculating Predicate Selectivity
- Predicates with Bind Variables
- Histograms
- CBO Workshop: Histograms
- Dynamic Sampling
- CBO Workshop: Dynamic Sampling
- Using Optimizer Hints
- Hint Syntax
- Hint Examples
- Hints and Views
- CBO Workshop: Hints
- Lesson Summary
- Resources
- Indexes, Part 1
- Indexes: What and Why
- Index Structures
- B-Tree Organization
- Unique Index Scan
- AUTOTRACE
- Important Points
- CREATE INDEX
- NOLOGGING
- Statistics Collection
- Indexes, Part 1 Workshop
- Learning the Oracle Access Paths
- Full Table Scans
- Why Full Table Scan?
- Full Scans Can Be Useful
- Multi-Block Reads
- High Water Mark
- Resetting HWM
- Access Paths Workshop: Full Table Scans
- ROWID Scan
- Index Scans
- Factors for Index Use
- Index Unique Scan
- Index Range Scan
- Can CBO Make Wrong Choice?
- Clustering and Index Access
- Clustering Factor Example
- Index Full Scan
- Index Fast Full Scan
- Index Join Access Path
- Index Skip Scan
- Access Paths Workshop: Index Access Paths
- CBO Transformations
- Bitmap Conversion
- OR to UNION
- Mergeable Views
- Non-Mergeable Views
- Non-Mergeable Example
- Pushable Views
- Inline Views
- Hints & Mergeable Views
- Hints and Non-Mergeable Views
- CBO Transformations Workshop: View Merge
- SQL Coding Tips
- Non-Indexable Conditions
- Column Functions
- NULL and B-Tree Indexes
- Wildcard Searches
- Getting info from interMedia
- Implicit Type Conversion
- EXISTS vs. DISTINCT
- UNION ALL over UNION
- UNION ALL Example
- Caution with NOT IN
- SQL CASE
- Subquery Factoring
- Analytic Functions
- Analytic Performance
- Analytic vs. Self-Join
- Where to get more info on Analytics
- Paging Queries
- Arraysize
- MERGE Statement
- MERGE vs. Manual Merge
- SQL Coding Tips Workshop
- Join Methods
- Choosing Join Plan
- CBO and Missing Stats
- Join Methods
- Nested Loops Join
- "New" Nested Loops
- Nested Loops Example
- Optimizer Mode
- ORDERED Hint
- USE_NL Hint
- Adding Selective Filters
- Outer Nested Loops
- Hash Joins
- Hash Join Process
- Hash versus Nested Loops
- USE_HASH Hint
- Hash Join Parameters
- Sort-Merge Join
- USE_MERGE Hints
- NOT IN Subquery: Anti-Joins
- Nested Loops Anti-Join
- Anti-Join Hints
- EXISTS Subquery: Semi-Joins
- Semi-Join Hints
- Cartesian Join
- Join Methods Workshop
- The Importance of Bind Variables
- Shared Pool Reuse
- Bind Variables
- Query V$SQL
- PL/SQL Bind Variables
- Cursor Sharing
- Enabling Cursor Sharing
- Cursor Sharing Caution
- When Not to Use Bind Variables
- Bind Variables Workshop
- Table Types
- HEAP Tables
- Managing Table Storage
- INITRANS & MAXTRANS
- Datatype Selection
- Constraints vs. Triggers
- NOLOGGING
- Table Types Workshop: NOLOGGING
- Table Compression
- Table Types Workshop: Table Compression
- Non-Standard Blocksize
- Partitioned Tables
- Range Partitioned Table
- Query Performance
- Other Partitioning Schemes
- Index Organized Tables
- Temporary Tables
- Creating Temporary Tables
- Indexes, Part 2
- Composite Indexes
- Which Column First?
- Workshop: Composite Index
- Index Key Compression
- Descending Keys
- Index Coalesce
- Choosing Index Columns
- When to Avoid Indexing
- Function-Based Indexes
- Workshop: Function-based Indexes
Optional Appendices
- Optimizer Hints
- What's Here
- Optimization Approach and Goal Hints
- Access Method Hints
- Join Hints
- Transformation Hints
- 10g Performance and Tuning Features
- What's New?
- Automatic Shared Memory Management
- Auto SGA Demo
- Introducing AWR
- AWR Snapshots
- Controlling AWR
- AWR Reporting
- Server-Generated Alerts
- Tuning Advisors
- Introduction to ADDM
- ADDM Report Excerpt
- ADDM Recommendations
- Enabling ADDM
- SQL Tuning Advisor
- Running STA
- STA Demos
- SQL Profiles
- SQL Profile Demos
- Other Advisors
- Automatic Optimizer Statistics
- More Optimizer Stats Features
- Rule-Based Optimization
- Hints
- More Features
- Watch Out For
- Performance & Tuning Feature Summary
- Concurrency Control
- Introduction to Locks
- Row Lock Architecture
- Basic Locking Rules
- DML Locks
- DDL Locks
- Locking Issues: Lost Update
- Locking Issues: Blocking
- Locking Issues: Deadlocks
- Deadlocks: Cause and Fix
- Concurrency Control Workshop

