SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Downloaden Sie, um offline zu lesen
Performance TuningPerformance Tuning
Compiled from:Compiled from:
Oracle Database Administration, Session 13, Performance, Harvard UOracle Database Administration, Session 13, Performance, Harvard U
Oracle Server Tuning Accelerator, David Scott, IntecOracle Server Tuning Accelerator, David Scott, Intec
Case Study #1Case Study #1
• Define the BUSINESS problemDefine the BUSINESS problem
– The GUI is too slow; a loss in productivity $$$The GUI is too slow; a loss in productivity $$$
• Measure the painMeasure the pain
– Screen XYZ in the GUI takes 47 secondsScreen XYZ in the GUI takes 47 seconds
– 3000 users use this screen at each login3000 users use this screen at each login
– Most other screens are fineMost other screens are fine
• Identify the problem componentIdentify the problem component
– Stopwatch timing of XYZ response is 47 secondsStopwatch timing of XYZ response is 47 seconds
– Same SQL query takes 47 secondsSame SQL query takes 47 seconds
– Query identified as culpritQuery identified as culprit
Case Study #1 (cont’d)Case Study #1 (cont’d)
• Find the root causeFind the root cause
– Inefficient queryInefficient query
• Investigate and weigh solutionsInvestigate and weigh solutions
– Multiple versions of query comparedMultiple versions of query compared
– Results must match originalResults must match original
• Fix the problemFix the problem
– Replace query in Screen XYZ with tuned versionReplace query in Screen XYZ with tuned version
• Measure the resultsMeasure the results
– Query returns in 2 secondsQuery returns in 2 seconds
– ROI: 3000 users * 45 seconds saved * Avg salary @ROI: 3000 users * 45 seconds saved * Avg salary @
$10/hour * 260 business days/year =$10/hour * 260 business days/year = $97,500$97,500
Performance TuningPerformance Tuning
• Trade-offs Between Response Time andTrade-offs Between Response Time and
ThroughputThroughput
• Goals for tuning vary, depending on theGoals for tuning vary, depending on the
needs of the applicationneeds of the application
– OLTP vs. OLAP applications (which oneOLTP vs. OLAP applications (which one
requires which performance?)requires which performance?)
Performance DefinitionPerformance Definition
• Response time = service time + waitResponse time = service time + wait
timetime
• We can increase performance two ways:We can increase performance two ways:
– by reducing service timeby reducing service time
– by reducing wait timeby reducing wait time
Performance DefinitionPerformance Definition
• System throughput equals the amount ofSystem throughput equals the amount of
work accomplished in a given amount ofwork accomplished in a given amount of
timetime
• Two techniques of increasing throughputTwo techniques of increasing throughput
existexist
– Get more work done with the same resourcesGet more work done with the same resources
((reduce service timereduce service time))
– Get the work done quicker by reducing overallGet the work done quicker by reducing overall
response time (response time (reduce wait timereduce wait time))
Performance DefinitionPerformance Definition
• The service time for a task may stay theThe service time for a task may stay the
same, but wait time increases assame, but wait time increases as
contention increasescontention increases
• If many users are waiting for a service thatIf many users are waiting for a service that
takes 1 second, then the tenth user musttakes 1 second, then the tenth user must
wait 9 seconds for a service that takes 1wait 9 seconds for a service that takes 1
secondsecond
Where’s the Wait?Where’s the Wait?
Client
Application Network
Disk
CPU
Database
Critical ResourcesCritical Resources
• Resources such as CPUs, memory, I/OResources such as CPUs, memory, I/O
capacity, and network bandwidth are keycapacity, and network bandwidth are key
to reducing service timeto reducing service time
• Adding resourcesAdding resources cancan give highergive higher
throughput and swifter response timesthroughput and swifter response times
SQL Processing ArchitectureSQL Processing Architecture
ParserParser
• The parser performs two functions:The parser performs two functions:
– Syntax analysisSyntax analysis: This checks SQL statements: This checks SQL statements
for correct syntaxfor correct syntax
– Semantic analysisSemantic analysis: Checks that the current: Checks that the current
database objects and object attributes aredatabase objects and object attributes are
correctcorrect
OptimizerOptimizer
• The optimizer is the heart of the SQLThe optimizer is the heart of the SQL
processing engine. The Oracle serverprocessing engine. The Oracle server
provides two methods of optimization:provides two methods of optimization:
rule-based optimizer (RBO) and cost-rule-based optimizer (RBO) and cost-
based optimizer (CBO).based optimizer (CBO).
• Note: As of Oracle 10g, RBO is no longerNote: As of Oracle 10g, RBO is no longer
supported.supported.
Row Source GeneratorRow Source Generator
• The row source generator receives theThe row source generator receives the
optimal plan from the optimizeroptimal plan from the optimizer
• It outputs the execution plan for the SQLIt outputs the execution plan for the SQL
statementstatement
• A set of rows returned by an executionA set of rows returned by an execution
step is called astep is called a row sourcerow source
• The execution plan is a collection of rowThe execution plan is a collection of row
sources, structured in the form of a treesources, structured in the form of a tree
SQL ExecutionSQL Execution
• The combination of steps required toThe combination of steps required to
execute a statement is called anexecute a statement is called an
execution planexecution plan
• An execution plan includes an accessAn execution plan includes an access
method for each table that the statementmethod for each table that the statement
accesses and an ordering of the tablesaccesses and an ordering of the tables
(the join order)(the join order)
Example 1Example 1
• How will the following SQL statement beHow will the following SQL statement be
processed?processed?
– SELECT *SELECT *
– FROM BLLIM.Project;FROM BLLIM.Project;
• Does it matter if an index exists?Does it matter if an index exists?
Example 2Example 2
• How will the following SQL statement beHow will the following SQL statement be
processed?processed?
– SELECT *SELECT *
– FROM BLLIM.ProjectFROM BLLIM.Project
– WHERE status = ‘C’; // ‘C’ for completeWHERE status = ‘C’; // ‘C’ for complete
• Does it matter if an index exists?Does it matter if an index exists?
Example 3Example 3
• How will the following SQL statement beHow will the following SQL statement be
processed?processed?
– SELECT *SELECT *
– FROM BLLIM.ProjectFROM BLLIM.Project
– WHERE status = ‘C’; // ‘C’ for completeWHERE 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 followingWhat if the distribution of status is the following
(skewed)?(skewed)?
– 70 projects have ‘C’, 10 have ‘I’, and 20 have ‘A’70 projects have ‘C’, 10 have ‘I’, and 20 have ‘A’
Example 4Example 4
• How will the following SQL statement beHow will the following SQL statement be
processed?processed?
– SELECT pjTitleSELECT pjTitle
– FROM BLLIM.ProjectFROM BLLIM.Project
– WHERE status = ‘C’; // ‘C’ for completeWHERE 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 andAssume that you have an index for status and
another one for pjTitle.another one for pjTitle.

