SlideShare a Scribd company logo
1 of 20
Part 1 : What, When and How Virtathon   7/2011 Uday Moogala Vlado Barun
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Who we are
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Disclaimer
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Agenda
In order to know what to fix, we need to be able to  see  what’s broken! - Dan Roam
What Identify (app is slow) Quantify (takes 1m) Timeline (in peak hours) Component (MT or DB or N/W) Flow chart Root Cause (Stats not updated) AWR/ASH, Trace, Apps Logs/Tables, OS/IO stats etc SQL/Object Stats,  Execution Plans, etc Initial Data collec-tion How Much When Where How Why Analyze Additional Data collec-tion Understanding the issue…
Non-DB Time DB Time Getting to know the System…
An example… I/O On CPU I/O On CPU Browse  Books Read Reviews For One Book Add to Cart Checkout TIME =  time spent in database =  user/network/app tier time
=  time spent in database SQL Trace (Microsecond level) Application Logging (custom level) Gathering Performance Data… (SQL Trace, ASH) 21 ASH Samples 3 ASH Samples in AWR Browse  Books Read Reviews For One Book Add to Cart Checkout TIME v$active_session_history (1 second intervals) dba_hist_active_sess_history (10 second intervals)
Automatic Workload Repository (AWR) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Active Session History (ASH) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Active Session History (ASH) -  Dimensions When SAMPLE_ID SAMPLE_TIME Session SESSION_ID SESSION_SERIAL# SESSION_TYPE SESSION_STATE USER_ID QC_INSTANCE_ID QC_SESSION_ID QC_SESSION_SERIAL# CLIENT_ID IN and IS columns SQL SQL_ID IS_SQLID_CURRENT SQL_CHILD_NUMBER SQL_OPCODE SQL_OPNAME TOP_LEVEL_SQL_ID TOP_LEVEL_SQL_OPCODE SQL_EXEC_ID SQL_EXEC_START SQL_PLAN_HASH_VALUE SQL_PLAN_OPTIONS Row Source SQL_PLAN_LINE_ID SQL_PLAN_OPERATION Waits   EVENT EVENT_ID EVENT# SEQ# P1TEXT P1 P2TEXT P2 P3TEXT P3 WAIT_CLASS WAIT_CLASS_ID WAIT_TIME TIME_WAITED CURRENT_OBJ# CURRENT_FILE# CURRENT_BLOCK# CURRENT_ROW# Blocking Session BLOCKING_SESSION_STATUS BLOCKING_SESSION BLOCKING_SESSION_SERIAL# BLOCKING_INST_ID BLOCKING_HANGCHAIN_INFO Object CURRENT_OBJ# CURRENT_FILE# CURRENT_BLOCK# CURRENT_ROW# Application SERVICE_HASH PROGRAM MODULE ACTION MACHINE Statistics TM_DELTA_TIME TM_DELTA_CPU_TIME TM_DELTA_DB_TIME DELTA_TIME DELTA_READ_IO_REQUESTS DELTA_WRITE_IO_REQUESTS DELTA_READ_IO_BYTES DELTA_WRITE_IO_BYTES DELTA_INTERCONNECT_IO_BYTES PGA_ALLOCATED TEMP_SPACE_ALLOCATED
SQL Execution Plans ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
select * from table(dbms_xplan.display_cursor('&SQL_ID',null,'ALLSTATS LAST')); SQL_ID  0s5pdsggxtc54, child number 0 ------------------------------------- Plan hash value: 2832870632 ---------------------------------------------------------------------------- | Id  | Operation  | Name  | Rows  | Bytes | Cost (%CPU)| Time  | ---------------------------------------------------------------------------- |  0 | SELECT STATEMENT  |  |  |  |  152K(100)|  | |  1 |  SORT AGGREGATE  |  |  1 |  2 |  |  | |*  2 |  TABLE ACCESS FULL| TAB_A |  21M|  41M|  152K  (5)| 00:00:03 | ---------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - filter("COSTED_FLAG" IS NULL) Note ----- - Warning: basic plan statistics not available. These are only collected when: * hint 'gather_plan_statistics' is used for the statement or * parameter 'statistics_level' is set to 'ALL', at session or system level Display_Cursor Estimates with Statistics_level = Typical SQL_ID  0s5pdsggxtc54, child number 1 ------------------------------------- Plan hash value: 2832870632 -------------------------------------------------------------------------------------- | Id  | Operation  | Name  | Starts | E-Rows | A-Rows |  A-Time  | Buffers | -------------------------------------------------------------------------------------- |  0 | SELECT STATEMENT  |  |  1 |  |  1 |00:00:01.73 |  435K| |  1 |  SORT AGGREGATE  |  |  1 |  1 |  1 |00:00:01.73 |  435K| |*  2 |  TABLE ACCESS FULL| TAB_A |  1 |  1351K|  2001K|00:00:01.64 |  435K| -------------------------------------------------------------------------------------- Actual runtime stats with Statistics_level =  ALL or with gather_plan_statistics hint
Display_AWR SQL_ID 0s5pdsggxtc54 -------------------- ---------------------------------------------------------------------------- | Id  | Operation  | Name  | Rows  | Bytes | Cost (%CPU)| Time  | ---------------------------------------------------------------------------- |  0 | SELECT STATEMENT  |  |  |  | 22217 (100)|  | |  1 |  SORT AGGREGATE  |  |  1 |  2 |  |  | |  2 |  TABLE ACCESS FULL| TAB_A |  1351K|  2639K| 22217  (1)| 00:04:27 | ----------------------------------------------------------------------------
Real-Time SQL Monitoring ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Reference
Reference ,[object Object],[object Object],[object Object],[object Object]
Q & A

