Performance Tuning Compiled from: Oracle Database Administration, Session 13, Performance, Harvard U Oracle Server Tuning Accelerator, David Scott, Intec.

Slides:



Advertisements
Similar presentations
Oracle Enterprise Manager Grid Control: Day in the Life of An Admin Wilson N. López – Solution Specialist.
Advertisements

1 CS 5226: Database Administration and Performance Tuning.
Database Tuning Principles, Experiments and Troubleshooting Techniques Baseado nos slides do tutorial com o mesmo nome da autoria de: Dennis Shasha
Advanced Oracle DB tuning Performance can be defined in very different ways (OLTP versus DSS) Specific goals and targets must be set => clear recognition.
Tuning: overview Rewrite SQL (Leccotech)Leccotech Create Index Redefine Main memory structures (SGA in Oracle) Change the Block Size Materialized Views,
Presented By Akin S Walter-Johnson Ms Principal PeerLabs, Inc
Copyright © SoftTree Technologies, Inc. DB Tuning Expert.
Oracle Server Tuning Accelerator David Scott Intec.
SQL Tuning Briefing Null is not equal to null but null is null.
Chapter 9. Performance Management Enterprise wide endeavor Research and ascertain all performance problems – not just DBMS Five factors influence DB performance.
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Database Performance Tuning and Query Optimization
new database engine component fully integrated into SQL Server 2014 optimized for OLTP workloads accessing memory resident data achive improvements.
1 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
The State of the Art in Distributed Query Processing by Donald Kossmann Presented by Chris Gianfrancesco.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Performance And Tuning – Lecture 7 Copyright System Managers LLC 2007 all rights reserved.
© 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 1 IT390 Business Database Administration Unit 10:
MIS DATABASE SYSTEMS, DATA WAREHOUSES, AND DATA MARTS MBNA
Introduction to Structured Query Language (SQL)
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 11 Database Performance Tuning and Query Optimization.
Introduction to Structured Query Language (SQL)
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Conceptual Architecture of PostgreSQL PopSQL Andrew Heard, Daniel Basilio, Eril Berkok, Julia Canella, Mark Fischer, Misiu Godfrey.
Mark Harmsworth – Architecture Nate Bruneau – Engineering Scott Kleven – Program Management Microsoft Corporation SESSION CODE: OSP321.
MIS DATABASE SYSTEMS, DATA WAREHOUSES, AND DATA MARTS MBNA ebay
Introduction Optimizing Application Performance with Pinpoint Accuracy What every IT Executive, Administrator & Developer Needs to Know.
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.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 7 INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL) Instructor Ms. Arwa.
Oracle Database Administration Lecture 6 Indexes, Optimizer, Hints.
© Pearson Education Limited, Chapter 16 Physical Database Design – Step 7 (Monitor and Tune the Operational System) Transparencies.
March 19981© Dennis Adams Associates Tuning Oracle: Key Considerations Dennis Adams 25 March 1998.
MySQL. Dept. of Computing Science, University of Aberdeen2 In this lecture you will learn The main subsystems in MySQL architecture The different storage.
Database Management 9. course. Execution of queries.
Computer Science 101 Database Concepts. Database Collection of related data Models real world “universe” Reflects changes Specific purposes and audience.
Administration and Monitoring the Database Oracle 10g.
1099 Why Use InterBase? Bill Todd The Database Group, Inc.
Oracle Tuning Ashok Kapur Hawkeye Technology, Inc.
Query Processing. Steps in Query Processing Validate and translate the query –Good syntax. –All referenced relations exist. –Translate the SQL to relational.
11-1 Improve response time of interactive programs. Improve batch throughput. To ensure scalability of applications load vs. performance. Reduce system.
DBMS Implementation Chapter 6.4 V3.0 Napier University Dr Gordon Russell.
Module 10 Administering and Configuring SharePoint Search.
6 1 Lecture 8: Introduction to Structured Query Language (SQL) J. S. Chou, P.E., Ph.D.
1 Chapter 10 Joins and Subqueries. 2 Joins & Subqueries Joins – Methods to combine data from multiple tables – Optimizer information can be limited based.
8 1 Chapter 8 Advanced SQL Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Sofia, Bulgaria | 9-10 October The Query Governor Richard Campbell Stephen Forte Richard Campbell Stephen Forte.
SQL/Lesson 7/Slide 1 of 32 Implementing Indexes Objectives In this lesson, you will learn to: * Create a clustered index * Create a nonclustered index.
Query Optimization CMPE 226 Database Systems By, Arjun Gangisetty
1 Copyright © 2005, Oracle. All rights reserved. Following a Tuning Methodology.
A Guide to SQL, Eighth Edition Chapter Six Updating Data.
5 Copyright © 2008, Oracle. All rights reserved. Testing and Validating a Repository.
Chapter 13: Query Processing
Database Systems, 8 th Edition SQL Performance Tuning Evaluated from client perspective –Most current relational DBMSs perform automatic query optimization.
SQL Server Statistics DEMO SQL Server Statistics SREENI JULAKANTI,MCTS.MCITP,MCP. SQL SERVER Database Administration.
CS4432: Database Systems II Query Processing- Part 1 1.
Troubleshooting Dennis Shasha and Philippe Bonnet, 2013.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
Retele de senzori Curs 1 - 1st edition UNIVERSITATEA „ TRANSILVANIA ” DIN BRAŞOV FACULTATEA DE INGINERIE ELECTRICĂ ŞI ŞTIINŢA CALCULATOARELOR.
Query Processing and Optimization, and Database Tuning
Data Virtualization Demoette… Packaged Query Single Select Option
Advanced QlikView Performance Tuning Techniques
Database Performance Tuning &
SQL Server Monitoring Overview
Software Architecture in Practice
Database Performance Tuning and Query Optimization
Database.
Query Processing CSD305 Advanced Databases.
Chapter 11 Database Performance Tuning and Query Optimization
Query Processing.
Performance Tuning ETL Process
Presentation transcript:

