Oracle Performance Tuning. Overview of performance tuning strategies

Similar documents
Introduction. Assessment Test. Chapter 1 Introduction to Performance Tuning 1. Chapter 2 Sources of Tuning Information 33

Oracle Database 11g: SQL Tuning Workshop

Oracle Tuning. Ashok Kapur Hawkeye Technology, Inc.

Oracle 1Z0-054 Exam Questions and Answers (PDF) Oracle 1Z0-054 Exam Questions 1Z0-054 BrainDumps

Oracle EXAM - 1Z Oracle Database 11g: Performance Tuning. Buy Full Product.

Oracle Database 12c Performance Management and Tuning

SQL Gone Wild: Taming Bad SQL the Easy Way (or the Hard Way) Sergey Koltakov Product Manager, Database Manageability

Oracle Database: SQL and PL/SQL Fundamentals

Course Contents of ORACLE 9i

Oracle database overview. OpenLab Student lecture 13 July 2006 Eric Grancher

Using Oracle STATSPACK to assist with Application Performance Tuning

Architettura Database Oracle

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Session id: The Self-Managing Database: Guided Application and SQL Tuning

Anthony AWR report INTERPRETATION PART I

Software Development & Education Center. Oracle D2K

Oracle Database 12c: Performance Management and Tuning

EZY Intellect Pte. Ltd., #1 Changi North Street 1, Singapore

PERFORMANCE TUNING TRAINING IN BANGALORE

Oralogic Education Systems

IT Best Practices Audit TCS offers a wide range of IT Best Practices Audit content covering 15 subjects and over 2200 topics, including:

Oracle Database 11g: Performance Tuning DBA Release 2

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX

Oracle Database 11g: Performance Tuning DBA Release 2

Oracle Database 10g The Self-Managing Database

Oracle Database 11g: SQL Tuning Workshop. Student Guide

Learning Objectives : This chapter provides an introduction to performance tuning scenarios and its tools.

Vijay Mahawar

Oracle 9i Application Development and Tuning

Oracle Database 11g : Performance Tuning DBA Release2

1z0-062.exam.215q 1z0-062 Oracle Database 12c: Installation and Administration

Oracle SQL Tuning for Developers Workshop Student Guide - Volume I

Essential (free) Tools for DBA!

Oracle Hyperion Profitability and Cost Management

11gR2 Performance. Tuning Cookbook. Oracle Database. 1 enterprise J. performance from Oracle Database applications. achieve better

EMC Unisphere for VMAX Database Storage Analyzer

Oracle 1Z Oracle Database 11g: Advanced PL/SQL.

Oracle 12C DBA Online Training. Course Modules of Oracle 12C DBA Online Training: 1 Oracle Database 12c: Introduction to SQL:

1-2 Copyright Ó Oracle Corporation, All rights reserved.

ITExamDownload. Provide the latest exam dumps for you. Download the free reference for study

IT-Tage Dezember 2016 Frankfurt am Main Maritim Hotel

Using Active Session History for Performance Tuning: Advanced Topics in Performance Diagnostics

Oracle Exam 1z0-054 Oracle Database 11g: Performance Tuning Version: 5.0 [ Total Questions: 192 ]

In the Oracle Database 12c: Performance Management and

Custom Performance Reporting Changes in Oracle 10g. Brian Doyle BEZ Systems VP, Product Service

<Insert Picture Here> DBA Best Practices: A Primer on Managing Oracle Databases

The Oracle DBMS Architecture: A Technical Introduction

Oracle 1Z Oracle Database 11g Release 2- SQL Tuning. Download Full Version :

1z0-064.exam.57q. Number: 1z0-064 Passing Score: 800 Time Limit: 120 min File Version: 1. Oracle 1z0-064

OpenWorld 2018 SQL Tuning Tips for Cloud Administrators

Oracle PL/SQL - 12c & 11g [Basic PL/SQL & Advanced PL/SQL]

This presentation is for informational purposes only and may not be incorporated into a contract or agreement.

What is Real Application Testing?

Oracle Architectural Components

Oracle Database 12c: SQL Tuning for Developers

EMC Unisphere for VMAX Database Storage Analyzer

