You are on page 1of 8

Topics

I.Profiling, Tracing, Debugging Using Oracle Supplied Packages


 DBMS_PROFILER
o Analyze each program statement
o Collect runtime statistics
 DBMS_TRACE
o Trace program and subprogram execution steps
o Collect runtime statistics
 DBMS_HPROF
o Hierarchical Profiler
o Analyze SQL and PL/SQL statements separately
o Generate HTML Reports
 DBMS_DEBUG
o Debug server side code
o The PLSQL_DEBUG parameter
o Using the COMPILE DEBUG option
o Setting breakpoints
o Analyzing variables
II. PL/SQL Error and Exception Handling
 Compile Time Warnings
o Informational
o Performance
o Severe
o Using the PLSQL_WARNINGS compilation parameter
o The DBMS_WARNING Package
 Exception Categories
o Predefined
o User Defined
o Steps (DECLARE, RAISE, HANDLE)
o Internally Defined (ORA-n errors)
o Using PRAGMA EXCEPTION_INIT
 Raising Exceptions Explicitly
 Reraising the current exception
 Propagation of Exceptions
 Error Code and Error Message Retrieval
o Using the DBMS_Utility Package
o SQLCODE, SQLERRM Functions
III. Understanding the PL/SQL Optimizer
 PL/SQL Optimizer Overview
 PL/SQL Optimizer Parameters
o PLSQL_OPTIMIZE_LEVEL
 Subprogram Inlining
o Performance Benefits and Considerations
o Using the PRAGMA INLINE Directive
IV. PL/SQL Performance Considerations
 Code to Tune
o SQL Code
o Function Calls
o Passing Parameters and the NOCOPY option
o Loop Considerations
o Do data types matter?
o Implicit Conversions
o Supplied Functions
o Conditional Tests Order
 Subprogram Invocations
 Table Functions
 Pipelined Table Functions
o Options
o PIPELINED
o PARALLEL_ENABLE
o DETERMINISTIC
o Fetching Results
 The DBMS_PARALLEL_EXECUTE Package
o Updating large tables in parallel
V. Using Bulk Binding for Performance
 Performance Benefits
 Review of PL/SQL Collections
 Using the FORALL Statement
o INSERT, UPDATE, DELETE Clauses
o FORALL Clauses
o INDICES OF
o VALUES OF
o Handling FORALL Exceptions
o The SAVE EXCEPTIONS Clause
o SQL%BULK_EXCEPTIONS Associative Array
o Accessing the ERROR_INDEX Attribute
o Accessing the ERROR_CODE Attribute
o Using the SQL%BULK_EXCEPTIONS.count Method
o SQL%BULK_ROWCOUNT Attribute Usage
o The RETURNING BULK COLLECT INTO Clause
 The BULK COLLECT Clause
o Usages
o The SELECT INTO Statement
o A FETCH Statement
o In a RETURNING INTO Clause
oSetting Row Limits
oUsing the FETCH ... LIMIT Clause
VI. PL/SQL Compilation Options
 Native Compilation and Execution of PL/SQL Code
o Benefits of Native Compilation
o When to use Native Compilation
o The PLSQL_CODE_TYPE Compilation Parameter

Oracle Advanced PL/SQL Performance Tuning Training Course Topics


PLSQL Training Class 1 - Introducing PL/SQL

o Introduction

o What is PL/SQL and Why Should I use It?

o PL/SQL Architecture

o Overview of PL/SQL Elements

o Blocks

o Variables and Constants

o Using SQL in PL/SQL

o Branching and Conditional Control

o Looping Statements

o Goto

o Procedures, Functions and Packages

o Records

o Object Types

o Collections

o Associative Arrays (Index-By Tables)

o Nested Table Collections

o Varrays
o Collection Methods

o Triggers

o Error Handling

o My Ideal Environment

PLSQL Training Class 2 - Writing Efficient PL/SQL

o Introduction

o Bind Variables

o Using Bind Variables

o The cursor_sharing Parameter

o Dynamic Binds using Contexts

o SQL Injection

o Bulk Binds

o Using Rowids when Updating

o Short-circuit Evaluations and Ordering Logic

o Implicit vs. Explicit Cursors

o Declarations, Blocks, Functions and Procedures in Loops

o Duplication of Built-in String Functions

o Minimize Datatype Conversions

o The Trigger Compilation Myth

o Efficient Function Calls

o Using the NOCOPY Hint

o Using PLS_INTEGER and BINARY_INTEGER Types

o Using BINARY_FLOAT and BINARY_DOUBLE Types


o Native Compilation of PL/SQL

o Decoupling (cheating) for Performance

PLSQL Training Class 3 - Arrays and Bulk Binds

o Populating Collections Using Bulk Operations

o Bulk collect

o Bulk Collect from an Explicit Cursor

o Chunking Bulk Collections Using the LIMIT Clause

o Manually Limiting Bulk Collection Volumes

o Bulk Collection of DML Results

o FORALL

o Bulk INSERT Operations

o Bulk UPDATE Operations

o Bulk DELETE Operations

o Sparse Collections

o Host Arrays in Bulk Operations

o BULK_ROWCOUNT

o Handling Exceptions in Bulk Operations

o Unhandled Exceptions

o Handled Exceptions

o Bulk Operations that Complete

o Dynamic SQL and Bulk Operations


PLSQL Training Class 4 - Caching session Data

o Using Arrays for Lookup Tables

o Using Package Variables to Store Global Data

o Using Contexts to Store Global Data

PLSQL Training Class 5 - PL/SQL Memory Management

o Introduction

o Bind Variables and the Shared Pool

o The NOCOPY Hint and Memory Usage

o Bigger is Better for VARCHAR2 Variables

o Using Packages Correctly

o Pinning Packages in the Shared Pool

o Conclusion

PLSQL Training Class 6 - Cursor Variables and REF CURSOR Types

o Introduction

o Defining Cursor Variables

o Cursor Variables as Parameters

o Cursor Attributes and Cursor Variable Usage

o Host Variables as Cursor Variables

o Dynamic SQL and Variant Resultsets

o Restrictions When Using Cursor Variables

o Cursor Expressions
PLSQL Training Class 7 - Table Functions and Pipelining

o Introduction

o Pipelining Table Functions

o Parallel Enabled Table Functions

o Creating Transformation Pipelines

o Deterministic

o Miscellaneous Information

PLSQL Training Class 8 - Monitoring and Profiling PL/SQL

o Producing Performance Baselines

o Monitoring Specific Code

o Code Instrumentation (application tracing)

o The DSP Package

o dbms_application_info

o dbms_session

o dbms_system

o dbms_profiler

o dbms_trace

o SQL trace, trcsess and tkprof

o Generating SQL Trace Files

o trcsess

o tkprof

o Trace Example

o Execution Plans
o plan_table

o autotrace

o Explain Plan

o utlxpls.sql

o dbms_xplan

o Identifying the Impact of Code at the Database Level

o Dynamic Performance Views (V$)

o sessions.sql

o top_sessions.sql

o top_sql.sql

o longops.sql

o session_waits.sql

o session_events_by_sid.sql and system_events.sql

o session_stats.sql and system_stats.sql

o session_io.sql

o open_cursors_by_sid.sql

o locked_objects.sql

o STATSPACK

o Automatic Workload Repository (AWR)

o ADDM

o Using Oracle Enterprise Manager

You might also like