Dan Hotka Author/Instructor Oracle Ace Director.

Similar documents
Dan Hotka Author/Instructor Oracle Ace Director.

Why is my Oracle10g Database SLOWER than my Oracle9i Database? Dan Hotka Author/Speaker/Oracle Expert

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

Oracle and Toad Course Descriptions Instructor: Dan Hotka

Oracle 1Z Oracle Database 11g Performance Tuning.

Tuna Helper Proven Process for SQL Tuning. Dean Richards Senior DBA, Confio Software

Tuning SQL without the Tuning Pack. John Larkin JP Morgan Chase

Adaptive Cursor Sharing: An Introduction

Oracle Database 11g: SQL Tuning Workshop

Toad Data Point - Professional Edition. The Toad Data Point Professional edition includes the following new features and enhancements.

Using V$SQL_PLAN to get accurate execution plans

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

Quo Vadis SQLTXPLAIN

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

Oracle 9i Application Development and Tuning

Adaptive Optimization. Presented by: Kerry Osborne Red Gate Webinar, Nov. 2013

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

The Oracle Optimizer Explain the Explain Plan O R A C L E W H I T E P A P E R A P R I L

Oracle Database 12c: SQL Tuning for Developers

Oracle SQL Tuning for Developers Workshop Student Guide - Volume I

Oracle Database 11g: Performance Tuning DBA Release 2

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

<Insert Picture Here> DBA s New Best Friend: Advanced SQL Tuning Features of Oracle Database 11g

Oracle Database 11g : Performance Tuning DBA Release2

Practice Manual: How to optimize SQL statement of using DBLINK on Oracle

ORACLE TRAINING CURRICULUM. Relational Databases and Relational Database Management Systems

PERFORMANCE TUNING TRAINING IN BANGALORE

Oracle Database 11g: Performance Tuning DBA Release 2

Toad Data Point - Professional Edition. The Toad Data Point Professional edition includes the following new features and enhancements.

Oracle Database 11g: SQL Tuning Workshop. Student Guide

SQL Plan Management with Oracle Database 12c Release 2 O R A C L E W H I T E P A P E R J A N U A R Y

Tuning slow queries after an upgrade

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

Oracle Tuning Pack. Table Of Contents. 1 Introduction. 2 Installation and Configuration. 3 Documentation and Help. 4 Oracle SQL Analyze

Under the hood of dynamic and adaptive database features

October 3, 2017 Vit Spinka Chief Architect

Advanced Oracle Performance Troubleshooting. Query Transformations Randolf Geist

When should an index be used?

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

KIWANIS HOCKEY Parent Registration Information

Advanced Oracle SQL Tuning v3.0 by Tanel Poder

Avast Customer & Technical Support Policy

GROUPON VOUCHER TERMS OF SALE UK

Quest Enterprise Reporter 2.0 Report Manager USER GUIDE

Vijay Mahawar

What the SQL is Going On Out Here?

Analyze Schema Oracle 10g Syntax

Top 5 Issues that Cannot be Resolved by DBAs (other than missed bind variables)

<Insert Picture Here> Inside the Oracle Database 11g Optimizer Removing the black magic

Explaining the Explain Plan:

Relational Database Index Design and the Optimizers

<Insert Picture Here> Oracle Database 11g: Neue Features im Oracle Optimizer

HPE Education Services ESE (East and South Europe) Terms and Conditions

Oracle Application Express fast = true

The Oracle SQLT Utility. By Kevin Gilpin, Rolta TUSC Wednesday March 14, 2012

Tuning Oracle SQL with SQLTXPLAIN

i-disk Shield 2.0 Secure AES Manager User s Manual

Toad Data Point - Professional Edition

RDS Employee Access Module User Guide

IT100: Oracle Administration

Data Warehouse Tuning. Without SQL Modification

ORACLE DATA SHEET ORACLE PARTITIONING

Quest Code Tester for Oracle 3.1. Installation and Configuration Guide

E-BOOK // ORACLE 10G SQL EBOOK EBOOK

Oracle Database 12c: Program with PL/SQL Duration: 5 Days Method: Instructor-Led

IT-Tage Dezember 2016 Frankfurt am Main Maritim Hotel

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