Más contenido relacionado

Was ist angesagt?

Creating a Benchmarking Infrastructure That Just Works
Creating a Benchmarking Infrastructure That Just WorksCreating a Benchmarking Infrastructure That Just Works
Creating a Benchmarking Infrastructure That Just WorksTim Callaghan
 
Why is my_oracle_e-biz_database_slow_a_million_dollar_question
Why is my_oracle_e-biz_database_slow_a_million_dollar_questionWhy is my_oracle_e-biz_database_slow_a_million_dollar_question
Why is my_oracle_e-biz_database_slow_a_million_dollar_questionAjith Narayanan
 
Beyond unit tests: Deployment and testing for Hadoop/Spark workflows
Beyond unit tests: Deployment and testing for Hadoop/Spark workflowsBeyond unit tests: Deployment and testing for Hadoop/Spark workflows
Beyond unit tests: Deployment and testing for Hadoop/Spark workflowsDataWorks Summit
 
Fail-Safe Cluster for FirebirdSQL and something more
Fail-Safe Cluster for FirebirdSQL and something moreFail-Safe Cluster for FirebirdSQL and something more
Fail-Safe Cluster for FirebirdSQL and something moreAlexey Kovyazin
 
Analyze database system using a 3 d method
Analyze database system using a 3 d methodAnalyze database system using a 3 d method
Analyze database system using a 3 d methodAjith Narayanan
 
Oracle Performance Tools of the Trade
Oracle Performance Tools of the TradeOracle Performance Tools of the Trade
Oracle Performance Tools of the TradeEnkitec
 
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentalsDB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentalsJohn Beresniewicz
 
Awr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reportsAwr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reportsJohn Beresniewicz
 
Key to a successful Exadata POC
Key to a successful Exadata POCKey to a successful Exadata POC
Key to a successful Exadata POCUmair Mansoob
 
Infinispan from POC to Production
Infinispan from POC to ProductionInfinispan from POC to Production
Infinispan from POC to ProductionC2B2 Consulting
 
Introduction to PgBench
Introduction to PgBenchIntroduction to PgBench
Introduction to PgBenchJoshua Drake
 
Building Spark as Service in Cloud
Building Spark as Service in CloudBuilding Spark as Service in Cloud
Building Spark as Service in CloudInMobi Technology
 
Oaktable World 2014 Kevin Closson: SLOB – For More Than I/O!
Oaktable World 2014 Kevin Closson:  SLOB – For More Than I/O!Oaktable World 2014 Kevin Closson:  SLOB – For More Than I/O!
Oaktable World 2014 Kevin Closson: SLOB – For More Than I/O!Kyle Hailey
 
PostgreSQL Replication High Availability Methods
PostgreSQL Replication High Availability MethodsPostgreSQL Replication High Availability Methods
PostgreSQL Replication High Availability MethodsMydbops
 
Oracle real application clusters system tests with demo
Oracle real application clusters system tests with demoOracle real application clusters system tests with demo
Oracle real application clusters system tests with demoAjith Narayanan
 
Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...
Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...
Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...PostgreSQL-Consulting
 
High Performance Computing - Cloud Point of View
High Performance Computing - Cloud Point of ViewHigh Performance Computing - Cloud Point of View
High Performance Computing - Cloud Point of Viewaragozin
 
PGPool-II Load testing
PGPool-II Load testingPGPool-II Load testing
PGPool-II Load testingEDB
 
How to find what is making your Oracle database slow
How to find what is making your Oracle database slowHow to find what is making your Oracle database slow
How to find what is making your Oracle database slowSolarWinds
 
EDBT2015: Transactional Replication in Hybrid Data Store Architectures
EDBT2015: Transactional Replication in Hybrid Data Store ArchitecturesEDBT2015: Transactional Replication in Hybrid Data Store Architectures
EDBT2015: Transactional Replication in Hybrid Data Store Architecturestatemura
 

Was ist angesagt? (20)

