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

Similar documents
How to Troubleshoot Databases and Exadata Using Oracle Log Analytics

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

OpenWorld 2018 SQL Tuning Tips for Cloud Administrators

Oracle Enterprise Manager 12c IBM DB2 Database Plug-in

Oracle Enterprise Manager 12c Sybase ASE Database Plug-in

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

What is Real Application Testing?

Moving Databases to Oracle Cloud: Performance Best Practices

Oracle Database 10g The Self-Managing Database

Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12

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

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

Managing Oracle Database 12c with Oracle Enterprise Manager 12c

Oracle Database 12c: Performance Management and Tuning

<Insert Picture Here> Maximizing Database Performance: Performance Tuning with DB Time

Oracle Database 11g: Real Application Testing & Manageability Overview

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved. reserved. Insert Information Protection Policy Classification from Slide 8

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

SQL Tuning for Expert DBAs

Oracle Database 12c Performance Management and Tuning

Oracle Diagnostics Pack For Oracle Database

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

Katharina Römer Principal Sales Consultant STCC Stuttgart ORACLE Deutschland GmbH

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

Oracle Database 18c and Autonomous Database

Session 1079: Using Real Application Testing to Successfully Migrate to Exadata - Best Practices and Customer Case Studies

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

Monitoring & Tuning Azure SQL Database

RAC Performance Monitoring and Diagnosis using Oracle Enterprise Manager. Kai Yu Senior System Engineer Dell Oracle Solutions Engineering

<Insert Picture Here> Managing Oracle Exadata Database Machine with Oracle Enterprise Manager 11g

Oralogic Education Systems

1Z Oracle Database Performance and Tuning Essentials 2015 Exam Summary Syllabus Questions

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

Demystifying SQL Tuning: Tips and Techniques for SQL Experts

Optimize Your Databases Using Foglight for Oracle s Performance Investigator

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

The Oracle Trust Fabric Securing the Cloud Journey

Real-World Performance Training Core Database Performance

Trouble-free Upgrade to Oracle Database 12c with Real Application Testing

Storage Monitoring Made Easy for DBAs: Diagnosing Performance Problems. Senior Product Manager Consulting Member of Technical Staff

Oracle Database 11g: SQL Tuning Workshop

WHITE PAPER Application Performance Management. Managing the Performance of DB2 Environments

Manage Change With Confidence: Upgrading to Oracle Database 11g with Oracle Real Application Testing

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

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

Tuning slow queries after an upgrade

Oracle Cloud Using Oracle IT Analytics

In the Oracle Database 12c: Performance Management and

Security Compliance and Data Governance: Dual problems, single solution CON8015

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

DBAs can use Oracle Application Express? Why?

Oracle Database 11g: Performance Tuning DBA Release 2

Take Your Oracle WebLogic Applications to The Next Level with Oracle Enterprise Manager 12c

Database Performance Analysis Techniques Using Metric Extensions and SPA

Oracle Autonomous Database

1 Dulcian, Inc., 2001 All rights reserved. Oracle9i Data Warehouse Review. Agenda

Goliath Technology Overview with MEDITECH Module

Oracle Database 11g: Performance Tuning DBA Release 2

Optimizing SQL Transactions

ORACLE DIAGNOSTICS PACK

Best Practices for Performance Part 2.NET and Oracle Database

Database Level 100. Rohit Rahi November Copyright 2018, Oracle and/or its affiliates. All rights reserved.

Enterprise Manager: Scalable Oracle Management

State of the Dolphin Developing new Apps in MySQL 8

Optimizing Infrastructure Management with Predictive Analytics: The Red Hat Insights Approach

An Oracle White Paper June Managing Oracle Exadata with Oracle Enterprise Manager 12c

<Insert Picture Here>

Table of Contents HOL-PRT-1463

Successful Upgrade Secrets: Preventing Performance Problems with Database Replay

Oracle Machine Learning Notebook

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

Brocade Network Advisor

Oracle Database 11g: Manageability Overview. An Oracle White Paper August 2007

Oracle Database 10g: New Features for Administrators Release 2

Javaentwicklung in der Oracle Cloud

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

Oracle WebCenter Portal Performance Tuning

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

Reinventing Upgrades, Platform Changes, RAC and More with Database Replay

DEFINING SECURITY FOR TODAY S CLOUD ENVIRONMENTS. Security Without Compromise

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

Oracle and.net: Best Practices for Performance. Christian Shay & Alex Keh Product Managers Oracle October 28, 2015

Performance Problems

Oracle Application Express fast = true

Toad for Oracle Suite 2017 Functional Matrix

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

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

