SlideShare a Scribd company logo
NYOUG – Summer Meeting – AWR 11g

ADDM, ASH and AWR
A DBA’s Best Friends

Earl D. Shaffer
Senior Oracle DBA
Planet Payment
LinkedIn: “Earl D Shaffer”
NYOUG – Summer Meeting – AWR 11g

My Oracle
qualifications
•
•
•
•
•
•

30+ years of hands-on IS experience
Oracle DBA since 1988, Unix, WIN, Linux
Project Leader, Forms/Reports/Pro*C
Presented Oracle technical papers at 10
international conferences, 25+ elsewhere
Hands-on DBA v6, 7, 8i, 9i, 10g, 11g, 12c
Oracle Corp Adv Cust Service team alumni
NYOUG – Summer Meeting – AWR 11g

Format of the
Presentation
•
•
•
•
•
•

Survey of your Oracle DBA Experience
Go through the basic slides
Look at real AWR, ASH, and ADDM reports
Go through screen captures, graphs,
diagrams, and real-life examples
See the AWR tables/views for DB 12c
If time, go over real scripts that use AWR
NYOUG – Summer Meeting – AWR 11g

The Bad Old Days
•
•
•
•
•

In 1988, V5.1 was out and 6.0 was coming
Oracle v6 through v8.0 had BSTAT/ESTAT
reports (but the tables were in SYSTEM)
We tuned using “cache hit ratios”
Wait info was captured, but hard to get to
Before 8i, tuning was “an art” because it was
subjective, and hard to repeat
NYOUG – Summer Meeting – AWR 11g

Working hard to
get any real
Improvement
•
•
•
•
•

No one wants to get the “DB is slow” call
Management usually does not want to buy
more RAM or a new, faster server
In most cases, you have to make what you
have run faster with no additional resources
Performance Tuning = Magic Trick?
HINT – make a list of things that work, where
they work, and use it again next time
NYOUG – Summer Meeting – AWR 11g

Work Smarter Not
Harder
•
•
•
•
•
•

Cache hit ratios are deceptive
You really want to know: 'what is going on'
Need info on all resources inside the DB
Need stats on all the SQL recently run
Need a way to compare 1pm to 9am
Would be nice if the DB did this for us
NYOUG – Summer Meeting – AWR 11g

AWR to the Rescue
•
•
•
•
•
•
•

Automatic Workload Repository
Auto gather of internal DB statistics
Key – stats stored in DB managed tables
Easy-to-use views help the DBA use the info
Feeds into ADDM and the advisory suite
Frequency of stats gather can be changed
Statistics retention time can be changed
NYOUG – Summer Meeting – AWR 11g

What about STATSPACK?

•
•
•
•
•
•

Why not just use our friend STATSPACK?
Was better than BSTAT/ESTAT
Requires an external job to get a snapshot
Physical tables need manual management
Report is good, but limited
Cannot easily compare REP4 to REP5
NYOUG – Summer Meeting – AWR 11g

V$ACTIVE_SESSION_HISTORY

•
•
•

V$ACTIVE_SESSION_HISTORY displays
sampled session activity in the database.
It contains snapshots of active database
sessions taken once a second.
A database session is considered active if it
was on the CPU or was waiting for an event
that didn't belong to the Idle wait class.
NYOUG – Summer Meeting – AWR 11g

The Players
•
•
•
•
•

ADDM – the AI sub-system of DB rules
ASH – active session history, “back info”
AWR – Automatic Workload Repository
Enterprise Manager – info + GUI + graphs
You – use ADDM, ASH, and AWR to monitor
the DB, fix problems, proactively plan make the
whole environment as effective as possible
NYOUG – Summer Meeting – AWR 11g

The Basics
•
•
•
•

•

Each stat gather is called a SNAPSHOT
A SNAPSHOT is specific to a point in time
DBA_HIST_SNAPSHOT joins to the views
Each DBA_HIST view has different kinds of
stats, from different areas of the DB, but all are
specific to a SNAPSHOT
There are 40+ 11g DBA_HIST views
NYOUG – Summer Meeting – AWR 11g

Examples of
the DBA_HIST
Views
•

DBA_HIST_SNAPSHOT - Displays snapshot information.

•

DBA_HIST_SYSSTAT - Displays detailed system statistics

•