One Identity Active Roles 7.2. Replication: Best Practices and Troubleshooting Guide

MemSQL Partner Program Guide

Version December 2011 A shareware plug-in for FrameMaker. Copyright 2011

Oracle Sql Describe Schema Query To Find Table

Oracle BI 11g R1: Build Repositories Course OR102; 5 Days, Instructor-led

Stellar Phoenix Entourage Repair

StickIt! MPU-9150 Manual. How to install and use your new StickIt! MPU-9150 Module

Table of contents 2 / 42

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

SDLC INTELLECTUAL PROPERTY POLICY

SafeNet MobilePASS+ for Android. User Guide

DataPort 250 USB 2.0 Enclosure User s Guide (800)

Stellar WAB to PST Converter 1.0

BlackBerry Java Development Environment (JDE)

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

Terms of Use. Changes. General Use.

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Sql Server Check If Global Temporary Table Exists

Legal Notice: Copyright 2013 Hitman Advertising, all rights reserved.

Elements in Webdesign WEB SITE DESIGN PROJECT CONTRACT

Entrust SSL Web Server Certificate Subscription Agreement

End User License Agreement

Installation Guide. ProView. For System Center operations Manager ProView Installation Guide. Dynamic Azure and System Center insights

Enterprise Vault Migrating Data Using the Microsoft Azure Blob Storage Migrator or later

CA Workload Automation Agent for Micro Focus

Independent consultant. Oracle ACE Director. Member of OakTable Network. Available for consulting In-house workshops. Performance Troubleshooting

SafeNet Authentication Client

One Identity Active Roles 7.2

Stellar Phoenix. Repair for SQLite 1.0 User Guide

AT&T Cloud Solutions Portal. Account and User Management Guide

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

Using Automatic Workload Repository for Database Tuning: Tips for Expert DBAs. Kurt Engeleiter Product Manager

CA ERwin Data Modeler

Transcription:

Dan Hotka Author/Instructor Oracle Ace Director

, LLC (c) www.danhotka.com LLC. Any reproduction or copying of this manual without the express written consent of www.danhotka.com LLC is expressly prohibited. Limitation on Warranty. THERE ARE NO WARRANTIES, EXPRESS OR IMPLIED, WITH RESPECT THERETO, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. PURCHASER SHALL BE SOLELY RESPONSIBLE FOR THE SELECTION, USE, EFFICIENCY AND SUITABILITY OF USE OF INFORMATION CONTAINED HEREIN TO ANY PARTICULAR APPLICATION OR PROBLEM. WWW.DANHOTKA.COM LLC SHALL HAVE NO LIABILITY THEREFOR. Limitation of Liability. IN NO EVENT SHALL WWW.DANHOTKA.COM LLC BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, WITHOUT LIMITATION, ANY DAMAGES RELATINGTO LOSS OF DATA, AND ANY INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS, ARISING OUT OF OR IN ANY WAY RELATED TO YOUR USE OF THE INFORMATION CONTAINED IN THIS MANUAL. IN THE EVENT THAT THE FORGOING IS HELD UNINFORCABLE THE PARTIES AGREE THAT WWW.DANHOTKA.COM LLC'S LIABILITY TO YOU HEREUNDER, IF ANY, SHALL IN NO EVENT EXCEED THE FEE PAID BY THE INJURED PARTY FOR THE MANUAL TO WWW.DANHOTKA.COM. LLC. Dan Hotka Author/Instructor/Oracle Expert CEO DHotka@Earthlink.net 515 279 3361 Last Updated: 1/2010

Dan is a Training Consultant Dan Hotka Oracle ACE Director Oracle ACEs and Oracle ACE Directors are known for their strong credentials as Oracle community enthusiasts and advocates, with candidates nominated by anyone in the Oracle Technology and Applications communities. www.oracle.com/technology/community/oracle_ac e/index.html Oracle Authored Expert 32 Years in IT 27 years working with Oracle 12 books hundreds of articles DanHotka.Blogspot.com I also blog on TOADWorld.com Monday Lunch n Learn Short technical webinars Register for reminders Training LiveLessons Video! Safari Books Online Got a Safari Account? Take the class self-paced www.safaribooksonline.com Purchase the class http://informit.com/hotka SQL Tuning, Intro and Adv PL/SQL, OBIEE Reports and Dashboards, Oracle SQL, and Toad Show your HR or Training Department this info! Discount codes on my website Flat Fee Training for your company: 1 Course Fee Price Price includes my portable computer lab! On-site or over the Web! Portable computer lab Training Courses Include: Oracle Advanced PL/SQL Oracle SQL Tuning TOAD Courses Oracle OBIEE Reports and Dashboards Discoverer, Intro courses, Cross training!