ORACLE ENTERPRISE MANAGER 10g ORACLE DIAGNOSTICS PACK FOR NON-ORACLE MIDDLEWARE

VMware vrealize Operations. Management Pack for. PostgreSQL

Building Highly Available and Scalable Real- Time Services with MySQL Cluster

Private Cloud Management Manage and Operate Applications

Oracle Enterprise Manager Configuration Management Unleashed: Top 10 Expert Tips

<Insert Picture Here> MySQL Web Reference Architectures Building Massively Scalable Web Infrastructure

APPLICATION PERFORMANCE MANAGEMENT VERITAS i 3 FOR SAP

Oracle Database B

Configuration changes such as conversion from a single instance to RAC, ASM, etc.

(10393) Database Performance Tuning Hands-On Lab

The Power of the Crowd

CONFIDENTLY INTEGRATE VMWARE CLOUD ON AWS WITH INTELLIGENT OPERATIONS

Oracle Solaris 10 Recommended Patching Strategy

Transcription:

Beyond SQL Tuning: Insider's Guide to Maximizing SQL Performance Monday, Oct 22 10:30 a.m. - 11:15 a.m. Marriott Marquis (Golden Gate Level) - Golden Gate A Ashish Agrawal Group Product Manager Oracle Management Cloud Oracle Corporation OCT 22, 2018

Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, timing, and pricing of any features or functionality described for Oracle s products may change and remains at the sole discretion of Oracle Corporation.

Beyond SQL Tuning: Insider's Guide to Maximizing SQL Performance Automatic Workload Repository (AWR), Active Session History (ASH) and SQL monitoring hold a wealth of SQL performance data. SQL Analytics leverages the rich SQL data in AWR, ASH, and SQL monitoring data using purpose-built machine learning to provide unique insights into SQL performance problems for your enterprise databases running on premise or on cloud. In this session learn to recognize patterns of SQL performance issues across all your Oracle Databases; perform a historical, comparative analysis to find any SQL bottlenecks or plan regression; and identify SQL performance anomalies and their root causes

Program Agenda 1 2 3 4 5 Challenges for DBA in managing DB and SQL Performance DB and SQL - Diagnostics and Tuning Advanced Database and SQL Analytics Remediation Oracle Autonomous Database

Program Agenda 1 2 3 4 5 Challenges for DBA in managing DB and SQL Performance DB and SQL - Diagnostics and Tuning Advanced Database and SQL Analytics Remediation Oracle Autonomous Database

Challenges for DBA in managing DB and SQL Performance Find problem DB and SQL when DBAs are responsible for large number of databases Current tools focus on monitoring and diagnostics of one DB at a time Which DB and SQL is in most need of their attention in future? Being always reactive, how can a DBA be more proactive? Data collection and analysis needed Out of the box answers missing

Challenges for DBA in managing DB and SQL Performance Difficult to identify trends and patterns in DB and SQL performance Very little long term DB and SQL history Limited advanced analytics capabilities like correlation, trending Difficult to compare performance between production and staging DB

Program Agenda 1 2 3 4 5 Challenges for DBA in managing DB and SQL Performance DB and SQL - Diagnostics and Tuning Advanced Database and SQL Analytics Remediation Oracle Autonomous Database

Which Database Performance Diagnostics Tool to Use? Automatic Workload Repository AWR Reports Reports about performance and workload data from AWR Active Session History ASH Gathers fine-grain data about every active database session every second Automatic Database Diagnostics Monitor - ADDM Data Analysis and Problem Identification Findings and Advise on how best to resolve bottlenecks Real-time SQL and Database Operations Monitoring Provides in-depth diagnostics about SQL execution at row source level

Reactive Performance Management Unfortunately we are not always in control Use Oracle Enterprise Manager to deal with production issues Issue EM solution Analyzing transient performance problems ASH Analytics Diagnose persistent performance issues ADDM In-depth SQL performance analysis Real-Time SQL Monitoring Optimizing top SQL s with sub-optimal plans SQL Tuning Advisor

Program Agenda 1 2 3 4 5 Challenges for DBA in managing DB and SQL Performance DB and SQL - Diagnostics and Tuning Advanced Database and SQL Analytics Remediation Oracle Autonomous Database

Database Performance Analytics Collects performance metrics, AWR & ASH data Provides insights by running analytics on this data Stores 13 months worth of selective, aggregated AWR and ASH data Supports Oracle EE, Oracle SE, MySQL and MS SQL Server

Database Performance Analytics use cases: Out of the box answers Databases gradually degrading in performance Databases with unpredictable performance Inefficient databases not taking advantage of compute resources Automatic performance analysis of databases across enterprise