DBA_HIST_FILESTATXS – Displays detailed datafile
statistics

•

DBA_HIST_SQL_SUMMARY – Displays summary and
higher level SQL statistics

•

DBA_HIST_SQLSTAT – Displays detailed SQL statistics

•

DBA_HIST_WAITSTAT – Displays detailed wait statistics
NYOUG – Summer Meeting – AWR 11g

Input to AWR Reports
Database time “DB Time” is:
total time spent by user processes either actively working or
actively waiting in a database call
Time spent in the DB by foreground sessions includes:
•CPU time
•IO time
•WAIT time
Excludes
•IDLE wait time
NYOUG – Summer Meeting – AWR 11g

AWR Reports
•
•
•

AWR reports are superior to STATSPACK
Based on the events between 2 snapshots
Can be run from $ORACLE_HOME/rdbms/admin



awrrpt.sql statistics for a range of snapshot Ids.





awrsqrpt.sql statistics of a particular SQL statement for a range of
snapshot IDs, to inspect the performance of a SQL statement.
awrddrpt.sql compares detailed performance attributes and
configuration settings between two selected time periods.
NYOUG – Summer Meeting – AWR 11g

AWR Reports (2)

•

AWR reports can be run as PL/SQL call
Call: dbms_workload_repository.awr_sql_report_text
•
Later we will look at “real” reports
•
Take report file and email it, or compress it
and move it to a filesystem for later review
Another example: www.dba-oracle.com/art_orafaq_awr_sql_tuning.htm
NYOUG – Summer Meeting – AWR 11g

AWR Reports (3)
•
•

AWR reports can be run via VARIABLES
Define the variables, then call the report:

define begin_snap = &1
define end_snap = &2
define report_name = &3
define report_type = 'text';
define db_name = 'SALES3';
define dbid = 994285834;
@/ora/product/11106/rdbms/admin/awrrpti
NYOUG – Summer Meeting – AWR 11g

Too Much Info?
•
•

With all the DBA_HIST views there, it can get
confusing as to which to use, and when
Look at these general categories:
File statistics
General system statistics
Concurrency statistics
Instance tuning statistics
SQL statistics
Segment Statistics
Undo Statistics
Time-model statistics
Recovery Statistics
NYOUG – Summer Meeting – AWR 11g

Some Real Query
Examples

Look at Buffer Pool stats
•
HISTBUFPOOLSTAT.SQL
Look at logon stats between 2 dates
•
LOGONHIST.SQL
NYOUG – Summer Meeting – AWR 11g

Learn, Learn and
Learn More
•
•
•
•
•
•

Oracle Doc – CD, online
Books by well-regarded authors
On-line websites and Blogs
National conferences and training classes
Local Oracle User Groups
Email with other local DBAs
NYOUG – Summer Meeting – AWR 11g

What Never Changes
•
•
•
•
•

End users cannot explain what 'seems slow'
really means
You wont get more money for RAM
More work, fewer people, multiple projects
Fixing AA can break BB
Everything affects everything else – other
DBs, other applications, other
programs/systems, SAN use, etc.
NYOUG – Summer Meeting – AWR 11g

Using these
new Powers
•
•
•
•
•
•

Looking for SQL which consumes the most
resources in your environment
See which areas use the same SQL
See IO Problems 'over time'
See the 'hottest' datafile this week
Explore the 'system metrics'
Use Enterprise Manager to 'dig in'
NYOUG – Summer Meeting – AWR 11g

Everyone Needs to
Have this Data
•
•
•
•
•

That includes the SAs, DBAs, and Developers
SAs can see IO and OS statistics
Developers can see SQL and PL/SQL plans
Data modelers can see Table/View use
Others DBAs can see the statistics and
compare them to issues they have seen
elsewhere, learn, and share their 'fixes'
NYOUG – Summer Meeting – AWR 11g

Things To
Watch Out For
•
•
•
•

Watch the size of SYSAUX
Don't test fixes in PROD, 'test in test'
Don't change the snapshot interval, it is a
good balance between too often/too few
Unless you run reports and save the output,
you cant diagnose a 'down DB'
NYOUG – Summer Meeting – AWR 11g

Final Tips
•
•
•
•
•

