Oracle 11g SQL Performance Tuning for Data Warehouses

Course:   ORPTDW
Duration:   4 Days
Level:   II
On our website at:   http://www.verhoef-training.com/courses/ORPTDW.html
 
Course Summary

This course will provide the student with the skills necessary to create scalable, high performance SQL-based Oracle applications. They will also learn how to identify existing high-load, poor performing SQL statements and tune them. The focus is on making the best use of Oracle architecture, bench-marking various SQL formulations and identifying the best schema object for a given situation.

Oracle11g introduces "automatic tuning" features such as the Automatic Workload Repository, Automatic Database Diagnostic Monitor and SQL Tuning Advisor. These features will be included in the course. It will also include tuning PL/SQL programs using bulk processing and profiling to identify high-load statements. ETL consideration and physical modeling considerations are included.

Topics Covered In This Course

Introduction to Oracle SQL Tuning

  • What Can Be Tuned?
  • What You Need to Know to Tune Oracle SQL

SQL Statement Processing

  • Oracle11g Architecture
  • The SGA
  • SQL Statement Processing Overview
  • Soft Parse
  • Hard Parse: Optimization
  • Row Source Generation
  • Execute Step
  • Fetch Step

Viewing The Execution Plan

  • The EXPLAIN PLAN Command
  • PLAN_TABLE Columns
  • Reading Execution Plans
  • Retrieving the Historical Plan: V$SQL_AREA
  • Using SQL*Plus Autotrace

Using SQL Trace and TKPROF

  • Trace Concepts
  • Trace Steps
  • Trace-Related Initialization Parameters
  • Enable Trace
  • Find the Trace File
  • Using the TKPROF Utility
  • Trace Analysis Tips

The Importance of Bind Variables

  • Shared Pool Reuse
  • Bind Variables
  • Querying V$SQL
  • PL/SQL Bind Variables
  • Cursor Sharing

Getting to Know Cost Based Optimization

  • Optimization Concepts
  • Rule-Based Optimization (Deprecated in 11g)
  • Enabling CBO
  • Checking the Optimizer Setting
  • Collecting Object Statistics
  • Tweaking CBO
  • Collecting System Statistics
  • Creating Histograms
  • Dynamic Sampling
  • Optimizer Calculations for Equal Comparisons
  • Optimizer Calculations for Range Comparisons
  • Bind Variable Peeking and Range Optimization Involving Bind Variables

Learning the Access Paths

  • Full Scans
  • Multi-Block Reads
  • Forcing Full Table Scans
  • High-Water Mark
  • Large Deletes and the HWM
  • When is a Full Scan Bad?
  • Index-Based Scans
  • Unique, Range, Full and Fast-Full Index Scans
  • Index Skip Scan

Using Hints

  • What are Hints?
  • When to Use Hints
  • Hint Examples
  • Some Syntax Notes

Schema (Data Storage) Options

  • Heap Tables
  • Index Organized Tables
  • Index Clustered Tables
  • Hash Clustered Tables
  • Sorted Hash Clusters (11g)
  • Materialized Views
  • Temporary Tables
  • Nested Tables
  • Object Tables

Indexes, Part I - All About B-Tree Indexes

  • Index Concepts
  • B-Tree Index Concepts
  • B-Tree Effect on Query Performance
  • Creating B-Tree Indexes
  • Update Statistics with DBMS_STATS
  • Impact of Clustering Factor
  • Choosing Columns to Index
  • Calculating Selectivity
  • Effect of Indexes on ORDER BY Columns
  • When to Avoid Adding an Index
  • Multi-Column Indexes
  • Which Column First?
  • Avoiding Table Access with Multi-Column Indexes
  • Multiple Single Column Indexes
  • When and Where to Create Indexes
  • What to Avoid when using an Index
  • Finding Unused Indexes with MONITORING
  • Additional Indexing Guidelines

Indexes, Part II - Introduction to Other Index Types

  • Bitmap Indexes
  • Reverse Key Indexes
  • Function-Based Indexes
  • Bitmap Join Indexes

Using Oracle11g Advisors to Tune SQL

  • Introduction to Automatic Workload Repository Concepts
  • Using ADDM to find Problems
  • Using SQL Tuning Advisor to Get Recommendations
  • Exploring STA Recommendations
  • Using SQL Profiles

Impact of Reformulating SQL Statements

  • EXISTS versus DISTINCT
  • NOT IN versus NOT EXISTS
  • IN versus EXISTS
  • UNION ALL versus UNION
  • Oracle Analytic Functions

Join and Subquery Access Paths

  • Join Operations
  • Nested Loops Join
  • Sort Merge Join
  • Hash Join
  • Join Hints
  • Additional Filters
  • Subquery Conversion

Concurrency Control

  • Introduction to Locks
  • Row Lock Architecture
  • Basic Locking Rules
  • DDL and DML locks
  • Locking Issues: Blocking
  • Locking Issues: Deadlocks
  • Detecting Waits Due to Blocking

Parallel Query

  • When Parallel Query Helps
  • Parallel Query Examples
  • Parallel DML
  • Conditions To Avoid

Optimizer Plan Stability

  • Plan Stability Concepts
  • Implementing Plan Stability
  • Exporting/Importing Outlines
  • Managing Outlines

Tuning Views

  • Mergeable Views
  • Hints & Mergeable Views
  • Non-Mergeable Views
  • Hints and Non-Mergeable Views

PL/SQL Tuning

  • Introduction to DBMS_TRACE
  • Introduction to DBMS_PROFILER
  • Using PL/SQL to Improve Performance
  • 11g PL/SQL Performance Improvements
  • Bulk Processing
  • Efficient Lookups
  • Coding Pipelined Table Functions
  • Static SQL versus Dynamic SQL
  • Using RefCursors versus Arrays to Return Data
  • Explicit versus Implicit Cursors
  • Pipelined Functions

Data Warehouse Considerations

  • Making Hardware and I/O Perform in a Data Warehouse
  • Data Warehouse Physical Architecture
  • Effective Data Warehouse Indexing
  • Constraints and Integrity in Data Warehouses
  • Using Partitioning and Tuning Parallel Processing
  • Materialized Views and Query Rewrites
  • Oracle Dimension Objects
  • Data Loading: Extraction and Transportation
  • Data Loading: Loading and Transformation
  • SQL Aggregation Using GROUP BY Clause Extensions
What You Can Expect

At the end of this course, delegates will be able to:

Who Should Take This Course

This course is designed for Application developers and database administrators. Analysts with strong Oracle SQL skills will also benefit from this course.

Recommended Prerequisites

A good understanding of Oracle SQL, Data Warehouse Overview, and Dimensional modeling will be needed.

Training Style

Instructor led with 50% lecture and 50% lab.

Related Courses
Code Course Title Duration Level
ORTUNE
Oracle Database 10g: Performance Tuning
4 Days
II
Details
OROPT
Oracle 10g/11g SQL Statement Tuning
3 Days
II
Details
OWHPSQ
Advanced PL/SQL (and SQL) for Data Warehousing ETL
4 Days
III
Details
OR11DWB
Oracle Database 11g: Data Warehousing and Oracle Warehouse Builder
5 Days
III
Details

Every student attending a Verhoef Training class will receive a certificate good for $100 toward their next public class taken within a year.

You can also buy "Verhoef Vouchers" to get a discounted rate for a single student in any of our public or web-based classes. Contact your account manager or our sales office for details.