Oracle Database 12c Administration I

Oracle Database Auditing

Expdp Multiple Job Modes Requested Schema And Tables

Exadata X3 in action: Measuring Smart Scan efficiency with AWR. Franck Pachot Senior Consultant

Addressing a performance issue: the drilldown approach

Performance Tuning. Chapter 25

<Insert Picture Here> Looking at Performance - What s new in MySQL Workbench 6.2

End-to-end Management with Grid Control. John Abrahams Technology Sales Consultant Oracle Nederland B.V.

"Charting the Course... Oracle Database 12c: Architecture & Internals. Course Summary

Sanity-check the operating systems of all machines involved with user performance. By sanity-checking. Two of the biggest

Oracle Database 11g for Experienced 9i Database Administrators

AMON User's Guide. Author: Andrej Simon Creation date: 11-Mar-2009 Last changed: 11-Aug-2010 AMON Version: 0.32

Oracle Database 12c R2: Administration Workshop Ed 3 NEW

Oracle Database 11g: SQL Fundamentals I

Course Outline. SQL Server Performance & Tuning For Developers. Course Description: Pre-requisites: Course Content: Performance & Tuning.

MyOra 6.0. SQL Tool for Oracle. User Guide

Top 7 Plan Stability Pitfalls & How to Avoid Them. Neil Chandler Chandler Systems Ltd UK

Oracle Database 12c R2: Administration Workshop Ed 3

Exadata Implementation Strategy

ORACLE DBA I. Exploring Oracle Database Architecture

Analyzing a Statspack Report

IT115: Oracle Database 12c Administration I

About these Release Notes. Documentation Accessibility. New Features in Pro*COBOL

Oracle Database Performance Tuning

Data Guard. Author & Presenter: Nassyam Basha Date: 27-FEB-2015

Oracle Database 11g: SQL and PL/SQL Fundamentals

Oracle Database Performance Tuning, Benchmarks & Replication

Orange for Oracle DBA Edition

BACK TO THE BASICS AN OVERVIEW OF ORACLE TOOLS FOR TUNING Michael R. Ault- Burleson Consulting

Oracle 1Z Oracle Database 11g Performance Tuning.

Oracle 10g Self-Management Framework Internals: Exploring the Automatic Workload Repository. Open World September 2005

Let s Tune Oracle8 for NT

Oracle Database 11g: New Features for Administrators Release 2

Introduction p. 1 The Logical and Physical View of Tables p. 1 Database Types p. 4 NULLs p. 6 DDL and DML Statements p. 7 Column and Table Constraint

Oracle Database Administration

IT100: Oracle Administration

MTA Database Administrator Fundamentals Course

Projects. Corporate Trainer s Profile. CMM (Capability Maturity Model) level Project Standard:- TECHNOLOGIES

20 Essential Oracle SQL and PL/SQL Tuning Tips. John Mullins

Jyotheswar Kuricheti

Toad as a SQL Tuning Tool. With Dan Hotka - Oracle ACE Director

How Can I Tune it if I Can t Change the Code

SQL (Structured Query Language)

ORACLE 11gR2 DBA. by Mr. Akal Singh ( Oracle Certified Master ) COURSE CONTENT. INTRODUCTION to ORACLE

Transcription:

Oracle Performance Tuning Overview of performance tuning strategies Allan Young June 2008

What is tuning? Group of activities used to optimize and homogenize the performance of a database Maximize use of system resources to perform work as efficiently and rapidly as possible Goals Minimizing response time Increasing throughput Increasing load capabilities Decreasing recovery time 2

Who tunes? Application Designers Application Developers Database Administrators System Administrators System Architects 3

Methodology Ratios Buffer Cache in high 90 s for OLTP Dictionary Cache Wait Interface db file sequential read db file scattered read buffer busy wait Good Book Oracle Wait Interface: A Practical Guide to Performance Diagnostics & Tuning Oracle Press 4

What tools? Statspack / AWR / ASH Utlbstat/utlestat Alert log (ora-600/ora-7445), archive log location full Trace files tkprof Views dba_blockers/dba_waiters/v$session/v$session_wait 5

Tuning Steps Specify tuning scope Collect data View and edit data and rules Analyse data Review recommendations Implement recommendations 6