Use AWR in 10g and 11g, and remove
STATSPACK from the DB entirely
Set the retention to 60 or 90 days
Develop your own set of scripts that you can run
regularly, OEM 'steps' are often forgotten/lost
Review the reports at least once a week
Look into ASH also for more information
Ad

More Related Content

What's hot (20)

The Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RACThe Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
Markus Michalewicz
 
MAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19c
Markus Michalewicz
 
Oracle statistics by example
Oracle statistics by exampleOracle statistics by example
Oracle statistics by example
Mauro Pagano
 
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
Zohar Elkayam
 
AWR and ASH Deep Dive
AWR and ASH Deep DiveAWR and ASH Deep Dive
AWR and ASH Deep Dive
Kellyn Pot'Vin-Gorman
 
AWR & ASH Analysis
AWR & ASH AnalysisAWR & ASH Analysis
AWR & ASH Analysis
aioughydchapter
 
Data Guard Architecture & Setup
Data Guard Architecture & SetupData Guard Architecture & Setup
Data Guard Architecture & Setup
Satishbabu Gunukula
 
Oracle Data Guard
Oracle Data GuardOracle Data Guard
Oracle Data Guard
Martin Meyer
 
Understanding oracle rac internals part 1 - slides
Understanding oracle rac internals   part 1 - slidesUnderstanding oracle rac internals   part 1 - slides
Understanding oracle rac internals part 1 - slides
Mohamed Farouk
 
Whitepaper: Mining the AWR repository for Capacity Planning and Visualization
Whitepaper: Mining the AWR repository for Capacity Planning and VisualizationWhitepaper: Mining the AWR repository for Capacity Planning and Visualization
Whitepaper: Mining the AWR repository for Capacity Planning and Visualization
Kristofferson A
 
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the CloudOracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Markus Michalewicz
 
UKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction LocksUKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction Locks
Kyle Hailey
 
"It can always get worse!" – Lessons Learned in over 20 years working with Or...
"It can always get worse!" – Lessons Learned in over 20 years working with Or..."It can always get worse!" – Lessons Learned in over 20 years working with Or...
"It can always get worse!" – Lessons Learned in over 20 years working with Or...
Markus Michalewicz
 
Chasing the optimizer
Chasing the optimizerChasing the optimizer
Chasing the optimizer
Mauro Pagano
 
Analyzing and Interpreting AWR
Analyzing and Interpreting AWRAnalyzing and Interpreting AWR
Analyzing and Interpreting AWR
pasalapudi
 
Advanced backup methods (Postgres@CERN)
Advanced backup methods (Postgres@CERN)Advanced backup methods (Postgres@CERN)
Advanced backup methods (Postgres@CERN)
Anastasia Lubennikova
 
B35 all you wanna know about rman by francisco alvarez
B35 all you wanna know about rman by francisco alvarezB35 all you wanna know about rman by francisco alvarez
B35 all you wanna know about rman by francisco alvarez
Insight Technology, Inc.
 
Tanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools short
Tanel Poder
 
AutoUpgrade and Best Practices
AutoUpgrade and Best PracticesAutoUpgrade and Best Practices
AutoUpgrade and Best Practices
Jitendra Singh
 
How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?
Alkin Tezuysal
 
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RACThe Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
Markus Michalewicz
 
MAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19c
Markus Michalewicz
 
Oracle statistics by example
Oracle statistics by exampleOracle statistics by example
Oracle statistics by example
Mauro Pagano
 
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
Zohar Elkayam
 
Understanding oracle rac internals part 1 - slides
Understanding oracle rac internals   part 1 - slidesUnderstanding oracle rac internals   part 1 - slides
Understanding oracle rac internals part 1 - slides
Mohamed Farouk
 
Whitepaper: Mining the AWR repository for Capacity Planning and Visualization
Whitepaper: Mining the AWR repository for Capacity Planning and VisualizationWhitepaper: Mining the AWR repository for Capacity Planning and Visualization
Whitepaper: Mining the AWR repository for Capacity Planning and Visualization
Kristofferson A
 
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the CloudOracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Markus Michalewicz
 
UKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction LocksUKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction Locks
Kyle Hailey
 
"It can always get worse!" – Lessons Learned in over 20 years working with Or...
"It can always get worse!" – Lessons Learned in over 20 years working with Or..."It can always get worse!" – Lessons Learned in over 20 years working with Or...
"It can always get worse!" – Lessons Learned in over 20 years working with Or...
Markus Michalewicz
 