Creating a Benchmarking Infrastructure That Just Works
Creating a Benchmarking Infrastructure That Just WorksCreating a Benchmarking Infrastructure That Just Works
Creating a Benchmarking Infrastructure That Just Works
 
Why is my_oracle_e-biz_database_slow_a_million_dollar_question
Why is my_oracle_e-biz_database_slow_a_million_dollar_questionWhy is my_oracle_e-biz_database_slow_a_million_dollar_question
Why is my_oracle_e-biz_database_slow_a_million_dollar_question
 
Beyond unit tests: Deployment and testing for Hadoop/Spark workflows
Beyond unit tests: Deployment and testing for Hadoop/Spark workflowsBeyond unit tests: Deployment and testing for Hadoop/Spark workflows
Beyond unit tests: Deployment and testing for Hadoop/Spark workflows
 
Fail-Safe Cluster for FirebirdSQL and something more
Fail-Safe Cluster for FirebirdSQL and something moreFail-Safe Cluster for FirebirdSQL and something more
Fail-Safe Cluster for FirebirdSQL and something more
 
Analyze database system using a 3 d method
Analyze database system using a 3 d methodAnalyze database system using a 3 d method
Analyze database system using a 3 d method
 
Oracle Performance Tools of the Trade
Oracle Performance Tools of the TradeOracle Performance Tools of the Trade
Oracle Performance Tools of the Trade
 
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentalsDB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
 
Awr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reportsAwr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reports
 
Key to a successful Exadata POC
Key to a successful Exadata POCKey to a successful Exadata POC
Key to a successful Exadata POC
 
Infinispan from POC to Production
Infinispan from POC to ProductionInfinispan from POC to Production
Infinispan from POC to Production
 
Introduction to PgBench
Introduction to PgBenchIntroduction to PgBench
Introduction to PgBench
 
Building Spark as Service in Cloud
Building Spark as Service in CloudBuilding Spark as Service in Cloud
Building Spark as Service in Cloud
 
Oaktable World 2014 Kevin Closson: SLOB – For More Than I/O!
Oaktable World 2014 Kevin Closson:  SLOB – For More Than I/O!Oaktable World 2014 Kevin Closson:  SLOB – For More Than I/O!
Oaktable World 2014 Kevin Closson: SLOB – For More Than I/O!
 
PostgreSQL Replication High Availability Methods
PostgreSQL Replication High Availability MethodsPostgreSQL Replication High Availability Methods
PostgreSQL Replication High Availability Methods
 
Oracle real application clusters system tests with demo
Oracle real application clusters system tests with demoOracle real application clusters system tests with demo
Oracle real application clusters system tests with demo
 
Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...
Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...
Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...
 
High Performance Computing - Cloud Point of View
High Performance Computing - Cloud Point of ViewHigh Performance Computing - Cloud Point of View
High Performance Computing - Cloud Point of View
 
PGPool-II Load testing
PGPool-II Load testingPGPool-II Load testing
PGPool-II Load testing
 
How to find what is making your Oracle database slow
How to find what is making your Oracle database slowHow to find what is making your Oracle database slow
How to find what is making your Oracle database slow
 
EDBT2015: Transactional Replication in Hybrid Data Store Architectures
EDBT2015: Transactional Replication in Hybrid Data Store ArchitecturesEDBT2015: Transactional Replication in Hybrid Data Store Architectures
EDBT2015: Transactional Replication in Hybrid Data Store Architectures
 

Andere mochten auch

Bai+giang+ke+toan+du+lich
Bai+giang+ke+toan+du+lichBai+giang+ke+toan+du+lich
Bai+giang+ke+toan+du+lichHiển Phùng
 
Tìm hiểu bánh kẹo truyền thống - Kẹo dừa
Tìm hiểu bánh kẹo truyền thống - Kẹo dừaTìm hiểu bánh kẹo truyền thống - Kẹo dừa
Tìm hiểu bánh kẹo truyền thống - Kẹo dừaKej Ry
 
Huong dan tinh gia thanh san xuat tren misa sme.net 2012 (qd 15)
Huong dan tinh gia thanh san xuat tren misa sme.net 2012 (qd 15)Huong dan tinh gia thanh san xuat tren misa sme.net 2012 (qd 15)
Huong dan tinh gia thanh san xuat tren misa sme.net 2012 (qd 15)Gia sư kế toán trưởng
 
Toàn tập về orcad
Toàn tập về orcadToàn tập về orcad
Toàn tập về orcadDavid Trần
 
Hướng Dẫn Xử Trí Lồng Ghép Các Bệnh Thường Gặp Ở Trẻ Em
Hướng Dẫn Xử Trí Lồng Ghép Các Bệnh Thường Gặp Ở Trẻ EmHướng Dẫn Xử Trí Lồng Ghép Các Bệnh Thường Gặp Ở Trẻ Em
Hướng Dẫn Xử Trí Lồng Ghép Các Bệnh Thường Gặp Ở Trẻ EmBomonnhi
 
He thong thong tin quan ly
He thong thong tin quan lyHe thong thong tin quan ly
He thong thong tin quan lyvuthanhtien
 
Cơ cấu tổ chức của Công ty tư vấn, thiết kế thương hiệu - Inside a branding a...
Cơ cấu tổ chức của Công ty tư vấn, thiết kế thương hiệu - Inside a branding a...Cơ cấu tổ chức của Công ty tư vấn, thiết kế thương hiệu - Inside a branding a...
Cơ cấu tổ chức của Công ty tư vấn, thiết kế thương hiệu - Inside a branding a...Nguyen Thanh Tuan
 