SQL Analytics: SQL Warehouse SQL warehouse collects SQL performance data ASH data aggregates, samples SQLSTATs SQL Text SQL execution Plan hash value Automatic performance analysis of SQLs consuming more than 1% Database Time Scalable for 1000 s of databases Drill down into a set of SQL/ individual SQL to narrow down cause of a trend or an anomaly Supports Oracle Enterprise Edition with Diagnostics Pack

SQL Analytics use cases: Out of the box answers Identify SQLs with performance degradation, unpredictable performance, inefficient SQLs and changing execution plans Identify Top SQLs by resource usage Compare SQL performance across databases (production vs. staging) SQL Performance Insights

OMC Architecture With Gateway and OEM Integration REST APIs APM Agent Cloud Agent HTTPS (3872,1830-1839) HTTPS (3872,1830-1839) Gateway HTTPS (3872,1830-1839) HTTPS (443) Corporate Proxy (optional) HTTPS (443) End User OEM Repository SSH SQL Data Collector Corporate Firewall End User 16

Identify problem DBs that needs attention Performance Degradation - Identify databases whose performance has degraded over time and is correlated with change in demand - Identify negative correlations between performance trends and demand Variable Performance - Symptomatic of unpredictable workload and application response times - Identify databases with high degree of variance in SQL response time Database Inefficiency - Database workloads where large % of the database time in spent in application waits (not on CPU or I/O) - Not taking advantage of compute resources - For example enq: TX row lock contention, library cache lock

Databases with performance degradation Analyzing Demand with Database Time Demand = Executions and Activity = Database Time Linear regression technique used to analyze Activity and Demand Database Degradation with decrease in demand Database Degradation without change in demand Change in Response Time Change in Demand > + 20% < -10 % > +20% Between -10 % and +10%

Databases with unpredictable performance Applications workloads needs very stable and predictable Response Times Important to focus on DBs with unpredictable performance Relative variability of SQL = stdev(sql Response Time) / avg(sql Response Time) Variant SQL when relative variability > 1.66 To calculate the % of workload caused by variant SQL: For each db{ 1) Calculate which SQLs are variant over the time period 2) Calculate the elapsed time for each variant SQL 3) Variant workload performance = sum( step 2) / total elapsed time on db}

Inefficient databases not taking advantage of compute resources Inefficient wait time is in Active Sessions which are not part of CPU Time, IO wait Time and idle wait events Examples of inefficient waits are library cache lock, enqueue waits etc Inefficient (%) = inefficient wait time / IO + CPU + inefficient wait time Increasingly inefficient among the most inefficient databases = DBs with inefficient (%) > 50 % and inefficiency (%) increasing over time

Inefficient databases not taking advantage of compute resources View and compare the breakdown of inefficient waits, CPU and IO wait Check estimated database performance that can be gained by eliminating inefficient waits Focus on increasingly inefficient databases This databases and workloads represent the best tuning opportunity, so that the application can perform even better

Identify problem SQLs and SQL Performance Insights that needs attention Degrading SQL Response Time increases by more than 20% by linear regression Variant (unpredictable) SQLs Relative variability > 1.66 Inefficient SQL SQL with inefficiency > 20% by linear regression SQLs with execution plan changes Execution plan hash value of the SQL changes Top SQLs by resource usage SQL Performance Insights Consumes a disproportionate amount of system resources Commonality and unique findings across enterprise wide SQL performance issues

Identify degrading SQLs Identifies SQLs that were good but now turned bad Is the degradation due to same workload or change in magnitude of same workload Provides fine grained details of an individual SQL for a particular database Execution plan hash values can help identify cause of degradation - Increase in execution time with same plan or different plan Look up for same SQL across multiple databases and find out if it s system wide regression or limited to a database

Identify variant (unpredictable) SQLs Identify SQLs whose Response Time is unpredictable and varying Identify the nature of degradation - slowly building vs sudden change vs cyclic pattern Recommended to focus on this SQL to get more predicable workload performance Relative variability SQL Response Time 0 and < than 1.66 Predictable and stable > than 1.66 Unpredictable > than 3.0 Highly unpredictable

Identify inefficient SQLs Identify SQLs that are cause of a particular inefficiency - Example lock waits caused by row level locking or explicit lock commands Waits are application related Individual SQL level inefficiency Trend inefficiencies issues at SQL level Reducing inefficient waits will result in improved SQL performance - Increasing hardware resources or power will typically have limited impact on performance and improving efficiency - Improving application code and logic is required to make the application more efficient

Identify SQLs with execution plan changes Fast running queries may turn slow if the new execution plan is bad SQL query changing plans frequently may be variant in performance Identifies SQLs with changing execution plans by tracking execution plan hash values Stale/Missing statistics Overly general statistics or incorrect histograms Improper optimizer configuration Upgraded database: new optimizer Changing statistics (refresh) Changing data (plans do not scale with data) Bind-sensitive SQL with bind peeking Not parallelized (no scaling to large data) Improperly parallelized (skews, RAC, etc.)