Chasing the optimizer
Chasing the optimizerChasing the optimizer
Chasing the optimizer
Mauro Pagano
 
Analyzing and Interpreting AWR
Analyzing and Interpreting AWRAnalyzing and Interpreting AWR
Analyzing and Interpreting AWR
pasalapudi
 
Advanced backup methods (Postgres@CERN)
Advanced backup methods (Postgres@CERN)Advanced backup methods (Postgres@CERN)
Advanced backup methods (Postgres@CERN)
Anastasia Lubennikova
 
B35 all you wanna know about rman by francisco alvarez
B35 all you wanna know about rman by francisco alvarezB35 all you wanna know about rman by francisco alvarez
B35 all you wanna know about rman by francisco alvarez
Insight Technology, Inc.
 
Tanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools short
Tanel Poder
 
AutoUpgrade and Best Practices
AutoUpgrade and Best PracticesAutoUpgrade and Best Practices
AutoUpgrade and Best Practices
Jitendra Singh
 
How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?
Alkin Tezuysal
 

Viewers also liked (20)

OOUG - Oracle Performance Tuning with AAS
OOUG - Oracle Performance Tuning with AASOOUG - Oracle Performance Tuning with AAS
OOUG - Oracle Performance Tuning with AAS
Kyle Hailey
 
Oracle LOB Internals and Performance Tuning
Oracle LOB Internals and Performance TuningOracle LOB Internals and Performance Tuning
Oracle LOB Internals and Performance Tuning
Tanel Poder
 
zero data loss recovery appliance
 zero data loss recovery appliance zero data loss recovery appliance
zero data loss recovery appliance
Johan Louwers
 
Database As A Service: OEM + ODA (OOW 15 Presentation)
Database As A Service: OEM + ODA (OOW 15 Presentation)Database As A Service: OEM + ODA (OOW 15 Presentation)
Database As A Service: OEM + ODA (OOW 15 Presentation)
Bobby Curtis
 
Oracle 10g Performance: chapter 00 intro live_short
Oracle 10g Performance: chapter 00 intro live_shortOracle 10g Performance: chapter 00 intro live_short
Oracle 10g Performance: chapter 00 intro live_short
Kyle Hailey
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuning
Abishek V S
 
Sql DML
Sql DMLSql DML
Sql DML
Vikas Gupta
 
Oracle cloud, private, public and hybrid
Oracle cloud, private, public and hybridOracle cloud, private, public and hybrid
Oracle cloud, private, public and hybrid
Johan Louwers
 
OOUG: Oracle transaction locking
OOUG: Oracle transaction lockingOOUG: Oracle transaction locking
OOUG: Oracle transaction locking
Kyle Hailey
 
Oracle Database Performance Tuning Concept
Oracle Database Performance Tuning ConceptOracle Database Performance Tuning Concept
Oracle Database Performance Tuning Concept
Chien Chung Shen
 
Oracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture Performance
Enkitec
 
Oracle Database Performance Tuning: The Not SQL Option
Oracle Database Performance Tuning: The Not SQL OptionOracle Database Performance Tuning: The Not SQL Option
Oracle Database Performance Tuning: The Not SQL Option
Guatemala User Group
 
Extreme Replication - Performance Tuning Oracle GoldenGate
Extreme Replication - Performance Tuning Oracle GoldenGateExtreme Replication - Performance Tuning Oracle GoldenGate
Extreme Replication - Performance Tuning Oracle GoldenGate
Bobby Curtis
 
Advanced goldengate training ⅰ
Advanced goldengate training ⅰAdvanced goldengate training ⅰ
Advanced goldengate training ⅰ
oggers
 
Oracle Goldengate training by Vipin Mishra
Oracle Goldengate training by Vipin Mishra Oracle Goldengate training by Vipin Mishra
Oracle Goldengate training by Vipin Mishra
Vipin Mishra
 
Oracle database 12c 2 day + performance tuning guide
Oracle database 12c 2 day + performance tuning guideOracle database 12c 2 day + performance tuning guide
Oracle database 12c 2 day + performance tuning guide
bupbechanhgmail
 
