Presentation is loading. Please wait.

Presentation is loading. Please wait.

Oracle Tuning Ashok Kapur Hawkeye Technology, Inc.

Similar presentations


Presentation on theme: "Oracle Tuning Ashok Kapur Hawkeye Technology, Inc."— Presentation transcript:

1 Oracle Tuning Ashok Kapur Hawkeye Technology, Inc.

2 06/14/2002Hawkeye Technology, Inc.2 Agenda Oracle Database Structure Oracle Database Access Tuning Considerations Oracle Database Tuning Oracle Tuning Tools

3 06/14/2002Hawkeye Technology, Inc.3 Oracle Database Structure

4 06/14/2002Hawkeye Technology, Inc.4 Logical Structure

5 06/14/2002Hawkeye Technology, Inc.5 Logical Structure Tablespaces SYSTEM RBS or UNDO TEMP User Data and Indices Schema Tables and Indices Segments (Data, Index, RBS, Temp) Extents

6 06/14/2002Hawkeye Technology, Inc.6 Physical Structure

7 06/14/2002Hawkeye Technology, Inc.7 Physical Structure Database – Data – Parameter Files Instance – Processes – Memory Structures

8 06/14/2002Hawkeye Technology, Inc.8 Physical Database Data Files Redo Log Files Control Files Parameter File Archive Log Files

9 06/14/2002Hawkeye Technology, Inc.9 Parameter File Read at instance startup Specifies values for various system wide parameters Size parameters – SGA, db buffer, sort area size, … Tuning parameters …

10 06/14/2002Hawkeye Technology, Inc.10 Database Instance Processes – Process Monitor (PMON) – System Monitor (SMON) – Database Writer(s) (DBWRx) – Recovery (RECO) – Archiver (ARCx) – Checkpoint (CKPT) – Log Writer (LGWR) – Server Processes …. Memory Structure – System Global Area (SGA) – Program Global Area (PGA)

11 06/14/2002Hawkeye Technology, Inc.11 Memory Structure SGA – Database buffer cache – Redo log buffer – Shared Pool Shared SQL Area PL/SQL Procedures and Packages Dictionary Cache – … PGA – Heap – Sort Area

12 06/14/2002Hawkeye Technology, Inc.12 Oracle Database Access

13 06/14/2002Hawkeye Technology, Inc.13 Database Connection Sql*Net Listener Server Process

14 06/14/2002Hawkeye Technology, Inc.14 Data Access Access data via SQL or PL/SQL Processing of SQL in three phases: – Parse – Execute – Fetch Execution plan depends on the optimizer mode: – Role based – Cost based

15 06/14/2002Hawkeye Technology, Inc.15 Tuning Considerations

16 06/14/2002Hawkeye Technology, Inc.16 Tuning Considerations OLTP vs DSS Response Time vs Throughput Response Time = Service Time + Wait Time Tuning Tradeoffs –Affect of tuning on rest of the system Frequency of use

17 06/14/2002Hawkeye Technology, Inc.17 Special Tuning Considerations Oracle Parallel Server Multi-Threaded Server Replication Distributed Queries

18 06/14/2002Hawkeye Technology, Inc.18 Consider All Options Business Rules Database Design and Application Design System Architecture Network: LAN and WAN System: Hardware and Operating System Application Tuning Database Tuning

19 06/14/2002Hawkeye Technology, Inc.19 Oracle Database Tuning

20 06/14/2002Hawkeye Technology, Inc.20 Proactive vs Reactive Proactive Tuning – Balance IO Distribution – Manage Object Extents – Manage batch jobs – Manage long running and poorly tuned queries – Database parameter review and tuning – … Reactive Tuning React to a trouble report or performance problem

21 06/14/2002Hawkeye Technology, Inc.21 Tuning Steps Identify and define the problem Set clear and measurable tuning goals Take initial performance measurements Iteratively apply tuning changes and measure performance on TEST system Document ALL tuning changes After goal is reached, apply changes to PRODUCTION.

22 06/14/2002Hawkeye Technology, Inc.22 What Is Tunable in Oracle File placement DB Block Size SGA Size Listener setup Init Parameters Table/tablespace mapping Table/Index parameters RBS/Undo parameters Other Features: OPS, Replication, MTS, …

23 06/14/2002Hawkeye Technology, Inc.23 How to Tune SQL Statements Can they be rewritten for better data access? Review Execution plan for use of Indexes Resource Contention RBS or Undo CPU Memory IO Network

24 06/14/2002Hawkeye Technology, Inc.24 How to Tune RBS or Undo Contention Add more Rollback Segments Change RBS segment size CPU Contention Tune SQL Distribute workload to off-peak hours Add more CPU Memory Contention Change SGA size Change PGA size Consider Multi-Threaded Server Config

25 06/14/2002Hawkeye Technology, Inc.25 How to Tune IO Contention – Moving Data files to balance IO – Moving Tables to different Tablespace to balance IO – Adding/Removing Indexes – Change table structures: going to Partioned tables – Maybe consider Tuning SQL – Review fragmentation including chained/migrated rows Network Contention – Adding LAN/WAN resources – Modifying Listener configuration – Review application design

26 06/14/2002Hawkeye Technology, Inc.26 Oracle Tuning Tools

27 06/14/2002Hawkeye Technology, Inc.27 Oracle Tuning Tools Explain Plan SQL Trace Session Level System Level Dynamic Performance Views V$SYSSTATV$SESSSTATV$WAITSTAT V$SGASTATV$ROLLSTATV$LATCH V$LIBRARYCACHEV$SORT_USAGEV$SQLAREA

28 06/14/2002Hawkeye Technology, Inc.28 Oracle Tuning Tools UTLBSTAT and UTLESTAT STATSPACK Oracle Enterprise Manager Performance Tool Vendors – Quest Software – Precise – ….

29 06/14/2002Hawkeye Technology, Inc.29 Contact Information Ashok Kapur Hawkeye Technology, Inc. 561-236-4204 afkapur@hawkeyetechnology.com http://www.hawkeyetechnology.com


Download ppt "Oracle Tuning Ashok Kapur Hawkeye Technology, Inc."

Similar presentations


Ads by Google