Bai16 dinh dang van ban
Bai16 dinh dang van banBai16 dinh dang van ban
Bai16 dinh dang van banVõ Trúc
 
PHÂN TÍCH THỰC TRẠNG SẢN XUẤT-TIÊU THỤ RAU AN TOÀN ĐỒNG BẰNG SÔNG CỬU LONG GI...
PHÂN TÍCH THỰC TRẠNG SẢN XUẤT-TIÊU THỤ RAU AN TOÀN ĐỒNG BẰNG SÔNG CỬU LONG GI...PHÂN TÍCH THỰC TRẠNG SẢN XUẤT-TIÊU THỤ RAU AN TOÀN ĐỒNG BẰNG SÔNG CỬU LONG GI...
PHÂN TÍCH THỰC TRẠNG SẢN XUẤT-TIÊU THỤ RAU AN TOÀN ĐỒNG BẰNG SÔNG CỬU LONG GI...Cerberus Kero
 
Bai giang luu huynh
Bai giang luu huynhBai giang luu huynh
Bai giang luu huynhskyrain9x
 
Những kiến thức cơ bản cần biết về Microsoft Word
Những kiến thức cơ bản cần biết về Microsoft WordNhững kiến thức cơ bản cần biết về Microsoft Word
Những kiến thức cơ bản cần biết về Microsoft WordTeddo Teddo
 
Huong dan co ban ve ms project 2010 professional
Huong dan co ban ve ms project 2010 professionalHuong dan co ban ve ms project 2010 professional
Huong dan co ban ve ms project 2010 professionalKaka Nguyen
 
Ngữ pháp tiếng anh ôn thi toeic
Ngữ pháp tiếng anh ôn thi toeicNgữ pháp tiếng anh ôn thi toeic
Ngữ pháp tiếng anh ôn thi toeicVai Savta
 
Giáo trình tự học Adobe Illustrator CS6 bằng tiếng Việt
Giáo trình tự học Adobe Illustrator CS6 bằng tiếng ViệtGiáo trình tự học Adobe Illustrator CS6 bằng tiếng Việt
Giáo trình tự học Adobe Illustrator CS6 bằng tiếng Việtlycatminh
 

Andere mochten auch (17)

Bai+giang+ke+toan+du+lich
Bai+giang+ke+toan+du+lichBai+giang+ke+toan+du+lich
Bai+giang+ke+toan+du+lich
 
Cop pha01 (1)
Cop pha01 (1)Cop pha01 (1)
Cop pha01 (1)
 
Tìm hiểu bánh kẹo truyền thống - Kẹo dừa
Tìm hiểu bánh kẹo truyền thống - Kẹo dừaTìm hiểu bánh kẹo truyền thống - Kẹo dừa
Tìm hiểu bánh kẹo truyền thống - Kẹo dừa
 
Huong dan tinh gia thanh san xuat tren misa sme.net 2012 (qd 15)
Huong dan tinh gia thanh san xuat tren misa sme.net 2012 (qd 15)Huong dan tinh gia thanh san xuat tren misa sme.net 2012 (qd 15)
Huong dan tinh gia thanh san xuat tren misa sme.net 2012 (qd 15)
 
Toàn tập về orcad
Toàn tập về orcadToàn tập về orcad
Toàn tập về orcad
 
Hướng Dẫn Xử Trí Lồng Ghép Các Bệnh Thường Gặp Ở Trẻ Em
Hướng Dẫn Xử Trí Lồng Ghép Các Bệnh Thường Gặp Ở Trẻ EmHướng Dẫn Xử Trí Lồng Ghép Các Bệnh Thường Gặp Ở Trẻ Em
Hướng Dẫn Xử Trí Lồng Ghép Các Bệnh Thường Gặp Ở Trẻ Em
 
He thong thong tin quan ly
He thong thong tin quan lyHe thong thong tin quan ly
He thong thong tin quan ly
 
Bìa 2
Bìa 2Bìa 2
Bìa 2
 
Cơ cấu tổ chức của Công ty tư vấn, thiết kế thương hiệu - Inside a branding a...
Cơ cấu tổ chức của Công ty tư vấn, thiết kế thương hiệu - Inside a branding a...Cơ cấu tổ chức của Công ty tư vấn, thiết kế thương hiệu - Inside a branding a...
Cơ cấu tổ chức của Công ty tư vấn, thiết kế thương hiệu - Inside a branding a...
 
Bai16 dinh dang van ban
Bai16 dinh dang van banBai16 dinh dang van ban
Bai16 dinh dang van ban
 
PHÂN TÍCH THỰC TRẠNG SẢN XUẤT-TIÊU THỤ RAU AN TOÀN ĐỒNG BẰNG SÔNG CỬU LONG GI...
PHÂN TÍCH THỰC TRẠNG SẢN XUẤT-TIÊU THỤ RAU AN TOÀN ĐỒNG BẰNG SÔNG CỬU LONG GI...PHÂN TÍCH THỰC TRẠNG SẢN XUẤT-TIÊU THỤ RAU AN TOÀN ĐỒNG BẰNG SÔNG CỬU LONG GI...
PHÂN TÍCH THỰC TRẠNG SẢN XUẤT-TIÊU THỤ RAU AN TOÀN ĐỒNG BẰNG SÔNG CỬU LONG GI...
 
