SlideShare una empresa de Scribd logo
1 de 18
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

La actualidad más candente

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
DataWorks Summit
 

La actualidad más candente (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
 

Destacado

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
Kej 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
 
He thong thong tin quan ly
He thong thong tin quan lyHe thong thong tin quan ly
He thong thong tin quan ly
vuthanhtien
 
Bai16 dinh dang van ban
Bai16 dinh dang van banBai16 dinh dang van ban
Bai16 dinh dang van ban
Võ 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 huynh
skyrain9x
 
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
Kaka 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 toeic
Vai Savta
 

Destacado (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
 

Similar a 261197832 8-performance-tuning-part i

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
Kristofferson A
 
Ebs dba con4696_pdf_4696_0001
Ebs dba con4696_pdf_4696_0001Ebs dba con4696_pdf_4696_0001
Ebs dba con4696_pdf_4696_0001
jucaab
 
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
Antonios Chatzipavlis
 

Similar a 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

Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
amitlee9823
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
amitlee9823
 
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
amitlee9823
 
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
amitlee9823
 
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night StandCall Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
amitlee9823
 
Call Girls In Nandini Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Nandini Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Nandini Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Nandini Layout ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
amitlee9823
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
amitlee9823
 

Último (20)

Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
 
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night StandCall Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
 
Call Girls In Nandini Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Nandini Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Nandini Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Nandini Layout ☎ 7737669865 🥵 Book Your One night Stand
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 

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.