Oracle DB Performance Tuning Tips
Oracle DB Performance Tuning TipsOracle DB Performance Tuning Tips
Oracle DB Performance Tuning Tips
Asanka Dilruk
 
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
 
All of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL DeveloperAll of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL Developer
Jeff Smith
 
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And WhatPerformance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
udaymoogala
 
OOUG - Oracle Performance Tuning with AAS
OOUG - Oracle Performance Tuning with AASOOUG - Oracle Performance Tuning with AAS
OOUG - Oracle Performance Tuning with AAS
Kyle Hailey
 
Oracle LOB Internals and Performance Tuning
Oracle LOB Internals and Performance TuningOracle LOB Internals and Performance Tuning
Oracle LOB Internals and Performance Tuning
Tanel Poder
 
zero data loss recovery appliance
 zero data loss recovery appliance zero data loss recovery appliance
zero data loss recovery appliance
Johan Louwers
 
Database As A Service: OEM + ODA (OOW 15 Presentation)
Database As A Service: OEM + ODA (OOW 15 Presentation)Database As A Service: OEM + ODA (OOW 15 Presentation)
Database As A Service: OEM + ODA (OOW 15 Presentation)
Bobby Curtis
 
Oracle 10g Performance: chapter 00 intro live_short
Oracle 10g Performance: chapter 00 intro live_shortOracle 10g Performance: chapter 00 intro live_short
Oracle 10g Performance: chapter 00 intro live_short
Kyle Hailey
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuning
Abishek V S
 
Oracle cloud, private, public and hybrid
Oracle cloud, private, public and hybridOracle cloud, private, public and hybrid
Oracle cloud, private, public and hybrid
Johan Louwers
 
OOUG: Oracle transaction locking
OOUG: Oracle transaction lockingOOUG: Oracle transaction locking
OOUG: Oracle transaction locking
Kyle Hailey
 
Oracle Database Performance Tuning Concept
Oracle Database Performance Tuning ConceptOracle Database Performance Tuning Concept
Oracle Database Performance Tuning Concept
Chien Chung Shen
 
Oracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture Performance
Enkitec
 
Oracle Database Performance Tuning: The Not SQL Option
Oracle Database Performance Tuning: The Not SQL OptionOracle Database Performance Tuning: The Not SQL Option
Oracle Database Performance Tuning: The Not SQL Option
Guatemala User Group
 
Extreme Replication - Performance Tuning Oracle GoldenGate
Extreme Replication - Performance Tuning Oracle GoldenGateExtreme Replication - Performance Tuning Oracle GoldenGate
Extreme Replication - Performance Tuning Oracle GoldenGate
Bobby Curtis
 
Advanced goldengate training ⅰ
Advanced goldengate training ⅰAdvanced goldengate training ⅰ
Advanced goldengate training ⅰ
oggers
 
Oracle Goldengate training by Vipin Mishra
Oracle Goldengate training by Vipin Mishra Oracle Goldengate training by Vipin Mishra
Oracle Goldengate training by Vipin Mishra
Vipin Mishra
 
Oracle database 12c 2 day + performance tuning guide
Oracle database 12c 2 day + performance tuning guideOracle database 12c 2 day + performance tuning guide
Oracle database 12c 2 day + performance tuning guide
bupbechanhgmail
 
Oracle DB Performance Tuning Tips
Oracle DB Performance Tuning TipsOracle DB Performance Tuning Tips
Oracle DB Performance Tuning Tips
Asanka Dilruk
 
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
 
All of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL DeveloperAll of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL Developer
Jeff Smith
 
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And WhatPerformance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
udaymoogala
 
Ad

Similar to Earl Shaffer Oracle Performance Tuning pre12c 11g AWR uses (20)

Remote DBA Experts SQL Server 2008 New Features
Remote DBA Experts SQL Server 2008 New FeaturesRemote DBA Experts SQL Server 2008 New Features
Remote DBA Experts SQL Server 2008 New Features
Remote DBA Experts
 
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Denny Lee
 
In-memory ColumnStore Index
In-memory ColumnStore IndexIn-memory ColumnStore Index
In-memory ColumnStore Index
SolidQ
 
Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007
John Beresniewicz
 