Bai giang luu huynh
Bai giang luu huynhBai giang luu huynh
Bai giang luu huynh
 
Những kiến thức cơ bản cần biết về Microsoft Word
Những kiến thức cơ bản cần biết về Microsoft WordNhững kiến thức cơ bản cần biết về Microsoft Word
Những kiến thức cơ bản cần biết về Microsoft Word
 
Huong dan co ban ve ms project 2010 professional
Huong dan co ban ve ms project 2010 professionalHuong dan co ban ve ms project 2010 professional
Huong dan co ban ve ms project 2010 professional
 
Ngữ pháp tiếng anh ôn thi toeic
Ngữ pháp tiếng anh ôn thi toeicNgữ pháp tiếng anh ôn thi toeic
Ngữ pháp tiếng anh ôn thi toeic
 
Giáo trình tự học Adobe Illustrator CS6 bằng tiếng Việt
Giáo trình tự học Adobe Illustrator CS6 bằng tiếng ViệtGiáo trình tự học Adobe Illustrator CS6 bằng tiếng Việt
Giáo trình tự học Adobe Illustrator CS6 bằng tiếng Việt
 
Truy van du lieu
Truy van du lieuTruy van du lieu
Truy van du lieu
 

Ähnlich wie 261197832 8-performance-tuning-part i

Production Readiness Strategies in an Automated World
Production Readiness Strategies in an Automated WorldProduction Readiness Strategies in an Automated World
Production Readiness Strategies in an Automated WorldSean Chittenden
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsZohar Elkayam
 
Collaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR ReportCollaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR ReportAlfredo Krieg
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basicsnitin anjankar
 
Database Fundamental Concepts- Series 1 - Performance Analysis
Database Fundamental Concepts- Series 1 - Performance AnalysisDatabase Fundamental Concepts- Series 1 - Performance Analysis
Database Fundamental Concepts- Series 1 - Performance AnalysisDAGEOP LTD
 
Performance Stability, Tips and Tricks and Underscores
Performance Stability, Tips and Tricks and UnderscoresPerformance Stability, Tips and Tricks and Underscores
Performance Stability, Tips and Tricks and UnderscoresJitendra Singh
 
Oracle Database Performance Tuning Concept
Oracle Database Performance Tuning ConceptOracle Database Performance Tuning Concept
Oracle Database Performance Tuning ConceptChien Chung Shen
 
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
제3회난공불락 오픈소스 인프라세미나 - MySQL PerformanceTommy Lee
 
Adapting and adopting spm v04
Adapting and adopting spm v04Adapting and adopting spm v04
Adapting and adopting spm v04Carlos Sierra
 
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RACPerformance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RACKristofferson A
 
An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1Navneet Upneja
 
L-2 (Computer Performance).ppt
L-2 (Computer Performance).pptL-2 (Computer Performance).ppt
L-2 (Computer Performance).pptImranKhan997082
 
Parallel Computing - Lec 6
Parallel Computing - Lec 6Parallel Computing - Lec 6
Parallel Computing - Lec 6Shah Zaib
 
Adding Value in the Cloud with Performance Test
Adding Value in the Cloud with Performance TestAdding Value in the Cloud with Performance Test
Adding Value in the Cloud with Performance TestRodolfo Kohn
 
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cPresentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cRonald Francisco Vargas Quesada
 
Ebs dba con4696_pdf_4696_0001
Ebs dba con4696_pdf_4696_0001Ebs dba con4696_pdf_4696_0001
Ebs dba con4696_pdf_4696_0001jucaab
 
Why & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryWhy & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryAntonios Chatzipavlis
 

Ähnlich wie 261197832 8-performance-tuning-part i (20)

Production Readiness Strategies in an Automated World
Production Readiness Strategies in an Automated WorldProduction Readiness Strategies in an Automated World
Production Readiness Strategies in an Automated World
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
 
Collaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR ReportCollaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR Report
 
SQL Tuning 101
SQL Tuning 101SQL Tuning 101
SQL Tuning 101
 
sqltuning101-170419021007-2.pdf
sqltuning101-170419021007-2.pdfsqltuning101-170419021007-2.pdf
sqltuning101-170419021007-2.pdf
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basics
 
Database Fundamental Concepts- Series 1 - Performance Analysis
Database Fundamental Concepts- Series 1 - Performance AnalysisDatabase Fundamental Concepts- Series 1 - Performance Analysis
Database Fundamental Concepts- Series 1 - Performance Analysis
 
Performance Stability, Tips and Tricks and Underscores
Performance Stability, Tips and Tricks and UnderscoresPerformance Stability, Tips and Tricks and Underscores
Performance Stability, Tips and Tricks and Underscores
 
Oracle Database Performance Tuning Concept
Oracle Database Performance Tuning ConceptOracle Database Performance Tuning Concept
Oracle Database Performance Tuning Concept
 
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
 
Adapting and adopting spm v04
Adapting and adopting spm v04Adapting and adopting spm v04
Adapting and adopting spm v04
 
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RACPerformance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
 
An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1
 
L-2 (Computer Performance).ppt
L-2 (Computer Performance).pptL-2 (Computer Performance).ppt
L-2 (Computer Performance).ppt
 
Parallel Computing - Lec 6
Parallel Computing - Lec 6Parallel Computing - Lec 6
Parallel Computing - Lec 6
 
Adding Value in the Cloud with Performance Test
Adding Value in the Cloud with Performance TestAdding Value in the Cloud with Performance Test
Adding Value in the Cloud with Performance Test
 
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cPresentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12c
 