More Related Content

What's hot

Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuning
Yogiji Creations
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
Simon Huang
 
Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360
Carlos Sierra
 

What's hot (20)

Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle
 
Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuning
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuning
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
 
Understanding SQL Trace, TKPROF and Execution Plan for beginners
Understanding SQL Trace, TKPROF and Execution Plan for beginnersUnderstanding SQL Trace, TKPROF and Execution Plan for beginners
Understanding SQL Trace, TKPROF and Execution Plan for beginners
 
Oracle Performance Tools of the Trade
Oracle Performance Tools of the TradeOracle Performance Tools of the Trade
Oracle Performance Tools of the Trade
 
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
 
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
 
Deep review of LMS process
Deep review of LMS processDeep review of LMS process
Deep review of LMS process
 
Troubleshooting Complex Oracle Performance Problems with Tanel Poder
Troubleshooting Complex Oracle Performance Problems with Tanel PoderTroubleshooting Complex Oracle Performance Problems with Tanel Poder
Troubleshooting Complex Oracle Performance Problems with Tanel Poder
 
Ash and awr deep dive hotsos
Ash and awr deep dive hotsosAsh and awr deep dive hotsos
Ash and awr deep dive hotsos
 
Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata Migrations
 
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
 
AWR Sample Report
AWR Sample ReportAWR Sample Report
AWR Sample Report
 
What to Expect From Oracle database 19c
What to Expect From Oracle database 19cWhat to Expect From Oracle database 19c
What to Expect From Oracle database 19c
 
Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360
 
SQL Tuning 101
SQL Tuning 101SQL Tuning 101
SQL Tuning 101
 

Viewers also liked

Oracle Oracle Performance Tuning
Oracle Oracle Performance Tuning Oracle Oracle Performance Tuning
Oracle Oracle Performance Tuning
Kernel Training
 
Oracle SQL Performance Tuning and Optimization v26 chapter 1
Oracle SQL Performance Tuning and Optimization v26 chapter 1Oracle SQL Performance Tuning and Optimization v26 chapter 1
Oracle SQL Performance Tuning and Optimization v26 chapter 1
Kevin Meade
 
Oracle Diagnostics : Latches and Enqueues
Oracle Diagnostics : Latches and EnqueuesOracle Diagnostics : Latches and Enqueues
Oracle Diagnostics : Latches and Enqueues
Hemant K Chitale
 
OOUG: Oracle transaction locking
OOUG: Oracle transaction lockingOOUG: Oracle transaction locking
OOUG: Oracle transaction locking
Kyle Hailey
 

Viewers also liked (20)

Oracle Oracle Performance Tuning
Oracle Oracle Performance Tuning Oracle Oracle Performance Tuning
Oracle Oracle Performance Tuning
 
Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)
 
Reading AWR or Statspack Report - Straight to the Goal
Reading AWR or Statspack Report - Straight to the GoalReading AWR or Statspack Report - Straight to the Goal
Reading AWR or Statspack Report - Straight to the Goal
 
Using AWR/Statspack for Wait Analysis
Using AWR/Statspack for Wait AnalysisUsing AWR/Statspack for Wait Analysis
Using AWR/Statspack for Wait Analysis
 
Oracle SQL Performance Tuning and Optimization v26 chapter 1
Oracle SQL Performance Tuning and Optimization v26 chapter 1Oracle SQL Performance Tuning and Optimization v26 chapter 1
Oracle SQL Performance Tuning and Optimization v26 chapter 1
 
