1 Robert Wijnbelt Health Check your Database A Performance Tuning Methodology.

Slides:



Advertisements
Similar presentations
Advanced Oracle DB tuning Performance can be defined in very different ways (OLTP versus DSS) Specific goals and targets must be set => clear recognition.
Advertisements

Database Tuning. Objectives Describe the roles associated with database tuning. Describe the dependency between tuning in different development phases.
Copyright © SoftTree Technologies, Inc. DB Tuning Expert.
Office of the Accountant General (A&E) Andhra Pradesh Hyderabad
Chapter 9. Performance Management Enterprise wide endeavor Research and ascertain all performance problems – not just DBMS Five factors influence DB performance.
13 Copyright © 2005, Oracle. All rights reserved. Monitoring and Improving Performance.
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Overview of performance tuning strategies Oracle Performance Tuning Allan Young June 2008.
1 Chapter 16 Latch and Mutex Contention. 2 Architecture Overview of Latches Protect Oracle’s SGA Prevent two processes from updating same area of SGA.
Acknowledgments Byron Bush, Scott S. Hilpert and Lee, JeongKyu
Overview of Database Administrator (DBA) Tools
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 2 Overview of Database Administrator (DBA) Tools.
Oracle Architecture. Instances and Databases (1/2)
INTRODUCTION TO ORACLE DATABASE ADMINISTRATION Lynnwood Brown System Managers LLC Introduction – Lecture 1 Copyright System Managers LLC 2007 all rights.
12 Copyright © 2005, Oracle. All rights reserved. Proactive Maintenance.
The Self-managing Database: Automatic Performance Diagnosis Graham Wood Kyle Hailey Oracle Corporation Session id:
1 - Oracle Server Architecture Overview
Memory Management 2010.
Harvard University Oracle Database Administration Session 2 System Level.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 11 Database Performance Tuning and Query Optimization.
Oracle 10g Database Administrator: Implementation and Administration Chapter 14 Proactive Maintenance.
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
1 Copyright © 2009, Oracle. All rights reserved. Exploring the Oracle Database Architecture.
6/1/2001 Supplementing Aleph Reports Using The Crystal Reports Web Component Server Presented by Bob Gerrity Head.
Introduction and simple using of Oracle Logistics Information System Yaxian Yao
15 Copyright © 2004, Oracle. All rights reserved. Proactive Maintenance.
® Enterprise Manager/Management Packs Conference Call Phone Number: 1(888) Pass Code: CYBER.
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 11 Database Performance Tuning and Query Optimization.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Database Performance Tuning and Query Optimization.
2 Copyright © 2006, Oracle. All rights reserved. Performance Tuning: Overview.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Oracle on Windows Server Introduction to Oracle10g on Microsoft Windows Server.
Oracle PL/SQL Programming Steven Feuerstein All About the (Amazing) Function Result Cache of Oracle Database 11g.
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
CSE 781 – DATABASE MANAGEMENT SYSTEMS Introduction To Oracle 10g Rajika Tandon.
Chapter 20 Other Memory Management Topics
March 19981© Dennis Adams Associates Tuning Oracle: Key Considerations Dennis Adams 25 March 1998.
Improving Efficiency of I/O Bound Systems More Memory, Better Caching Newer and Faster Disk Drives Set Object Access (SETOBJACC) Reorganize (RGZPFM) w/
Oracle9i Performance Tuning Chapter 1 Performance Tuning Overview.
The Self-Managing Database: Guided Application and SQL Tuning Mohamed Ziauddin Consulting Member of Technical Staff Oracle Corporation Session id:
Database Systems Slide 1 Database Systems Lecture 5 Overview of Oracle Database Architecture - Concept Manual : Chapters 1,8 Lecturer : Dr Bela Stantic.
7202ICT – Database Administration
Oracle Tuning Considerations. Agenda Why Tune ? Why Tune ? Ways to Improve Performance Ways to Improve Performance Hardware Hardware Software Software.
1 Oracle Architectural Components. 1-2 Objectives Listing the structures involved in connecting a user to an Oracle server Listing the stages in processing.
Oracle Tuning Ashok Kapur Hawkeye Technology, Inc.
1 Chapter 14 DML Tuning. 2 DML Performance Fundamentals DML Performance is affected by: – Efficiency of WHERE clause – Amount of index maintenance – Referential.
Oracle9i Performance Tuning Chapter 12 Tuning Tools.
SEMANTEC 1 Oracle Performance Tuning - Part I Krasen Paskalev Oracle 8i Certified DBA.
Outline Introduction to Oracle Memory Structures SGA, PGA, SCA The Specifics of the System Global Area (SGA) Structures Overview of Program Global Areas.
Srik Raghavan Principal Lead Program Manager Kevin Cox Principal Program Manager SESSION CODE: DAT206.
Infrastructure for Data Warehouses. Basics Of Data Access Data Store Machine Memory Buffer Memory Cache Data Store Buffer Bus Structure.
MISSION CRITICAL COMPUTING Siebel Database Considerations.
1 Copyright © 2005, Oracle. All rights reserved. Following a Tuning Methodology.
Preface 1Performance Tuning Methodology: A Review Course Structure 1-2 Lesson Objective 1-3 Concepts 1-4 Determining the Worst Bottleneck 1-5 Understanding.
1 Chapter 9 Tuning Table Access. 2 Overview Improve performance of access to single table Explain access methods – Full Table Scan – Index – Partition-level.
Oracle9i Performance Tuning Chapter 4 Tuning the Shared Pool Memory.
8 Copyright © 2006, Oracle. All rights reserved. Tuning the Shared Pool.
Dave LinkedIn
3 Copyright © 2004, Oracle. All rights reserved. Database Architecture Comparison.
What is Oracle ? Oracle is a relational database management system. It is a management system which uses the relational data model. In the relational data.
3 Copyright © 2006, Oracle. All rights reserved. Designing and Developing for Performance.
This document is provided for informational purposes only and Microsoft makes no warranties, either express or implied, in this document. Information.
Oracle Database Architectural Components
Chapter 21 SGA Architecture and Wait Event Summarized & Presented by Yeon JongHeum IDS Lab., Seoul National University.
Database Performance Tuning and Query Optimization
Oracle Memory Internals
Chapter 11 Database Performance Tuning and Query Optimization
Presentation transcript:

1 Robert Wijnbelt Health Check your Database A Performance Tuning Methodology

2 WHAT IS PERFORMANCE TUNING?  A combination of identifying and reacting to performance problems –Proactively preventing such problems from occurring  Key responsibility for Oracle DBAs –Ensures that service levels are being met –Avoids costly hardware upgrades

3 Why is performance tuning important?  ‘At the core of business logic, and at the core of business data for most production applications, is a relational database management system ” – Ray Paquet of Gartner, July, 2002  No access = no data = no business –Includes poor performance, missed SLA’s

4 MAJOR CAUSES OF PROBLEMS  Poorly tuned application code: SQL & PL/SQL  Contention for internal Oracle Resources: locks, latches buffers  IO bottlenecks  Inadequate hardware resources

5 Procrastination?  Only when the application and RDBMS is tuned can the possibility of adding hardware be considered –Don Burleson –Number one resolution to performance issues in past three years was to upgrade hardware, add memory and add disk. –Problems still persist!

6 Health Check Best Practices?  Where are the most common problems past and present?  How do I resolve those problems?  How much benefit can I get from fixing the problems identified?  How much effort is involved in resolution?  What can I do to prevent future issues?

7 ‘Tuning Methodology’ Best Practices  Identify issues happening now –Resolve quickly  Find problems in the past –Resolve methodically  How to prevent future occurrences –Set Goals ‘What and How to tune’

8 APPLICATION TUNING Resolutions  The greatest and most common performance gains are attained through SQL tuning  A relative effort is modifying improper parameter settings  Just as important is resolving management of database space and data layout

9 4 Step Action Plan For a Database Healthcheck

10 Step 1: Optimize the Application Workload  Effectively use the Oracle Optimizer –Set optimizer mode to: RULE, COST or CHOOSE  Optimize SQL Statements –Set Optimizer initialization parameters –Determine SQL Code needs optimization –SQL Coding Best Practices –PL/SQL coding Best Practices