Performance testing material
Performance testing materialPerformance testing material
Performance testing material
 
Ebs dba con4696_pdf_4696_0001
Ebs dba con4696_pdf_4696_0001Ebs dba con4696_pdf_4696_0001
Ebs dba con4696_pdf_4696_0001
 
Why & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryWhy & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to query
 

Último

Data Analytics Fundamentals: data analytics types.potx
Data Analytics Fundamentals: data analytics types.potxData Analytics Fundamentals: data analytics types.potx
Data Analytics Fundamentals: data analytics types.potxEmmanuel Dauda
 
Enabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge GraphsEnabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge GraphsNeo4j
 
Elements of language learning - an analysis of how different elements of lang...
Elements of language learning - an analysis of how different elements of lang...Elements of language learning - an analysis of how different elements of lang...
Elements of language learning - an analysis of how different elements of lang...PrithaVashisht1
 
Báo cáo Social Media Benchmark 2024 cho dân Marketing
Báo cáo Social Media Benchmark 2024 cho dân MarketingBáo cáo Social Media Benchmark 2024 cho dân Marketing
Báo cáo Social Media Benchmark 2024 cho dân MarketingMarketingTrips
 
Paul Martin (Gartner) - Show Me the AI Money.pdf
Paul Martin (Gartner) - Show Me the AI Money.pdfPaul Martin (Gartner) - Show Me the AI Money.pdf
Paul Martin (Gartner) - Show Me the AI Money.pdfdcphostmaster
 
Understanding the Impact of video length on student performance
Understanding the Impact of video length on student performanceUnderstanding the Impact of video length on student performance
Understanding the Impact of video length on student performancePrithaVashisht1
 
Bengaluru Tableau UG event- 2nd March 2024 Q1
Bengaluru Tableau UG event- 2nd March 2024 Q1Bengaluru Tableau UG event- 2nd March 2024 Q1
Bengaluru Tableau UG event- 2nd March 2024 Q1bengalurutug
 
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdfNeo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdfNeo4j
 
How to Build an Experimentation Culture for Data-Driven Product Development
How to Build an Experimentation Culture for Data-Driven Product DevelopmentHow to Build an Experimentation Culture for Data-Driven Product Development
How to Build an Experimentation Culture for Data-Driven Product DevelopmentAggregage
 
Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...
Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...
Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...Neo4j
 
Unleashing Datas Potential - Mastering Precision with FCO-IM
Unleashing Datas Potential - Mastering Precision with FCO-IMUnleashing Datas Potential - Mastering Precision with FCO-IM
Unleashing Datas Potential - Mastering Precision with FCO-IMMarco Wobben
 
TCFPro24 Building Real-Time Generative AI Pipelines
TCFPro24 Building Real-Time Generative AI PipelinesTCFPro24 Building Real-Time Generative AI Pipelines
TCFPro24 Building Real-Time Generative AI PipelinesTimothy Spann
 
STOCK PRICE ANALYSIS Furkan Ali TASCI --.pptx
STOCK PRICE ANALYSIS  Furkan Ali TASCI --.pptxSTOCK PRICE ANALYSIS  Furkan Ali TASCI --.pptx
STOCK PRICE ANALYSIS Furkan Ali TASCI --.pptxFurkanTasci3
 
Brain Tumor Detection with Machine Learning.pptx
Brain Tumor Detection with Machine Learning.pptxBrain Tumor Detection with Machine Learning.pptx
Brain Tumor Detection with Machine Learning.pptxShammiRai3
 
Prediction Of Cryptocurrency Prices Using Lstm, Svm And Polynomial Regression...
Prediction Of Cryptocurrency Prices Using Lstm, Svm And Polynomial Regression...Prediction Of Cryptocurrency Prices Using Lstm, Svm And Polynomial Regression...
Prediction Of Cryptocurrency Prices Using Lstm, Svm And Polynomial Regression...ferisulianta.com
 
The market for cross-border mortgages in Europe
The market for cross-border mortgages in EuropeThe market for cross-border mortgages in Europe
The market for cross-border mortgages in Europe321k
 
Air Con Energy Rating Info411 Presentation.pdf
Air Con Energy Rating Info411 Presentation.pdfAir Con Energy Rating Info411 Presentation.pdf
Air Con Energy Rating Info411 Presentation.pdfJasonBoboKyaw
 
PPT for Presiding Officer.pptxvvdffdfgggg
PPT for Presiding Officer.pptxvvdffdfggggPPT for Presiding Officer.pptxvvdffdfgggg
PPT for Presiding Officer.pptxvvdffdfggggbhadratanusenapati1
 
Empowering Decisions A Guide to Embedded Analytics
Empowering Decisions A Guide to Embedded AnalyticsEmpowering Decisions A Guide to Embedded Analytics
Empowering Decisions A Guide to Embedded AnalyticsGain Insights
 
Data Collection from Social Media Platforms
Data Collection from Social Media PlatformsData Collection from Social Media Platforms
Data Collection from Social Media PlatformsMahmoud Yasser
 

Último (20)

Data Analytics Fundamentals: data analytics types.potx
Data Analytics Fundamentals: data analytics types.potxData Analytics Fundamentals: data analytics types.potx
Data Analytics Fundamentals: data analytics types.potx
 
Enabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge GraphsEnabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge Graphs
 
