less_01 Oracle Performance Tuning

13
1 Copyright © 2008, Oracle. All rights reserved. Introduction

description

Oracle Performance Tuning:11g

Transcript of less_01 Oracle Performance Tuning

Page 1: less_01 Oracle Performance Tuning

1Copyright © 2008, Oracle. All rights reserved.

Introduction

Page 2: less_01 Oracle Performance Tuning

Copyright © 2008, Oracle. All rights reserved.1 - 2

Course Objectives

After completing this course, you should be able to do the following:• Utilize database advisors to proactively tune an Oracle

Database• Use the tools based on Automatic Workload Repository

(AWR) to tune an Oracle Database• Diagnose and tune common SQL-related performance

problems• Diagnose and tune common instance-related performance

problems • Use the Enterprise Manager performance-related pages to

monitor an Oracle Database

Page 3: less_01 Oracle Performance Tuning

Copyright © 2008, Oracle. All rights reserved.1 - 3

Organization

• Monitoring and Diagnostics– Monitoring using available tools– Identifying the problem– Using AWR-based tools

• SQL Tuning– Identifying and tuning SQL statements by influencing the

optimizer– Managing change

— SQL Performance Management — Real Application Testing

• Instance Tuning– Tuning memory components– Tuning space usage and I/O

Page 4: less_01 Oracle Performance Tuning

Copyright © 2008, Oracle. All rights reserved.1 - 4

Agenda

Day Lesson Topic

1 1 Introduction

1 2 Basic Tuning Tools

1 3 Using Automatic Workload Repository

1 4 Defining Problems

1 5 Using Metrics and Alerts

2 6 Baselines

2 7 Using AWR-Based Tools

2 8 Monitoring an Application

2 9 Identifying Problem SQL Statements

3 10 Influencing the Optimizer

Page 5: less_01 Oracle Performance Tuning

Copyright © 2008, Oracle. All rights reserved.1 - 5

AgendaDay Lesson Topic

3 11 Using SQL Performance Analyzer

3 12 SQL Performance Management

4 13 Using Database Replay

4 14 Tuning the Shared Pool

4 15 Tuning the Buffer Cache

5 16 Tuning PGA and Temporary Space

5 17 Automatic Memory Management

5 18 Tuning Segment Space Usage

5 19 Tuning I/O

5 20 Performance Tuning Summary

(opt) Appd B Using Statspack (optional)

Page 6: less_01 Oracle Performance Tuning

Copyright © 2008, Oracle. All rights reserved.1 - 6

What Is Not Included

• 7x24 availability • Online operations• Backup performance • Parallel operations • Streams and Data Guard performance issues• Real Application Clusters• Operating system–specific issues

Page 7: less_01 Oracle Performance Tuning

Copyright © 2008, Oracle. All rights reserved.1 - 7

Who Tunes?

The people who are involved with tuning:• Database administrators• Application architects• Application designers• Application developers• System administrators• Storage administrators

Page 8: less_01 Oracle Performance Tuning

Copyright © 2008, Oracle. All rights reserved.1 - 8

What Does the DBA Tune?

Performance tuning areas:• Application:

– SQL statement performance– Change management

• Instance tuning: – Memory– Database structure – Instance configuration

• Operating system interactions:– I/O – Swap– Parameters

Shared with developers

Shared with SA

Page 9: less_01 Oracle Performance Tuning

Copyright © 2008, Oracle. All rights reserved.1 - 10

How to Tune

The procedures used to tune depend on the tool.• Basic tools:

– Dynamic performance views – Statistics– Metrics– Enterprise Manager pages

• AWR or Statspack• Automatic Database Diagnostic Monitor (ADDM) • DBA scripts

Page 10: less_01 Oracle Performance Tuning

Copyright © 2008, Oracle. All rights reserved.1 - 11

Tuning Methodology

Tuning steps: • Tune the following from the top down:

– The design before tuning the application code– The code before tuning the instance

• Tune the area with the greatest potential benefit—identify:– The longest waits– The largest service times

• Stop tuning when the goal is met.

Page 11: less_01 Oracle Performance Tuning

Copyright © 2008, Oracle. All rights reserved.1 - 13

Effective Tuning Goals

Effective tuning goals are:• Specific• Measurable • Achievable

Page 12: less_01 Oracle Performance Tuning

Copyright © 2008, Oracle. All rights reserved.1 - 15

General Tuning Session

Tuning sessions have the same procedure: 1. Define the problem and state the goal.2. Collect current performance statistics.3. Consider some common performance errors.4. Build a trial solution.5. Implement and measure the change.6. Decide: “Did the solution meet the goal?”

– No? Then go to step 3 and repeat.– Yes? Then create a new baseline.

Page 13: less_01 Oracle Performance Tuning

Copyright © 2008, Oracle. All rights reserved.1 - 17

Summary

In this lesson, you should have learned how to:• Identify tuning tools• Utilize a tuning methodology