Oracle DB Performance Tuning Tips
Oracle DB Performance Tuning TipsOracle DB Performance Tuning Tips
Oracle DB Performance Tuning Tips
 
Ash and awr performance data2
Ash and awr performance data2Ash and awr performance data2
Ash and awr performance data2
 
Oracle Diagnostics : Latches and Enqueues
Oracle Diagnostics : Latches and EnqueuesOracle Diagnostics : Latches and Enqueues
Oracle Diagnostics : Latches and Enqueues
 
AWR, ASH with EM13 at HotSos 2016
AWR, ASH with EM13 at HotSos 2016AWR, ASH with EM13 at HotSos 2016
AWR, ASH with EM13 at HotSos 2016
 
Aioug sangam13 v3
Aioug sangam13 v3Aioug sangam13 v3
Aioug sangam13 v3
 
Installation and configuration 11g r2 asm using job role separation(grid & or...
Installation and configuration 11g r2 asm using job role separation(grid & or...Installation and configuration 11g r2 asm using job role separation(grid & or...
Installation and configuration 11g r2 asm using job role separation(grid & or...
 
Deploying Oracle 11g R2 on Linux RHEL6
Deploying Oracle 11g R2 on Linux RHEL6Deploying Oracle 11g R2 on Linux RHEL6
Deploying Oracle 11g R2 on Linux RHEL6
 
Resume
ResumeResume
Resume
 
Exalogic Technical Overview
Exalogic Technical OverviewExalogic Technical Overview
Exalogic Technical Overview
 
Sql DML
Sql DMLSql DML
Sql DML
 
Oracle database 12c intro
Oracle database 12c introOracle database 12c intro
Oracle database 12c intro
 
Oracle RAC 12c and Policy-Managed Databases, a Technical Overview
Oracle RAC 12c and Policy-Managed Databases, a Technical OverviewOracle RAC 12c and Policy-Managed Databases, a Technical Overview
Oracle RAC 12c and Policy-Managed Databases, a Technical Overview
 
OOUG: Oracle transaction locking
OOUG: Oracle transaction lockingOOUG: Oracle transaction locking
OOUG: Oracle transaction locking
 
FlashSystems 2016 update
FlashSystems 2016 updateFlashSystems 2016 update
FlashSystems 2016 update
 
Oracle Database Performance Tuning Concept
Oracle Database Performance Tuning ConceptOracle Database Performance Tuning Concept
Oracle Database Performance Tuning Concept
 

Similar to Performance Tuning With Oracle ASH and AWR. Part 1 How And What

Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu   (obscure) tools of the trade for tuning oracle sq lsTony Jambu   (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
InSync Conference
 
Getting optimal performance from oracle e business suite(aioug aug2015)
Getting optimal performance from oracle e business suite(aioug aug2015)Getting optimal performance from oracle e business suite(aioug aug2015)
Getting optimal performance from oracle e business suite(aioug aug2015)
pasalapudi123
 
Barun_Practical_and_Efficient_SQL_Performance_Tuning
Barun_Practical_and_Efficient_SQL_Performance_TuningBarun_Practical_and_Efficient_SQL_Performance_Tuning
Barun_Practical_and_Efficient_SQL_Performance_Tuning
Vlado Barun
 
Advance Sql Server Store procedure Presentation
Advance Sql Server Store procedure PresentationAdvance Sql Server Store procedure Presentation
Advance Sql Server Store procedure Presentation
Amin Uddin
 

Similar to Performance Tuning With Oracle ASH and AWR. Part 1 How And What (20)

Getting optimal performance from oracle e-business suite presentation
Getting optimal performance from oracle e-business suite presentationGetting optimal performance from oracle e-business suite presentation
Getting optimal performance from oracle e-business suite presentation
 
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu   (obscure) tools of the trade for tuning oracle sq lsTony Jambu   (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basics
 
Sql Server Performance Tuning
Sql Server Performance TuningSql Server Performance Tuning
Sql Server Performance Tuning
 
Getting optimal performance from oracle e business suite
Getting optimal performance from oracle e business suiteGetting optimal performance from oracle e business suite
Getting optimal performance from oracle e business suite
 
Getting optimal performance from oracle e business suite(aioug aug2015)
Getting optimal performance from oracle e business suite(aioug aug2015)Getting optimal performance from oracle e business suite(aioug aug2015)
Getting optimal performance from oracle e business suite(aioug aug2015)
 
Barun_Practical_and_Efficient_SQL_Performance_Tuning
Barun_Practical_and_Efficient_SQL_Performance_TuningBarun_Practical_and_Efficient_SQL_Performance_Tuning
Barun_Practical_and_Efficient_SQL_Performance_Tuning
 
Sql server lesson12
Sql server lesson12Sql server lesson12
Sql server lesson12
 
Sql server lesson12
Sql server lesson12Sql server lesson12
Sql server lesson12
 
R12 d49656 gc10-apps dba 07
R12 d49656 gc10-apps dba 07R12 d49656 gc10-apps dba 07
R12 d49656 gc10-apps dba 07
 
SQL Server Query Optimization, Execution and Debugging Query Performance
SQL Server Query Optimization, Execution and Debugging Query PerformanceSQL Server Query Optimization, Execution and Debugging Query Performance
SQL Server Query Optimization, Execution and Debugging Query Performance
 
Tony jambu (obscure) tools of the trade for tuning oracle sq ls
Tony jambu   (obscure) tools of the trade for tuning oracle sq lsTony jambu   (obscure) tools of the trade for tuning oracle sq ls
Tony jambu (obscure) tools of the trade for tuning oracle sq ls
 
Advance Sql Server Store procedure Presentation
Advance Sql Server Store procedure PresentationAdvance Sql Server Store procedure Presentation
Advance Sql Server Store procedure Presentation
 
Sql Nexus
Sql NexusSql Nexus
Sql Nexus
 
2013 Collaborate - OAUG - Presentation
2013 Collaborate - OAUG - Presentation2013 Collaborate - OAUG - Presentation
2013 Collaborate - OAUG - Presentation
 
Practical SQL query monitoring and optimization
Practical SQL query monitoring and optimizationPractical SQL query monitoring and optimization
Practical SQL query monitoring and optimization
 
SQL Performance Tuning and New Features in Oracle 19c
SQL Performance Tuning and New Features in Oracle 19cSQL Performance Tuning and New Features in Oracle 19c
SQL Performance Tuning and New Features in Oracle 19c
 
active_session_history_oracle_performance.ppt
active_session_history_oracle_performance.pptactive_session_history_oracle_performance.ppt
active_session_history_oracle_performance.ppt
 
05_DP_300T00A_Optimize.pptx
05_DP_300T00A_Optimize.pptx05_DP_300T00A_Optimize.pptx
05_DP_300T00A_Optimize.pptx
 
Using AWR for SQL Analysis
Using AWR for SQL AnalysisUsing AWR for SQL Analysis
Using AWR for SQL Analysis
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Performance Tuning With Oracle ASH and AWR. Part 1 How And What

  • 1. Part 1 : What, When and How Virtathon 7/2011 Uday Moogala Vlado Barun
  • 2.
  • 3.
  • 4.
  • 5. In order to know what to fix, we need to be able to see what’s broken! - Dan Roam
  • 6. What Identify (app is slow) Quantify (takes 1m) Timeline (in peak hours) Component (MT or DB or N/W) Flow chart Root Cause (Stats not updated) AWR/ASH, Trace, Apps Logs/Tables, OS/IO stats etc SQL/Object Stats, Execution Plans, etc Initial Data collec-tion How Much When Where How Why Analyze Additional Data collec-tion Understanding the issue…
  • 7. Non-DB Time DB Time Getting to know the System…
  • 8. An example… I/O On CPU I/O On CPU Browse Books Read Reviews For One Book Add to Cart Checkout TIME = time spent in database = user/network/app tier time
  • 9. = time spent in database SQL Trace (Microsecond level) Application Logging (custom level) Gathering Performance Data… (SQL Trace, ASH) 21 ASH Samples 3 ASH Samples in AWR Browse Books Read Reviews For One Book Add to Cart Checkout TIME v$active_session_history (1 second intervals) dba_hist_active_sess_history (10 second intervals)
  • 10.
  • 11.
  • 12. Active Session History (ASH) - Dimensions When SAMPLE_ID SAMPLE_TIME Session SESSION_ID SESSION_SERIAL# SESSION_TYPE SESSION_STATE USER_ID QC_INSTANCE_ID QC_SESSION_ID QC_SESSION_SERIAL# CLIENT_ID IN and IS columns SQL SQL_ID IS_SQLID_CURRENT SQL_CHILD_NUMBER SQL_OPCODE SQL_OPNAME TOP_LEVEL_SQL_ID TOP_LEVEL_SQL_OPCODE SQL_EXEC_ID SQL_EXEC_START SQL_PLAN_HASH_VALUE SQL_PLAN_OPTIONS Row Source SQL_PLAN_LINE_ID SQL_PLAN_OPERATION Waits EVENT EVENT_ID EVENT# SEQ# P1TEXT P1 P2TEXT P2 P3TEXT P3 WAIT_CLASS WAIT_CLASS_ID WAIT_TIME TIME_WAITED CURRENT_OBJ# CURRENT_FILE# CURRENT_BLOCK# CURRENT_ROW# Blocking Session BLOCKING_SESSION_STATUS BLOCKING_SESSION BLOCKING_SESSION_SERIAL# BLOCKING_INST_ID BLOCKING_HANGCHAIN_INFO Object CURRENT_OBJ# CURRENT_FILE# CURRENT_BLOCK# CURRENT_ROW# Application SERVICE_HASH PROGRAM MODULE ACTION MACHINE Statistics TM_DELTA_TIME TM_DELTA_CPU_TIME TM_DELTA_DB_TIME DELTA_TIME DELTA_READ_IO_REQUESTS DELTA_WRITE_IO_REQUESTS DELTA_READ_IO_BYTES DELTA_WRITE_IO_BYTES DELTA_INTERCONNECT_IO_BYTES PGA_ALLOCATED TEMP_SPACE_ALLOCATED
  • 13.
  • 14. select * from table(dbms_xplan.display_cursor('&SQL_ID',null,'ALLSTATS LAST')); SQL_ID 0s5pdsggxtc54, child number 0 ------------------------------------- Plan hash value: 2832870632 ---------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ---------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | | | 152K(100)| | | 1 | SORT AGGREGATE | | 1 | 2 | | | |* 2 | TABLE ACCESS FULL| TAB_A | 21M| 41M| 152K (5)| 00:00:03 | ---------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - filter("COSTED_FLAG" IS NULL) Note ----- - Warning: basic plan statistics not available. These are only collected when: * hint 'gather_plan_statistics' is used for the statement or * parameter 'statistics_level' is set to 'ALL', at session or system level Display_Cursor Estimates with Statistics_level = Typical SQL_ID 0s5pdsggxtc54, child number 1 ------------------------------------- Plan hash value: 2832870632 -------------------------------------------------------------------------------------- | Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers | -------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | | 1 |00:00:01.73 | 435K| | 1 | SORT AGGREGATE | | 1 | 1 | 1 |00:00:01.73 | 435K| |* 2 | TABLE ACCESS FULL| TAB_A | 1 | 1351K| 2001K|00:00:01.64 | 435K| -------------------------------------------------------------------------------------- Actual runtime stats with Statistics_level = ALL or with gather_plan_statistics hint
  • 15. Display_AWR SQL_ID 0s5pdsggxtc54 -------------------- ---------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ---------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | | | 22217 (100)| | | 1 | SORT AGGREGATE | | 1 | 2 | | | | 2 | TABLE ACCESS FULL| TAB_A | 1351K| 2639K| 22217 (1)| 00:04:27 | ----------------------------------------------------------------------------
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. Q & A

Editor's Notes

  1. Who: one or all users/programs What: Response Time, Throughput, Error, Crash etc How Much: How Slow When: At what times? Where: Which component? How: Series of events Why: seeing big picture
  2. Collects database performance statistics stored in memory and in database used by ADDM and Advisors (SQL Tuning, Segment, Undo) Select * from dict where table_name like ‘DBA_HIST%SQL%’; TABLE_NAME COMMENTS ------------------------------ -------------------------------------------------------------------------------- DBA_HIST_COLORED_SQL Marked SQLs for snapshots DBA_HIST_SQLBIND SQL Bind Information DBA_HIST_SQLCOMMAND_NAME Sql command types DBA_HIST_SQLSTAT SQL Historical Statistics Information DBA_HIST_SQLTEXT SQL Text DBA_HIST_SQL_BIND_METADATA SQL Bind Metadata Information DBA_HIST_SQL_PLAN SQL Plan Information DBA_HIST_SQL_SUMMARY Summary of SQL Statistics DBA_HIST_SQL_WORKAREA_HSTGRM SQL Workarea Histogram History select distinct stat_name from V$SYS_TIME_MODEL ; STAT_NAME ---------------------------------------------------------------- DB CPU background elapsed time hard parse elapsed time RMAN cpu time (backup/restore) DB time hard parse (bind mismatch) elapsed time inbound PL/SQL rpc elapsed time repeated bind elapsed time background cpu time connection management call elapsed time failed parse elapsed time hard parse (sharing criteria) elapsed time PL/SQL compilation elapsed time failed parse (out of shared memory) elapsed time Java execution elapsed time parse time elapsed sequence load elapsed time sql execute elapsed time PL/SQL execution elapsed time 19 rows selected.
  3. 11g has SQL_PLAN_LINE_ID, SQL_PLAN_OPERATION to further drilldown a SQL performance issue using ASH