Identify Top SQLs by resource usage Causes a large impact on database performance Identify high-load SQL using Top SQLs by CPU and IO across the enterprise wide DB s Identify SQLs which have the highest growth in CPU and IO usage using color key Group by various dimensions Active Sessions, Executions/Hour, Average Response Time. I/O Time, CPU Time

SQL Performance Insights Clustering to see commonality across enterprise wide SQL performance issues 14 of the 23 degrading SQLs have increasing I/O Time above 50% 6 of the 8 variant SQLs have plan changes 22 of the 51 degrading SQLs have increasing CPU Time above 50% Statistical analysis to find issues with more impact n sqls that contribute to 80% of dbtime Automatic baselines and anomaly detection for individual SQL Histogram of SQL execution Response Time

Compare SQL performance across databases (production vs. development) Compare SQL performance trend across databases for the same SQL by - Average Response Time, Executions Per Hour, I/O Time, CPU Time Compare SQL performance trend across execution plan hash value for the same SQL within the same database by - Average Response Time, Executions Per Hour, I/O Time, CPU Time Helps to identify SQL A degrading in production but not in staging DB Compare execution plan hash value A before upgrade of DB to execution plan hash value B after upgrade

Program Agenda 1 2 3 4 5 Challenges for DBA in managing DB and SQL Performance DB and SQL - Diagnostics and Tuning Advanced Database and SQL Analytics Remediation Oracle Autonomous Database

Remediation There is no one-size-fits-all Degrading SQL Response Time increases by more than 20% by linear regression SQL Tuning Advisor SQL Access Advisor Variant (unpredictable) SQLs Relative variability > 1.66 Database, OS, storage tuning SQL Plan Management Inefficient SQL SQL with inefficiency > 20% by linear regression Application Tuning SQLs with execution plan changes Execution plan hash value of the SQL changes SQL Plan Management Top SQLs by resource usage Consumes a disproportionate amount of system resources SQL Tuning Advisor SQL Access Advisor

Program Agenda 1 2 3 4 5 Challenges for DBA in managing DB and SQL Performance DB and SQL - Diagnostics and Tuning Advanced Database and SQL Analytics Remediation Oracle Autonomous Database

Oracle Autonomous Database Autonomous DB will automate most tasks for the infrastructure DBA App DBA still needs to monitor, diagnose and perform basic app-level administrative operations OMC provides management capabilities for these operations Deep performance diagnostics and troubleshooting Cross tier application diagnostics Performance analytics - trending and utilization analytics based on historical data Move Analyze Monitor Manage Diagnose

Cross-tier Application Diagnostics What s Really Happening in the Application? Challenge DBAs have no visibility on how the applications have been written Need for a common source of information and context that can be used by both application support and DBA teams (Devops) Solution Complete visibility of application performance, from the app to the database Rapidly identify the root cause of slowdowns for both application and database tiers Deep visibility into SQL execution, resource consumption and DB Time to help devops rapidly identify the root cause of application bottlenecks

Cross-tier Application Diagnostics: APM Integration

Cross-tier Application Diagnostics: App to SQL drill-down

Analyze: Performance Analytics Why: Poorly written applications will not perform efficiently even in Autonomous DB Solution: Database Performance Analytics Analyze Autonomous Database workloads to identify inefficiency caused by high waits and SQL performance variability Solution: SQL Analytics Drill down to SQLs contributing to high inefficiency and determine root cause of inefficiency

Conclusion Database and SQL Performance Analytics across enterprise Rapid time to value and lower operating costs Provides trends and key insights to SQL performance problems Helps you to be proactive in future problem avoidance Maximize database and SQL performance Increase business productivity by analyzing and remediating enterprise wide causes of database and SQL performance problems

Oracle Management Cloud END USER EXPERIENCE / ACTIVITY APPLICATION MIDDLE TIER DATA TIER VIRTUALIZATION TIER INFRASTRUCTURE TIER Global threat feeds Cloud access Identity Real users Synthetic users App metrics Transactions Server metrics Diagnostics logs Host metrics VM metrics Container metrics Configuration Compliance Tickets & Alerts Security & Network events Infrastructure Monitoring Log Analytics Configuration & Compliance Application Performance Monitoring Security Monitoring & Analytics Unified SaaS Platform Orchestration IT Analytics Comprehensive, Intelligent Management Platform Zero-effort Operational Insights Automated Preventative & Corrective Actions

Q & A feel free to ask 43