Elements of language learning - an analysis of how different elements of lang...
Elements of language learning - an analysis of how different elements of lang...Elements of language learning - an analysis of how different elements of lang...
Elements of language learning - an analysis of how different elements of lang...
 
Báo cáo Social Media Benchmark 2024 cho dân Marketing
Báo cáo Social Media Benchmark 2024 cho dân MarketingBáo cáo Social Media Benchmark 2024 cho dân Marketing
Báo cáo Social Media Benchmark 2024 cho dân Marketing
 
Paul Martin (Gartner) - Show Me the AI Money.pdf
Paul Martin (Gartner) - Show Me the AI Money.pdfPaul Martin (Gartner) - Show Me the AI Money.pdf
Paul Martin (Gartner) - Show Me the AI Money.pdf
 
Understanding the Impact of video length on student performance
Understanding the Impact of video length on student performanceUnderstanding the Impact of video length on student performance
Understanding the Impact of video length on student performance
 
Bengaluru Tableau UG event- 2nd March 2024 Q1
Bengaluru Tableau UG event- 2nd March 2024 Q1Bengaluru Tableau UG event- 2nd March 2024 Q1
Bengaluru Tableau UG event- 2nd March 2024 Q1
 
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdfNeo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
 
How to Build an Experimentation Culture for Data-Driven Product Development
How to Build an Experimentation Culture for Data-Driven Product DevelopmentHow to Build an Experimentation Culture for Data-Driven Product Development
How to Build an Experimentation Culture for Data-Driven Product Development
 
Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...
Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...
Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...
 
Unleashing Datas Potential - Mastering Precision with FCO-IM
Unleashing Datas Potential - Mastering Precision with FCO-IMUnleashing Datas Potential - Mastering Precision with FCO-IM
Unleashing Datas Potential - Mastering Precision with FCO-IM
 
TCFPro24 Building Real-Time Generative AI Pipelines
TCFPro24 Building Real-Time Generative AI PipelinesTCFPro24 Building Real-Time Generative AI Pipelines
TCFPro24 Building Real-Time Generative AI Pipelines
 
STOCK PRICE ANALYSIS Furkan Ali TASCI --.pptx
STOCK PRICE ANALYSIS  Furkan Ali TASCI --.pptxSTOCK PRICE ANALYSIS  Furkan Ali TASCI --.pptx
STOCK PRICE ANALYSIS Furkan Ali TASCI --.pptx
 
Brain Tumor Detection with Machine Learning.pptx
Brain Tumor Detection with Machine Learning.pptxBrain Tumor Detection with Machine Learning.pptx
Brain Tumor Detection with Machine Learning.pptx
 
Prediction Of Cryptocurrency Prices Using Lstm, Svm And Polynomial Regression...
Prediction Of Cryptocurrency Prices Using Lstm, Svm And Polynomial Regression...Prediction Of Cryptocurrency Prices Using Lstm, Svm And Polynomial Regression...
Prediction Of Cryptocurrency Prices Using Lstm, Svm And Polynomial Regression...
 
The market for cross-border mortgages in Europe
The market for cross-border mortgages in EuropeThe market for cross-border mortgages in Europe
The market for cross-border mortgages in Europe
 
Air Con Energy Rating Info411 Presentation.pdf
Air Con Energy Rating Info411 Presentation.pdfAir Con Energy Rating Info411 Presentation.pdf
Air Con Energy Rating Info411 Presentation.pdf
 
PPT for Presiding Officer.pptxvvdffdfgggg
PPT for Presiding Officer.pptxvvdffdfggggPPT for Presiding Officer.pptxvvdffdfgggg
PPT for Presiding Officer.pptxvvdffdfgggg
 
Empowering Decisions A Guide to Embedded Analytics
Empowering Decisions A Guide to Embedded AnalyticsEmpowering Decisions A Guide to Embedded Analytics
Empowering Decisions A Guide to Embedded Analytics
 
Data Collection from Social Media Platforms
Data Collection from Social Media PlatformsData Collection from Social Media Platforms
Data Collection from Social Media Platforms
 