Analysing and Troubleshooting Performance Issues in SAP BusinessObjects BI Re...
Analysing and Troubleshooting Performance Issues in SAP BusinessObjects BI Re...Analysing and Troubleshooting Performance Issues in SAP BusinessObjects BI Re...
Analysing and Troubleshooting Performance Issues in SAP BusinessObjects BI Re...
BI Brainz
 
Snowplow Analytics: from NoSQL to SQL and back again
Snowplow Analytics: from NoSQL to SQL and back againSnowplow Analytics: from NoSQL to SQL and back again
Snowplow Analytics: from NoSQL to SQL and back again
Alexander Dean
 
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersKoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
Tobias Koprowski
 
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersKoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
Tobias Koprowski
 
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
Alfredo Krieg
 
Sql server tips from the field
Sql server tips from the fieldSql server tips from the field
Sql server tips from the field
JoAnna Cheshire
 
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
John Beresniewicz
 
Introducing Azure SQL Database
Introducing Azure SQL DatabaseIntroducing Azure SQL Database
Introducing Azure SQL Database
James Serra
 
An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)
Marco Gralike
 
An AMIS overview of database 12c
An AMIS overview of database 12cAn AMIS overview of database 12c
An AMIS overview of database 12c
Getting value from IoT, Integration and Data Analytics
 
Boosting the Performance of your Rails Apps
Boosting the Performance of your Rails AppsBoosting the Performance of your Rails Apps
Boosting the Performance of your Rails Apps
Matt Kuklinski
 
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
DAGEOP LTD
 
Ashawr perf kscope
Ashawr perf kscopeAshawr perf kscope
Ashawr perf kscope
Kellyn Pot'Vin-Gorman
 
Oracle DataGuard Online Training in USA | INDIA
Oracle DataGuard Online Training in USA | INDIAOracle DataGuard Online Training in USA | INDIA
Oracle DataGuard Online Training in USA | INDIA
Xoom Trainings
 
DB12c: All You Need to Know About the Resource Manager
DB12c: All You Need to Know About the Resource ManagerDB12c: All You Need to Know About the Resource Manager
DB12c: All You Need to Know About the Resource Manager
Maris Elsins
 
11gR2 Upgrade.pdf
11gR2 Upgrade.pdf11gR2 Upgrade.pdf
11gR2 Upgrade.pdf
Ganesan368890
 
Remote DBA Experts SQL Server 2008 New Features
Remote DBA Experts SQL Server 2008 New FeaturesRemote DBA Experts SQL Server 2008 New Features
Remote DBA Experts SQL Server 2008 New Features
Remote DBA Experts
 
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Denny Lee
 
In-memory ColumnStore Index
In-memory ColumnStore IndexIn-memory ColumnStore Index
In-memory ColumnStore Index
SolidQ
 
Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007
John Beresniewicz
 
Analysing and Troubleshooting Performance Issues in SAP BusinessObjects BI Re...
Analysing and Troubleshooting Performance Issues in SAP BusinessObjects BI Re...Analysing and Troubleshooting Performance Issues in SAP BusinessObjects BI Re...
Analysing and Troubleshooting Performance Issues in SAP BusinessObjects BI Re...
BI Brainz
 
Snowplow Analytics: from NoSQL to SQL and back again
Snowplow Analytics: from NoSQL to SQL and back againSnowplow Analytics: from NoSQL to SQL and back again
Snowplow Analytics: from NoSQL to SQL and back again
Alexander Dean
 
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersKoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
Tobias Koprowski
 
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersKoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
Tobias Koprowski
 
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
Alfredo Krieg
 
Sql server tips from the field
Sql server tips from the fieldSql server tips from the field
Sql server tips from the field
JoAnna Cheshire
 
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
John Beresniewicz
 
Introducing Azure SQL Database
Introducing Azure SQL DatabaseIntroducing Azure SQL Database
Introducing Azure SQL Database
James Serra
 
An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)
Marco Gralike
 
Boosting the Performance of your Rails Apps
Boosting the Performance of your Rails AppsBoosting the Performance of your Rails Apps
Boosting the Performance of your Rails Apps
Matt Kuklinski
 
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
DAGEOP LTD
 
Oracle DataGuard Online Training in USA | INDIA
Oracle DataGuard Online Training in USA | INDIAOracle DataGuard Online Training in USA | INDIA
Oracle DataGuard Online Training in USA | INDIA
Xoom Trainings
 