Performance Tuning Compiled from: Oracle Database Administration, Session 13, Performance, Harvard U Oracle Server Tuning Accelerator, David Scott, Intec

Case Study #1 Define the BUSINESS problem Define the BUSINESS problem –The GUI is too slow; a loss in productivity $$$ Measure the pain Measure the pain –Screen XYZ in the GUI takes 47 seconds –3000 users use this screen at each login –Most other screens are fine Identify the problem component Identify the problem component –Stopwatch timing of XYZ response is 47 seconds –Same SQL query takes 47 seconds –Query identified as culprit

Case Study #1 (contd) Find the root cause Find the root cause –Inefficient query Investigate and weigh solutions Investigate and weigh solutions –Multiple versions of query compared –Results must match original Fix the problem Fix the problem –Replace query in Screen XYZ with tuned version Measure the results Measure the results –Query returns in 2 seconds –ROI: 3000 users * 45 seconds saved * Avg $10/hour * 260 business days/year = $97,500

Performance Tuning Trade-offs Between Response Time and Throughput Trade-offs Between Response Time and Throughput Goals for tuning vary, depending on the needs of the application Goals for tuning vary, depending on the needs of the application –OLTP vs. OLAP applications (which one requires which performance?)

Performance Definition Response time = service time + wait time Response time = service time + wait time We can increase performance two ways: We can increase performance two ways: –by reducing service time –by reducing wait time

Performance Definition System throughput equals the amount of work accomplished in a given amount of time System throughput equals the amount of work accomplished in a given amount of time Two techniques of increasing throughput exist Two techniques of increasing throughput exist –Get more work done with the same resources (reduce service time) –Get the work done quicker by reducing overall response time (reduce wait time)

Performance Definition The service time for a task may stay the same, but wait time increases as contention increases The service time for a task may stay the same, but wait time increases as contention increases If many users are waiting for a service that takes 1 second, then the tenth user must wait 9 seconds for a service that takes 1 second If many users are waiting for a service that takes 1 second, then the tenth user must wait 9 seconds for a service that takes 1 second

Wheres the Wait? Client Application Network Disk CPU Database

Critical Resources Resources such as CPUs, memory, I/O capacity, and network bandwidth are key to reducing service time Resources such as CPUs, memory, I/O capacity, and network bandwidth are key to reducing service time Adding resources can give higher throughput and swifter response times Adding resources can give higher throughput and swifter response times

SQL Processing Architecture

Parser The parser performs two functions: The parser performs two functions: –Syntax analysis: This checks SQL statements for correct syntax –Semantic analysis: Checks that the current database objects and object attributes are correct

Optimizer The optimizer is the heart of the SQL processing engine. The Oracle server provides two methods of optimization: rule-based optimizer (RBO) and cost- based optimizer (CBO). The optimizer is the heart of the SQL processing engine. The Oracle server provides two methods of optimization: rule-based optimizer (RBO) and cost- based optimizer (CBO). Note: As of Oracle 10g, RBO is no longer supported. Note: As of Oracle 10g, RBO is no longer supported.

Row Source Generator The row source generator receives the optimal plan from the optimizer The row source generator receives the optimal plan from the optimizer It outputs the execution plan for the SQL statement It outputs the execution plan for the SQL statement A set of rows returned by an execution step is called a row source A set of rows returned by an execution step is called a row source The execution plan is a collection of row sources, structured in the form of a tree The execution plan is a collection of row sources, structured in the form of a tree

SQL Execution The combination of steps required to execute a statement is called an execution plan The combination of steps required to execute a statement is called an execution plan An execution plan includes an access method for each table that the statement accesses and an ordering of the tables (the join order) An execution plan includes an access method for each table that the statement accesses and an ordering of the tables (the join order)

Example 1 How will the following SQL statement be processed? How will the following SQL statement be processed? –SELECT * –FROM BLLIM.Project; Does it matter if an index exists? Does it matter if an index exists?

Example 2 How will the following SQL statement be processed? How will the following SQL statement be processed? –SELECT * –FROM BLLIM.Project –WHERE status = C; // C for complete Does it matter if an index exists? Does it matter if an index exists?

Example 3 How will the following SQL statement be processed? How will the following SQL statement be processed? –SELECT * –FROM BLLIM.Project –WHERE status = C; // C for complete Does it matter if an index exists? Does it matter if an index exists? What if the distribution of status is the following (skewed)? What if the distribution of status is the following (skewed)? –70 projects have C, 10 have I, and 20 have A

Example 4 How will the following SQL statement be processed? How will the following SQL statement be processed? –SELECT pjTitle –FROM BLLIM.Project –WHERE status = C; // C for complete Does it matter if an index exists? Does it matter if an index exists? Assume that you have an index for status and another one for pjTitle. Assume that you have an index for status and another one for pjTitle.