11 Step 2: Reduce Contention  Identify and reduce Latch contention  Identify and reduce Lock contention  Optimize Redo Log configuration  Reduce other internal contention

12 Identify and reduce Latch contention  Types of Latches in the SGA that suffer most contention: –Buffer Cache Latches, caused by: SQL statements with very high logical or physical I/O, due to unselective indexes (large index range scans) or many full table scans. DBWR not keeping up with the dirty workload, which forces the foreground process to hold the latch longer looking for a free buffer. Undersized buffer cache. –Library Cache Latches Misses on this latch occur when SQL is executed at very high rates. There is little you can do to reduce the load on this latch, although using private rather than public synonyms (or even direct object references such as OWNER.TABLE) can help. Use bind variables in your code

13 Identify and reduce Lock contention  Often caused in the application code and Data model: –Code for Concurrent use –Index Foreign Key relations –Reduce Ad-Hoc querying –Try to reduce Updates

14 Optimize Redo Log configuration  Use Fast disks –avoid RAID 5, use 0+1 or Filesystem level replication  Multiplex Your RedoLogs  Use NOLOGGING table operations  Use multiple Disks for different Group members  Adjust Log Buffer size

15 Reduce Shared Pool contention  Rewrite SQL  Pin PL/SQL objects or SQL cursor objects in the shared pool, use the DBMS_SHARED_POOL.KEEP  Fully qualify tables and objects with the schema owner name. This will eliminate some reparsing requirements.  Increase the shared pool size when shared cursors are being flushed out  Decrease the shared pool size when the application does not use bind variables and when cursors are not shared and reused.

16 Reduce Shared Pool contention continued  consider setting the parameter cursor_sharing = force (first available in 8.1.6). When this parameter is set, Oracle replaces embedded literal values with bind variables prior to parsing the statement, to avoid additional hard parses for SQL statements that differ only by literal values.  Add cursors to stored procedures/packages. Stored procedures/packages can be pinned in the shared pool, which prevents them from being flushed and subsequently reparsed.  Use the same bind variable length and array size in SQL statements. When an SQL statement with different bind variable lengths is used throughout an application, it cannot be shared.

17 Step 3: Physical IO Optimization  Tune Sorting parameters (Sort_Area)  Tune SQL (avoid Full Table Scans)  Reduce Row Chaining and Migration  Balance IO  Increase number of datafile devices  Implement OFA  Increase DB Block size

18 Step 4: Consider Best Practices  Tune Top Down –Start with Network, IO, Instance and Database design before tuning SQL  Set Benchmarks –Identify some SQL statements, and rerun them as test –Identify and monitor critical modules  Quantify the problem and the expectations.  Make sure there is not some problem with the infrastructure, get everyone involved.  Involve the developers in your tuning efforts.

19  Understand all the features of the database you are using. Use as many standard Oracle provided functions as possible.  Learn how to generate and read execution plans.  Tune to reduce logical IO’s. Reducing the number of LIO’s will reduce both overall CPU usage as well as physical IO requirements. Generally, index usage will reduce LIO requirements, but sometimes the reverse it true. Best Practices continued

20  Consider that sometimes writing PL/SQL can ultimately improve performance over SQL.  If you have lots of large queries doing full table scans, make sure that parallel query is configured correctly.  If Oracle is performing many hash joins, make sure the database parameters associated with hash joins (e.g. hash_area_size) are set correctly. Best Practices continued

21 Quest Central Health Check  A free service from Quest in which our consultants use Quest Central Performance management to diagnose the health of your database

22 What does it do?  Collects Metrics using PL/SQL packages at a user defined interval  Stores that information in a repository  Allows you to run analysis against any number of those stored collections  Produces problems, recommendations, solutions, reports, and goals for tuning

23 WHAT IS QUEST CENTRAL  An integrated comprehensive solution for Oracle DBAs –Real-time and Historical Diagnostics and Analysis –Space Management –SQL Tuning –Database Administration

24 THANK YOU FOR LISTENING Robert Wijnbelt Register for a Free Database Health Check