New Book Discounts on my website Amazon.com

Lunch n Learn Schedule Feb 9 SQL Tuning: A Close Look at Advanced Explain Plans with syntax Mar 9 Oracle12 New Features PBD Management Apr 4 Oracle12 Partitioning Features Contains Release 2 updates!

DBMS_XPLAN DBMS_XPLAN Block Mode Explain Plan Documented in PL/SQL Built-in Packages

DBMS_XPLAN Select * from table( dbms_xplan.display(format=> OUTLINE )) Use explain plan for to populate plan table Should give a list of hints used to create this explain plan select plan_table_output from table(dbms_xplan.display_cursor(format=>'allstats LAST')) Put /*+ gather_plan_statistics */ into query Shows additional statistics

DBMS_XPLAN

DBMS_XPLAN

DBMS_XPLAN Hash Join Estimates Right Order Hash Join Actuals WRONG Order!

What are Explain Plans Oracle Explain Plans Visualization of the Execution Plan Which objects Oracle will use to resolve your SQL request The order that Oracle will process the steps *** Order is VERY important *** As you will learn Lots of ways to produce these Explain Plans SQL*Plus & syntax, varioius GUI tools, Oracle traces, Enterprise Manager, and more

Tuning with SQL*Plus

Using the Tools All tools use the PLAN_TABLE Oracle9i and before: <oracle_home>/rdbms/admin/utlxpl an.sql Oracle10g+ Automatically Created PLAN_TABLE$ Public Synonym to PLAN_TABLE Oracle11+ synonym has been created IF autotrace or Explan Plan For complains create public synonym under SYS

Using the Tools Various PLAN_TABLE structures Oracle10g+ - use the PLAN_TABLE$ Older Oracle s Use script in <Oracle Home>/rdbms/admin/UTLXPLAN.sql V$SQL_PLAN Library Cache Actual SQL and Explain Plans/runtime statistics Related to V$SQL view of the library cache (stats and info) Parent Cursor Related to V$SQLAREA where actual SQL stats and cursor areas are ( the data sets) Child Cursor(s)

Using the Tools AWR stores SQL and SQL explain plans 7 days worth! Use DBA_HIST_SQLTEXT to get SQL_ID and DBMS_XPLAN.Display to get Explain Plans

Using the Tools To see the bind variables V$SQL_BIND_CAPTURE Locate correct bind info using SQL_ID Important Fields: Name Position Datatype_string Value_string

Using the Tools Bind Variables Discussed Oracle11+ Adaptive Cursor Sharing SQL with bind variables Data is skewed Performs poorly then Oracle looks at Histogram on the database column associated with the bind variable Produces additional child cursors

Using the Tools Bind Variable continued TO insure quick execution every time WHEN you know the data is skewed Program in fake hints Hints don t get stripped during hard parse comments do /*+ Small */ for bind variable content with low row count /*+ Large */ for bind variable content with high row count You will have to submit one or the other based on data knowledge Maybe difficult to do but this would work

Active SQL Active SQL Shows current executing SQL! Why is my system slow? Works with any Oracle Cloud/remote/onsite No extra Oracle licensing Works great on Standard Edition Oracle Displays advanced Explain Plans Bind Variable content Oracle12 Adaptive Plans Extension of existing free SQL Tuner tool Cost Effective

10053 Trace 10053 Cost-Base Optimizer Trace Shows how Oracle arrived at Explain Plan Contains: SQL Init.ora parameters Legends (useful information) Considered Joins/Predicate processing Explain Plan Shows Outline (hints to get same explain plan) Optimizer Environment Key Statistics associated with this SQL

What have we learned? What have we learned? Useful Oracle knowledge Slides and link to this presentation Tell your friends/see you next week! Thank you! Keep in touch See you next week Remember me for your training needs