DB12c: All You Need to Know About the Resource Manager
DB12c: All You Need to Know About the Resource ManagerDB12c: All You Need to Know About the Resource Manager
DB12c: All You Need to Know About the Resource Manager
Maris Elsins
 
Ad

Recently uploaded (20)

tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 

Earl Shaffer Oracle Performance Tuning pre12c 11g AWR uses

  • 1. NYOUG – Summer Meeting – AWR 11g ADDM, ASH and AWR A DBA’s Best Friends Earl D. Shaffer Senior Oracle DBA Planet Payment LinkedIn: “Earl D Shaffer”
  • 2. NYOUG – Summer Meeting – AWR 11g My Oracle qualifications • • • • • • 30+ years of hands-on IS experience Oracle DBA since 1988, Unix, WIN, Linux Project Leader, Forms/Reports/Pro*C Presented Oracle technical papers at 10 international conferences, 25+ elsewhere Hands-on DBA v6, 7, 8i, 9i, 10g, 11g, 12c Oracle Corp Adv Cust Service team alumni
  • 3. NYOUG – Summer Meeting – AWR 11g Format of the Presentation • • • • • • Survey of your Oracle DBA Experience Go through the basic slides Look at real AWR, ASH, and ADDM reports Go through screen captures, graphs, diagrams, and real-life examples See the AWR tables/views for DB 12c If time, go over real scripts that use AWR
  • 4. NYOUG – Summer Meeting – AWR 11g The Bad Old Days • • • • • In 1988, V5.1 was out and 6.0 was coming Oracle v6 through v8.0 had BSTAT/ESTAT reports (but the tables were in SYSTEM) We tuned using “cache hit ratios” Wait info was captured, but hard to get to Before 8i, tuning was “an art” because it was subjective, and hard to repeat
  • 5. NYOUG – Summer Meeting – AWR 11g Working hard to get any real Improvement • • • • • No one wants to get the “DB is slow” call Management usually does not want to buy more RAM or a new, faster server In most cases, you have to make what you have run faster with no additional resources Performance Tuning = Magic Trick? HINT – make a list of things that work, where they work, and use it again next time
  • 6. NYOUG – Summer Meeting – AWR 11g Work Smarter Not Harder • • • • • • Cache hit ratios are deceptive You really want to know: 'what is going on' Need info on all resources inside the DB Need stats on all the SQL recently run Need a way to compare 1pm to 9am Would be nice if the DB did this for us
  • 7. NYOUG – Summer Meeting – AWR 11g AWR to the Rescue • • • • • • • Automatic Workload Repository Auto gather of internal DB statistics Key – stats stored in DB managed tables Easy-to-use views help the DBA use the info Feeds into ADDM and the advisory suite Frequency of stats gather can be changed Statistics retention time can be changed
  • 8. NYOUG – Summer Meeting – AWR 11g What about STATSPACK? • • • • • • Why not just use our friend STATSPACK? Was better than BSTAT/ESTAT Requires an external job to get a snapshot Physical tables need manual management Report is good, but limited Cannot easily compare REP4 to REP5
  • 9. NYOUG – Summer Meeting – AWR 11g V$ACTIVE_SESSION_HISTORY • • • V$ACTIVE_SESSION_HISTORY displays sampled session activity in the database. It contains snapshots of active database sessions taken once a second. A database session is considered active if it was on the CPU or was waiting for an event that didn't belong to the Idle wait class.
  • 10. NYOUG – Summer Meeting – AWR 11g The Players • • • • • ADDM – the AI sub-system of DB rules ASH – active session history, “back info” AWR – Automatic Workload Repository Enterprise Manager – info + GUI + graphs You – use ADDM, ASH, and AWR to monitor the DB, fix problems, proactively plan make the whole environment as effective as possible
  • 11. NYOUG – Summer Meeting – AWR 11g The Basics • • • • • Each stat gather is called a SNAPSHOT A SNAPSHOT is specific to a point in time DBA_HIST_SNAPSHOT joins to the views Each DBA_HIST view has different kinds of stats, from different areas of the DB, but all are specific to a SNAPSHOT There are 40+ 11g DBA_HIST views
  • 12. NYOUG – Summer Meeting – AWR 11g Examples of the DBA_HIST Views • DBA_HIST_SNAPSHOT - Displays snapshot information. • DBA_HIST_SYSSTAT - Displays detailed system statistics • DBA_HIST_FILESTATXS – Displays detailed datafile statistics • DBA_HIST_SQL_SUMMARY – Displays summary and higher level SQL statistics • DBA_HIST_SQLSTAT – Displays detailed SQL statistics • DBA_HIST_WAITSTAT – Displays detailed wait statistics
  • 13. NYOUG – Summer Meeting – AWR 11g Input to AWR Reports Database time “DB Time” is: total time spent by user processes either actively working or actively waiting in a database call Time spent in the DB by foreground sessions includes: •CPU time •IO time •WAIT time Excludes •IDLE wait time
  • 14. NYOUG – Summer Meeting – AWR 11g AWR Reports • • • AWR reports are superior to STATSPACK Based on the events between 2 snapshots Can be run from $ORACLE_HOME/rdbms/admin  awrrpt.sql statistics for a range of snapshot Ids.   awrsqrpt.sql statistics of a particular SQL statement for a range of snapshot IDs, to inspect the performance of a SQL statement. awrddrpt.sql compares detailed performance attributes and configuration settings between two selected time periods.
  • 15. NYOUG – Summer Meeting – AWR 11g AWR Reports (2) • AWR reports can be run as PL/SQL call Call: dbms_workload_repository.awr_sql_report_text • Later we will look at “real” reports • Take report file and email it, or compress it and move it to a filesystem for later review Another example: www.dba-oracle.com/art_orafaq_awr_sql_tuning.htm
  • 16. NYOUG – Summer Meeting – AWR 11g AWR Reports (3) • • AWR reports can be run via VARIABLES Define the variables, then call the report: define begin_snap = &1 define end_snap = &2 define report_name = &3 define report_type = 'text'; define db_name = 'SALES3'; define dbid = 994285834; @/ora/product/11106/rdbms/admin/awrrpti
  • 17. NYOUG – Summer Meeting – AWR 11g Too Much Info? • • With all the DBA_HIST views there, it can get confusing as to which to use, and when Look at these general categories: File statistics General system statistics Concurrency statistics Instance tuning statistics SQL statistics Segment Statistics Undo Statistics Time-model statistics Recovery Statistics
  • 18. NYOUG – Summer Meeting – AWR 11g Some Real Query Examples Look at Buffer Pool stats • HISTBUFPOOLSTAT.SQL Look at logon stats between 2 dates • LOGONHIST.SQL
  • 19. NYOUG – Summer Meeting – AWR 11g Learn, Learn and Learn More • • • • • • Oracle Doc – CD, online Books by well-regarded authors On-line websites and Blogs National conferences and training classes Local Oracle User Groups Email with other local DBAs
  • 20. NYOUG – Summer Meeting – AWR 11g What Never Changes • • • • • End users cannot explain what 'seems slow' really means You wont get more money for RAM More work, fewer people, multiple projects Fixing AA can break BB Everything affects everything else – other DBs, other applications, other programs/systems, SAN use, etc.
  • 21. NYOUG – Summer Meeting – AWR 11g Using these new Powers • • • • • • Looking for SQL which consumes the most resources in your environment See which areas use the same SQL See IO Problems 'over time' See the 'hottest' datafile this week Explore the 'system metrics' Use Enterprise Manager to 'dig in'
  • 22. NYOUG – Summer Meeting – AWR 11g Everyone Needs to Have this Data • • • • • That includes the SAs, DBAs, and Developers SAs can see IO and OS statistics Developers can see SQL and PL/SQL plans Data modelers can see Table/View use Others DBAs can see the statistics and compare them to issues they have seen elsewhere, learn, and share their 'fixes'
  • 23. NYOUG – Summer Meeting – AWR 11g Things To Watch Out For • • • • Watch the size of SYSAUX Don't test fixes in PROD, 'test in test' Don't change the snapshot interval, it is a good balance between too often/too few Unless you run reports and save the output, you cant diagnose a 'down DB'
  • 24. NYOUG – Summer Meeting – AWR 11g Final Tips • • • • • Use AWR in 10g and 11g, and remove STATSPACK from the DB entirely Set the retention to 60 or 90 days Develop your own set of scripts that you can run regularly, OEM 'steps' are often forgotten/lost Review the reports at least once a week Look into ASH also for more information