261197832 8-performance-tuning-part i

  • 1. Performance TuningPerformance Tuning Compiled from:Compiled from: Oracle Database Administration, Session 13, Performance, Harvard UOracle Database Administration, Session 13, Performance, Harvard U Oracle Server Tuning Accelerator, David Scott, IntecOracle Server Tuning Accelerator, David Scott, Intec
  • 2. Case Study #1Case Study #1 • Define the BUSINESS problemDefine the BUSINESS problem – The GUI is too slow; a loss in productivity $$$The GUI is too slow; a loss in productivity $$$ • Measure the painMeasure the pain – Screen XYZ in the GUI takes 47 secondsScreen XYZ in the GUI takes 47 seconds – 3000 users use this screen at each login3000 users use this screen at each login – Most other screens are fineMost other screens are fine • Identify the problem componentIdentify the problem component – Stopwatch timing of XYZ response is 47 secondsStopwatch timing of XYZ response is 47 seconds – Same SQL query takes 47 secondsSame SQL query takes 47 seconds – Query identified as culpritQuery identified as culprit
  • 3. Case Study #1 (cont’d)Case Study #1 (cont’d) • Find the root causeFind the root cause – Inefficient queryInefficient query • Investigate and weigh solutionsInvestigate and weigh solutions – Multiple versions of query comparedMultiple versions of query compared – Results must match originalResults must match original • Fix the problemFix the problem – Replace query in Screen XYZ with tuned versionReplace query in Screen XYZ with tuned version • Measure the resultsMeasure the results – Query returns in 2 secondsQuery returns in 2 seconds – ROI: 3000 users * 45 seconds saved * Avg salary @ROI: 3000 users * 45 seconds saved * Avg salary @ $10/hour * 260 business days/year =$10/hour * 260 business days/year = $97,500$97,500
  • 4. Performance TuningPerformance Tuning • Trade-offs Between Response Time andTrade-offs Between Response Time and ThroughputThroughput • Goals for tuning vary, depending on theGoals for tuning vary, depending on the needs of the applicationneeds of the application – OLTP vs. OLAP applications (which oneOLTP vs. OLAP applications (which one requires which performance?)requires which performance?)
  • 5. Performance DefinitionPerformance Definition • Response time = service time + waitResponse time = service time + wait timetime • We can increase performance two ways:We can increase performance two ways: – by reducing service timeby reducing service time – by reducing wait timeby reducing wait time
  • 6. Performance DefinitionPerformance Definition • System throughput equals the amount ofSystem throughput equals the amount of work accomplished in a given amount ofwork accomplished in a given amount of timetime • Two techniques of increasing throughputTwo techniques of increasing throughput existexist – Get more work done with the same resourcesGet more work done with the same resources ((reduce service timereduce service time)) – Get the work done quicker by reducing overallGet the work done quicker by reducing overall response time (response time (reduce wait timereduce wait time))
  • 7. Performance DefinitionPerformance Definition • The service time for a task may stay theThe service time for a task may stay the same, but wait time increases assame, but wait time increases as contention increasescontention increases • If many users are waiting for a service thatIf many users are waiting for a service that takes 1 second, then the tenth user musttakes 1 second, then the tenth user must wait 9 seconds for a service that takes 1wait 9 seconds for a service that takes 1 secondsecond
  • 8. Where’s the Wait?Where’s the Wait? Client Application Network Disk CPU Database
  • 9. Critical ResourcesCritical Resources • Resources such as CPUs, memory, I/OResources such as CPUs, memory, I/O capacity, and network bandwidth are keycapacity, and network bandwidth are key to reducing service timeto reducing service time • Adding resourcesAdding resources cancan give highergive higher throughput and swifter response timesthroughput and swifter response times
  • 10. SQL Processing ArchitectureSQL Processing Architecture
  • 11. ParserParser • The parser performs two functions:The parser performs two functions: – Syntax analysisSyntax analysis: This checks SQL statements: This checks SQL statements for correct syntaxfor correct syntax – Semantic analysisSemantic analysis: Checks that the current: Checks that the current database objects and object attributes aredatabase objects and object attributes are correctcorrect
  • 12. OptimizerOptimizer • The optimizer is the heart of the SQLThe optimizer is the heart of the SQL processing engine. The Oracle serverprocessing engine. The Oracle server provides two methods of optimization:provides two methods of optimization: rule-based optimizer (RBO) and cost-rule-based optimizer (RBO) and cost- based optimizer (CBO).based optimizer (CBO). • Note: As of Oracle 10g, RBO is no longerNote: As of Oracle 10g, RBO is no longer supported.supported.
  • 13. Row Source GeneratorRow Source Generator • The row source generator receives theThe row source generator receives the optimal plan from the optimizeroptimal plan from the optimizer • It outputs the execution plan for the SQLIt outputs the execution plan for the SQL statementstatement • A set of rows returned by an executionA set of rows returned by an execution step is called astep is called a row sourcerow source • The execution plan is a collection of rowThe execution plan is a collection of row sources, structured in the form of a treesources, structured in the form of a tree
  • 14. SQL ExecutionSQL Execution • The combination of steps required toThe combination of steps required to execute a statement is called anexecute a statement is called an execution planexecution plan • An execution plan includes an accessAn execution plan includes an access method for each table that the statementmethod for each table that the statement accesses and an ordering of the tablesaccesses and an ordering of the tables (the join order)(the join order)
  • 15. Example 1Example 1 • How will the following SQL statement beHow will the following SQL statement be processed?processed? – SELECT *SELECT * – FROM BLLIM.Project;FROM BLLIM.Project; • Does it matter if an index exists?Does it matter if an index exists?
  • 16. Example 2Example 2 • How will the following SQL statement beHow will the following SQL statement be processed?processed? – SELECT *SELECT * – FROM BLLIM.ProjectFROM BLLIM.Project – WHERE status = ‘C’; // ‘C’ for completeWHERE status = ‘C’; // ‘C’ for complete • Does it matter if an index exists?Does it matter if an index exists?
  • 17. Example 3Example 3 • How will the following SQL statement beHow will the following SQL statement be processed?processed? – SELECT *SELECT * – FROM BLLIM.ProjectFROM BLLIM.Project – WHERE status = ‘C’; // ‘C’ for completeWHERE 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 followingWhat if the distribution of status is the following (skewed)?(skewed)? – 70 projects have ‘C’, 10 have ‘I’, and 20 have ‘A’70 projects have ‘C’, 10 have ‘I’, and 20 have ‘A’
  • 18. Example 4Example 4 • How will the following SQL statement beHow will the following SQL statement be processed?processed? – SELECT pjTitleSELECT pjTitle – FROM BLLIM.ProjectFROM BLLIM.Project – WHERE status = ‘C’; // ‘C’ for completeWHERE 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 andAssume that you have an index for status and another one for pjTitle.another one for pjTitle.