Quick Checks for Performance Alert log for errors Unix / Windows system logs for errors Vmstat perfmon 7

Session Tracing 10046 Event Level 1 Enable SQL Tracing Level 4 Level 1 + bind variable information Level 8 Level 1 + wait event statistics Level 12 Level 1 + bind variable information + wait event statistics Alter Session Alter session set events 10046 trace name context forever, level 12 ; DBMS_System exec dbms_system.set_ev(sid,serial#,10046,12, ); 8

tkprof Used to format trace files Can sort trace file by elapsed parsing/executing/fetching Type tkprof to see full list Can show explain plan information Usage : tkprof dbateam_ora_686.trc allan.txt sys=no 9

tkprof output Rows Row Source Operation ------- --------------------------------------------------- 1 SORT AGGREGATE (cr=7 pr=0 pw=0 time=222 us) 1 TABLE ACCESS FULL TEST (cr=7 pr=0 pw=0 time=192 us) ******************************************************************************** select * from test call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 1 0.01 0.01 0 2 0 0 Execute 1 0.00 0.00 0 0 0 0 Fetch 2 0.00 0.00 0 7 0 1 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 4 0.01 0.01 0 9 0 1 Misses in library cache during parse: 1 Optimizer mode: ALL_ROWS Parsing user id: 78 Rows Row Source Operation ------- --------------------------------------------------- 1 TABLE ACCESS FULL TEST (cr=7 pr=0 pw=0 time=50 us) Elapsed times include waiting on following events: Event waited on Times Max. Wait Total Waited ---------------------------------------- Waited ---------- ------------ SQL*Net message to client 2 0.00 0.00 SQL*Net message from client 2 0.00 0.00 10

Why didn t you may the index From the plan Rows Row Source Operation ------- --------------------------------------------------- 1 TABLE ACCESS FULL TEST (cr=7 pr=0 pw=0 time=50 us) It is not using an index But why? No where clause Stats not up to date Cheaper cost to get data back from full table scan then index lookups Function around indexed column WHERE UPPER(COL1) = UPPERTEXT Is NULL Use of!= or <> Did you create the index in the correct schema 11

Bind Variables Bind variables are substitution variables used are used in place of literals Prepare ONCE execute MANY CURSOR_SHARING=SIMILAR/FORCE/EXACT SIMILAR Causes statements that may differ in some literals, but are otherwise identical, to share a cursor, unless the literals affect either the meaning of the statement or the degree to which the plan is optimized FORCE Forces statements to share cursors (in the where clause) EXACT Only statements that are identical can share the cursor You can t substitute object names only literals e.g. you can t substitute a table name 12

Bind Variable Example No Bind Variables select Col1 from test where Col1='Test1'; COL1 ---------- Test1 With Bind Variables variable col1var varchar2(100) exec :col1var := 'Test1'; select * from test where Col1=:col1var COL1 ---------- Test1 13

Bind Variables Example Continued 1 PL/SQL by default allows the use of bind variables create procedure test1(pv_bind varchar2) AS begin update test set col1 = 1 where col1 = pv_bind; commit; end; / 14

Bind Variable Example Continued 2 How to bypass bind variables in PL/SQL PL/SQL :- execute immediate update test set col1 = 1 where col1 = pv_bind; To use bind variables execute immediate update test set col1 = 1 where col1 = :x1 using pv_bind; Almost all programming languages have the ability to use bind variables, as access to the database is provided through vendor specific API s the question is are the developers using them! Oracle provide JDBC/ODBC/.Net drivers which support bind variables JBDC has a preparedstatement which allows the use of bind variables 15

Top 10 Issues.. 1-5 1. Bad Connection Management 2. Bad use of Cursors and Shared pool 3. Bad SQL - Consuming more resources than required 4. Non standard initialisation parameters 5. Getting database I/O wrong 16

Top 10 Issues.. 6-10 6. Redo log problems 7. Serialization of data blocks in the buffer cache due to lock of free lists/free list groups/transaction slots 8. Long full table scans 9. High amounts of recursive SQL executed as SYS 10. Deployment / Migration errors 17

Questions Any Questions? 18