SlideShare une entreprise Scribd logo
1  sur  79
Télécharger pour lire hors ligne
How to Dive in Fast and Find the Right
Answer to the Big Questions
Kellyn Pot’Vin, Sr. Technical Consultant
A Little About Me:
 ACE Director, Oak Table Member
 Board of Directors for RMOUG
 Conference Director for RMOUG
 DB Track Lead for KSCOPE
 Author and presenter at Oracle
Open World, HotSos, Collaborate,
KSCOPE and others…
 Advocate for Women in Technology
 Lives in Westminster, CO!
Bit of a Change
What do I get questions on?
 Work Smart, Don’t Work Hard…


 ASH/AWR Reports in EM12c
 Compare ADDM
 SQL Monitor
 ASH/AWR Reporting from the Command

Line
 Search SQL, (Least Used Feature of EM)
 ASH Queries
The Road Trip
Where do you want to go?
 How will you get there?

Cool….
Where You End up…
Stay on the Right Road
Optimization- Tune for Time or You’re
Wasting Time.
 Know Your Goal(s)
 Set a Stopping Point, avoid OTD,
(Obsessive Tuning Disorder)
 Do NOT Assume. Always do the
Research and Have Data.

Brief History









ASH= Active Session History
AWR= Automatic Workload Repository
Introduced in Oracle 10g
Evolution to statspack, requests for
performance reporting improvements.
“Always on” approach to performance
metrics with requirement of non-locking
collection process.
Requires Management Diagnostic Pack
License from Oracle.
The Location in EM12c For Some
of Today’s Presentation…
Running ASH Report from EM
•
•
•
•

ASH is by time, not snapshot.
Set start date and time.
End date and time
Generate report
HTML Format ASH
Main ASH Info
Top SQL, Top Sessions
Top SQL Details
Top Parallel, Top DB Files
How Often Are We Asked, “What
Changed?”
It ran fine last week, now it doesn’t!
 ETL loads have changed, but no one
has released any new code!
 The DBA says there hasn’t been any
parameter changes to this database, but
I’m sure there have been.




Compare ADDM Resolution
What is Compare ADDM?
Uses Two AWR snapshots
 Creates Report that

 Compares SQL that is common and

different.
 SGA changes
 IO/CPU bound issues
 Parameter Changes
What is in an ADDM Compare?


Report Includes Following:
 Clear Demonstration of impact of change.
 Recommendations to address issue.
 Identifies causes behind change, (with

limitations.)
 Lists Regressed SQL, too!
 Tip: If Installing to database for first time,

(simple installation, nothing to concern about,
just pkg to fulfill views) you must have preferred
credentials SET of install will fail!
Executing a Report from EM12c
Choose focus period
 Choose to compare to an Offset,
Baseline or Custom

2-3PM, 12th Vs. 13th
Familiar interface with visual wait event
comparisons.
 Average # of sessions during each
period are displayed.

Detail Report


High level data, highlight for analysis
and recommendations.
Regression SQL


Any performance degradation is noted
with the down arrow icon:
Top Segments Causing IO Waits
High Level data
 Click on “Show Hot Object Breakdown”
to see more detail.

Resource Comparisons
Comparisons of Memory, CPU, IO and
Interconnect.
 Memory Is there Virtual paging?

Memory Base Period

Memory Comparison Period

Dashboard Provided for CPU,
Memory, IO and Interconnect


Is something OTHER than Oracle the
cause?
IO Bound Dashboard
Base vs. comparison period
 Temp reads/writes specified
 Single block read latency

SQL Monitor, EM12c Style
One More way to identify performance
issues.
 Monitoring view ease for those less
familiar with database performance.

SQL Monitor Dashboard
Status of Statement

SQL_ID

Wait Events
Degree of
Parallelism

SQL Text
Exadata and Offloading


Drill down to specific statement within
SQL Monitor will display offload
efficiency per statement.
Full Detail of SQL Execution
View Report
SQL Monitor Report CLI
SET LONG 1000000
SET LONGCHUNKSIZE 1000000
SET LINESIZE 1000
SET PAGESIZE 0
SET TRIM ON
SET TRIMSPOOL ON
SET ECHO OFF
SET FEEDBACK OFF
SELECT DBMS_SQLTUNE.report_sql_monitor(
sql_id
=> '5vh6y3b7tnv8r',
type
=> 'TEXT',
report_level => 'ALL') AS report
FROM dual;
Text Output of SQL Monitor
One of the Best & Least Used
Features in EM
Search SQL
Problem Query
We Have the SQL_ID, What Next?
4v2tsp8dz0nhn is our SQL_ID
Go to the EM Console, (Example is
EM12c)
Search SQL Interface


Choose AWR Snapshots, (change Time
Period), AWR Baselines and put
SQL_ID
Click on Search
SQL_ID link for SQL Details
 Split up by tabs for Cursor, AWR,
Baselines and SQL Tuning Sets
 Plan Hash Value
 Elapsed Time

AWR Data
Snapshot IDs


Click on Snapshot ID and gather
valuable data on resource usage during
snapshot time or choose to view report.
AWR Report or Run ADDM Report
AWR and ASH from the CLI
All DBAs should know how to do this!
Running Reports, Command Line
$ORACLE_HOME/rdbms/admin/awrrpt.sql;
$ORACLE_HOME/rdbms/admin/ashrpt.sql;
$ORACLE_HOME/rdbms/admin/awrsqlrpt.sql;

Less Known AWR Reports:
awrinfo.sql General AWR Info
awrddrpt.sql Comparison report between
snapshots
awrblmig.sql Migrates pre-11g baseline
data into 11g Baseline tables.
awrgrpt.sql RAC Aware AWR Report.
AWR Info Report
Snapshot Interval Information
 Basic Info on Instances and Nodes
 No User or Application Schema info.
 Space Usage by SYSAUX
 WRH$ and Non- AWR Objects, ordered
by size
 Snapshot info and if any errors.
 Advisor Tasks

AWR Info Report
ASH Info Report
@$ORACLE_HOME/rdbms/admin/awrrpt.sql;
-Report Format: Text or HTML
-Days to view snapshot IDs
-Beginning and Ending Snapshot ID’s
- Name of Report
ASH Report
@$ORACLE_HOME/rdbms/admin/ashrpt.sql;
-Report Format: Text or HTML.
-Timestamp to being report from.
-Duration in minutes.
-Name of report.
SQL_ID Specific AWR Report
“Interesting Part”
Finale!

Select * from table(dbms_xplan.display_awr(‘43mp3mjufgnkg’));
Querying ASH Data Directly
More defined reporting
 No need to pull full report
 Detail on waits that are of interest
 Join to non-AWR objects




Examples and Ideas…
V$ACTIVE_SESSION_HISTORY














SAMPLE_ID- This is a unique identifier within an ASH sample.
SAMPLE_TIME- A unit of time used by Active Session History, (not to
be confused with DB_TIME)
USER_ID- Identifier for a user that’s executing the session.
SESSION_ID- Same as the SID or Session ID and can be used to join
to SID in other views/tables.
SESSION_STATE- What was the state of the session when ASH
recorded the sample.
ON CPU/WAITING- The two session states in Active Session History.
ON CPU is active, vs. Waiting, which is self-explanatory.
EVENT- Type of event that the session is currently active or waiting on.
TIME_WAITED- How long the session has been waiting if waiting.
WAIT_TIME- Confusing- but this is populated by any wait time if the
session is currently active and for the previous waits.
SQL_ID- The unique identifier for the SQL statement being executed.
SQL_CHILD_NUMBER-The cursor child number.
Session Averages
select
ROUND(RATIO_TO_REPORT(SUM(1)) OVER () * 100 ,2) PERCENTAGE,
ash.session_type SESS_TYPE,
session_state STATUS,
decode(nvl(sql_id,'-1'),'-1','nonsql','sql') SQL_TYPE,
count(distinct to_char(session_id)|| to_char(session_serial#)) SESS_CNT
from v$active_session_history ash
where
sample_time > sysdate - 30/(24*60)
and (
( ash.session_state = 'ON CPU' )
or
( ash.session_type != 'BACKGROUND' )
)
group by
ash.session_type,
ash.session_state, decode(nvl(sql_id,'-1'),'-1','nonsql','sql')
order by count(*)
/
Session Avg. Output


Note the % of Background processes
Inspecting What
col type for a20
select * from (select
ash.SQL_ID , ash.SQL_PLAN_HASH_VALUE Plan_hash, aud.name type,
sum(decode(ash.session_state,'ON CPU',1,0)) "CPU",
sum(decode(ash.session_state,'WAITING',1,0)) "WAITING",
sum(decode(ash.session_state,'WAITING', decode(wait_class, 'User I/O',1,0),0)) "IO
WAIT" ,
sum(decode(ash.session_state,'WAITING', decode(wait_class, 'User I/O',1,0),0)) "IO" ,
sum(decode(ash.session_state,'WAITING', decode(wait_class, 'Concurrency',1,0)))
"CONCURRENCY" ,
sum(decode(ash.session_state,'WAITING', decode(wait_class, 'Application',1,0)))
"Application" ,
sum(decode(ash.session_state,'ON CPU',1,1)) "TOTAL"
from v$active_session_history ash,
audit_actions aud
where SQL_ID is not NULL
and ash.sql_opcode=aud.action
and ash.sample_time > sysdate - &minutes /( 60*24)
group by sql_id, SQL_PLAN_HASH_VALUE , aud.name
order by sum(decode(session_state,'ON CPU',1,1)) desc
) where rownum < 5;
10 Min. View of Waits by SQL_ID
Choose Time in Minutes To Review, (10
in our example)
 SQL_ID and Plan Hash Value Shown
 Waits for CPU, Wait, IO Wait and others.

Quantity of Events Occurred Over
Small Amounts of Time
Col event for a50
select event, count(1)
from v$active_session_history
where sample_time between
to_date('21-FEB-14 01.43.00 PM','dd-MON-yy
hh:mi:ss PM')
and
to_date('21-FEB-15 01.53.00 PM','dd-MON-yy
hh:mi:ss PM')
group by event
order by event;
Results, Where to Focus?
Transaction Wait Detail
col event for a22
col block_type for a18
col objn for a18
col otype for a10
col fn for 99
col sid for 9999
col bsid for 9999
col lm for 99
col p3 for 99999
col blockn for 99999
select
to_char(sample_time,'HH:MI') st,
substr(event,0,20) event,
ash.session_id sid,
mod(ash.p1,16) lm,
ash.p2,
ash.p3,
nvl(o.object_name,ash.current_obj#) objn,
substr(o.object_type,0,10) otype,
CURRENT_FILE# fn,
CURRENT_BLOCK# blockn,
ash.SQL_ID,
BLOCKING_SESSION bsid
from v$active_session_history ash,
all_objects o
where event like 'enq: TX%'
and o.object_id (+)= ash.CURRENT_OBJ#
and sample_time > sysdate - 10/(60*24)
Order by sample_time
Transaction Lock Output


What TX row locks are occurring!
Knowing What’s in the ASH
Buffer
• Deters from making assumptions on what data is being
queried.
• Know your samples!
Wait Events Across Nodes
Query top
10
SQL_ID’s
in the last
10
minutes?
SQL_ID and CPU Usage
IO Waits by Object from ASH
SQL Text with ASH
• SQL for most recent five minutes of sample data from ASH
SQL Results
• SQL_ID, SQL Text, Sample Time that Process was captured
in.
Average Activity- Graphed
Formatting and Setup
accept hours prompt "hours (default 12) : " default 12
column f_hours new_value v_hours
select &hours f_hours from dual;
column f_secs new_value v_secs
column f_samples new_value samples
select 3600 f_secs from dual;
select &v_secs f_samples from dual;
--select &seconds f_secs from dual;
column f_bars new_value v_bars
select 5 f_bars from dual;
column aas format 999.99
column f_graph new_value v_graph
select 30 f_graph from dual;
column graph format a30
column total format 99999
column npts format 99999
col waits for 99999
col cpu for 9999
select
to_char(to_date(tday||' '||tmod*&v_secs,'YYMMDD SSSSS'),'DD-MON HH24:MI:SS') tm,
samples npts,total/&samples aas,
substr(substr(substr(rpad('+',round((cpu*&v_bars)/&samples),'+') ||
rpad('-',round((waits*&v_bars)/&samples),'-') ||
rpad(' ',p.value * &v_bars,' '),0,(p.value * &v_bars)) ||
p.value || substr(rpad('+',round((cpu*&v_bars)/&samples),'+') ||
rpad('-',round((waits*&v_bars)/&samples),'-') ||
rpad(' ',p.value * &v_bars,' '),(p.value * &v_bars),10) ,0,30)
,0,&v_graph)graph,total,cpu, waits
from (
select to_char(sample_time,'YYMMDD')tday
, trunc(to_char(sample_time,'SSSSS')/&v_secs) tmod
, sum(decode(session_state,'ON CPU',1,decode(session_type,'BACKGROUND',0,1))) total
, (max(sample_id) - min(sample_id) + 1 )
samples
, sum(decode(session_state,'ON CPU' ,1,0)) cpu
, sum(decode(session_type,'BACKGROUND',0,decode(session_state,'WAITING',1,0))) waits
/* for waits I want to subtract out the BACKGROUND
but for CPU I want to count everyon */
from v$active_session_history
where sample_time > sysdate - &v_hours/24
group by trunc(to_char(sample_time,'SSSSS')/&v_secs),
to_char(sample_time,'YYMMDD')
union all
select to_char(sample_time,'YYMMDD')tday
, trunc(to_char(sample_time,'SSSSS')/&v_secs) tmod
, sum(decode(session_state,'ON CPU',10,decode(session_type,'BACKGROUND',0,10))) total
, (max(sample_id) - min(sample_id) + 1 )
samples
, sum(decode(session_state,'ON CPU' ,10,0)) cpu
, sum(decode(session_type,'BACKGROUND',0,decode(session_state,'WAITING',10,0))) waits
/* for waits I want to subtract out the BACKGROUND
but for CPU I want to count everyon */
from dba_hist_active_sess_history
where sample_time > sysdate - &v_hours/24
and sample_time < (select min(sample_time) from v$active_session_history)
group by trunc(to_char(sample_time,'SSSSS')/&v_secs),
to_char(sample_time,'YYMMDD')) ash, v$parameter p
where p.name='cpu_count'
order by to_date(tday||' '||tmod*&v_secs,'YYMMDD SSSSS')
/
Pivot the Wait Events
Digging into History


DBA_HIST_ACTIVE_SESS_HISTORY










SNAP_ID
SAMPLE_ID
SAMPLE_TIME
SESSION_ID
USER_ID
SQL_ID
WAIT_CLASS
SESSION_STATE
PGA_ALLOCATED
Process Information
SELECT * FROM (
SELECT /*+ PARALLEL */
count(*) AS count,
user_id, program, module, sql_id
FROM SYS.DBA_HIST_ACTIVE_SESS_HISTORY
WHERE sample_time > TO_DATE('19-FEB-2014 03.00.00
PM','dd-MON-yy hh:mi:ss PM')
AND sample_time < TO_DATE('19-FEB-2014 08.00.00 PM','ddMON-yy hh:mi:ss PM')
AND program LIKE 'oracle@%'
GROUP BY user_id, program, module, machine, sql_id
ORDER BY count(*) desc
)
WHERE rownum <= 20
/
Results of Process History
Tyler Muth ASH Mining Query
ASH Mining Output

Additional Options:
• Physical Read Averages
• Physical Writes, (Max/Averages)
• Redo Info
• Login Info
• Hard Parsing, etc.
Best Practice When Querying
ASH Data







Keep it Simple and don’t reinvent the
wheel.
Samples are an alias for time, not for
counts.
Understand what is valuable and compare
to packaged reports.
Be aware on RAC of node specific data.
Take care when querying Obj#, File# and
Block#, (still issues in different versions…)
Check the time that is available in buffer,
don’t assume!
AWR/ASH Links/Blogs








Tyler Muth: http://tylermuth.wordpress.com/
Kyle Hailey, John Beresniewicz, Graham
Wood: http://ashmasters.com/
Mine- “For the Love of ASH and AWR”
http://dbakevlar.com/2011/02/for-the-loveof-awr-and-ash/
Karl Arao- http://karlarao.tiddlyspot.com/
Guy Harrisonhttp://guyharrison.squarespace.com/opsgs
amples/
Connect with me-

Contenu connexe

Tendances

Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linuxKyle Hailey
 
Tanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsYour tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsJohn Kanagaraj
 
SQL Plan Directives explained
SQL Plan Directives explainedSQL Plan Directives explained
SQL Plan Directives explainedMauro Pagano
 
UKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction LocksUKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction LocksKyle Hailey
 
Awr + 12c performance tuning
Awr + 12c performance tuningAwr + 12c performance tuning
Awr + 12c performance tuningAiougVizagChapter
 
Analyzing and Interpreting AWR
Analyzing and Interpreting AWRAnalyzing and Interpreting AWR
Analyzing and Interpreting AWRpasalapudi
 
A deep dive about VIP,HAIP, and SCAN
A deep dive about VIP,HAIP, and SCAN A deep dive about VIP,HAIP, and SCAN
A deep dive about VIP,HAIP, and SCAN Riyaj Shamsudeen
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuningSimon Huang
 
Chasing the optimizer
Chasing the optimizerChasing the optimizer
Chasing the optimizerMauro Pagano
 
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 beginnersCarlos Sierra
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Aaron Shilo
 
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1SolarWinds
 
Smart monitoring how does oracle rac manage resource, state ukoug19
Smart monitoring how does oracle rac manage resource, state ukoug19Smart monitoring how does oracle rac manage resource, state ukoug19
Smart monitoring how does oracle rac manage resource, state ukoug19Anil Nair
 
OOUG: Oracle transaction locking
OOUG: Oracle transaction lockingOOUG: Oracle transaction locking
OOUG: Oracle transaction lockingKyle Hailey
 
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentalsDB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentalsJohn Beresniewicz
 
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 - slidesMohamed Farouk
 
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 PoderTanel Poder
 
SQL Monitoring in Oracle Database 12c
SQL Monitoring in Oracle Database 12cSQL Monitoring in Oracle Database 12c
SQL Monitoring in Oracle Database 12cTanel Poder
 
Top 10 Oracle SQL tuning tips
Top 10 Oracle SQL tuning tipsTop 10 Oracle SQL tuning tips
Top 10 Oracle SQL tuning tipsNirav Shah
 

Tendances (20)

Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linux
 
Tanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools short
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsYour tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
 
SQL Plan Directives explained
SQL Plan Directives explainedSQL Plan Directives explained
SQL Plan Directives explained
 
UKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction LocksUKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction Locks
 
Awr + 12c performance tuning
Awr + 12c performance tuningAwr + 12c performance tuning
Awr + 12c performance tuning
 
Analyzing and Interpreting AWR
Analyzing and Interpreting AWRAnalyzing and Interpreting AWR
Analyzing and Interpreting AWR
 
A deep dive about VIP,HAIP, and SCAN
A deep dive about VIP,HAIP, and SCAN A deep dive about VIP,HAIP, and SCAN
A deep dive about VIP,HAIP, and SCAN
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
 
Chasing the optimizer
Chasing the optimizerChasing the optimizer
Chasing the optimizer
 
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
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
 
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
 
Smart monitoring how does oracle rac manage resource, state ukoug19
Smart monitoring how does oracle rac manage resource, state ukoug19Smart monitoring how does oracle rac manage resource, state ukoug19
Smart monitoring how does oracle rac manage resource, state ukoug19
 
OOUG: Oracle transaction locking
OOUG: Oracle transaction lockingOOUG: Oracle transaction locking
OOUG: Oracle transaction locking
 
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
 
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
 
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
 
SQL Monitoring in Oracle Database 12c
SQL Monitoring in Oracle Database 12cSQL Monitoring in Oracle Database 12c
SQL Monitoring in Oracle Database 12c
 
Top 10 Oracle SQL tuning tips
Top 10 Oracle SQL tuning tipsTop 10 Oracle SQL tuning tips
Top 10 Oracle SQL tuning tips
 

Similaire à Ash and awr deep dive hotsos

ASH and AWR Performance Data by Kellyn Pot'Vin
ASH and AWR Performance Data by Kellyn Pot'VinASH and AWR Performance Data by Kellyn Pot'Vin
ASH and AWR Performance Data by Kellyn Pot'VinEnkitec
 
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 presentationBerry Clemens
 
Em12c performance tuning outside the box
Em12c performance tuning outside the boxEm12c performance tuning outside the box
Em12c performance tuning outside the boxKellyn Pot'Vin-Gorman
 
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 lsInSync Conference
 
Live Query Statistics & Query Store in SQL Server 2016
Live Query Statistics & Query Store in SQL Server 2016Live Query Statistics & Query Store in SQL Server 2016
Live Query Statistics & Query Store in SQL Server 2016Antonios Chatzipavlis
 
Oracle Sql Tuning
Oracle Sql TuningOracle Sql Tuning
Oracle Sql TuningChris Adkin
 
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 lsInSync Conference
 
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Alex Zaballa
 
SQL Server - High availability
SQL Server - High availabilitySQL Server - High availability
SQL Server - High availabilityPeter Gfader
 
Sql Server Performance Tuning
Sql Server Performance TuningSql Server Performance Tuning
Sql Server Performance TuningBala Subra
 
resource governor
resource governorresource governor
resource governorAaron Shilo
 
Performance tuning
Performance tuningPerformance tuning
Performance tuningami111
 
MySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMark Leith
 

Similaire à Ash and awr deep dive hotsos (20)

ASH and AWR on DB12c
ASH and AWR on DB12cASH and AWR on DB12c
ASH and AWR on DB12c
 
Sherlock holmes for dba’s
Sherlock holmes for dba’sSherlock holmes for dba’s
Sherlock holmes for dba’s
 
ASH and AWR Performance Data by Kellyn Pot'Vin
ASH and AWR Performance Data by Kellyn Pot'VinASH and AWR Performance Data by Kellyn Pot'Vin
ASH and AWR Performance Data by Kellyn Pot'Vin
 
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
 
Em12c performance tuning outside the box
Em12c performance tuning outside the boxEm12c performance tuning outside the box
Em12c performance tuning outside the box
 
Using AWR for SQL Analysis
Using AWR for SQL AnalysisUsing AWR for SQL Analysis
Using AWR for SQL Analysis
 
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
 
Live Query Statistics & Query Store in SQL Server 2016
Live Query Statistics & Query Store in SQL Server 2016Live Query Statistics & Query Store in SQL Server 2016
Live Query Statistics & Query Store in SQL Server 2016
 
Oracle Sql Tuning
Oracle Sql TuningOracle Sql Tuning
Oracle Sql Tuning
 
Unit 3
Unit 3Unit 3
Unit 3
 
Ash and awr performance data2
Ash and awr performance data2Ash and awr performance data2
Ash and awr performance data2
 
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
 
Ashawr perf kscope
Ashawr perf kscopeAshawr perf kscope
Ashawr perf kscope
 
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
 
SQL Server - High availability
SQL Server - High availabilitySQL Server - High availability
SQL Server - High availability
 
ash-1-130820122404-phpapp01.pdf
ash-1-130820122404-phpapp01.pdfash-1-130820122404-phpapp01.pdf
ash-1-130820122404-phpapp01.pdf
 
Sql Server Performance Tuning
Sql Server Performance TuningSql Server Performance Tuning
Sql Server Performance Tuning
 
resource governor
resource governorresource governor
resource governor
 
Performance tuning
Performance tuningPerformance tuning
Performance tuning
 
MySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMySQL Monitoring Mechanisms
MySQL Monitoring Mechanisms
 

Plus de Kellyn Pot'Vin-Gorman

Redgate_summit_atl_kgorman_intersection.pptx
Redgate_summit_atl_kgorman_intersection.pptxRedgate_summit_atl_kgorman_intersection.pptx
Redgate_summit_atl_kgorman_intersection.pptxKellyn Pot'Vin-Gorman
 
SQLSatOregon_kgorman_keynote_NIAIMLEC.pptx
SQLSatOregon_kgorman_keynote_NIAIMLEC.pptxSQLSatOregon_kgorman_keynote_NIAIMLEC.pptx
SQLSatOregon_kgorman_keynote_NIAIMLEC.pptxKellyn Pot'Vin-Gorman
 
Turning ADHD into "Awesome Dynamic Highly Dependable"
Turning ADHD into "Awesome Dynamic Highly Dependable"Turning ADHD into "Awesome Dynamic Highly Dependable"
Turning ADHD into "Awesome Dynamic Highly Dependable"Kellyn Pot'Vin-Gorman
 
Cepta The Future of Data with Power BI
Cepta The Future of Data with Power BICepta The Future of Data with Power BI
Cepta The Future of Data with Power BIKellyn Pot'Vin-Gorman
 
Pass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft ProfessionalPass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft ProfessionalKellyn Pot'Vin-Gorman
 
PASS 24HOP Linux Scripting Tips and Tricks
PASS 24HOP Linux Scripting Tips and TricksPASS 24HOP Linux Scripting Tips and Tricks
PASS 24HOP Linux Scripting Tips and TricksKellyn Pot'Vin-Gorman
 
Power BI with Essbase in the Oracle Cloud
Power BI with Essbase in the Oracle CloudPower BI with Essbase in the Oracle Cloud
Power BI with Essbase in the Oracle CloudKellyn Pot'Vin-Gorman
 
ODTUG Leadership Talk- WIT and Sponsorship
ODTUG Leadership Talk-  WIT and SponsorshipODTUG Leadership Talk-  WIT and Sponsorship
ODTUG Leadership Talk- WIT and SponsorshipKellyn Pot'Vin-Gorman
 
DevOps and Decoys How to Build a Successful Microsoft DevOps Including the Data
DevOps and Decoys  How to Build a Successful Microsoft DevOps Including the DataDevOps and Decoys  How to Build a Successful Microsoft DevOps Including the Data
DevOps and Decoys How to Build a Successful Microsoft DevOps Including the DataKellyn Pot'Vin-Gorman
 

Plus de Kellyn Pot'Vin-Gorman (20)

Redgate_summit_atl_kgorman_intersection.pptx
Redgate_summit_atl_kgorman_intersection.pptxRedgate_summit_atl_kgorman_intersection.pptx
Redgate_summit_atl_kgorman_intersection.pptx
 
SQLSatOregon_kgorman_keynote_NIAIMLEC.pptx
SQLSatOregon_kgorman_keynote_NIAIMLEC.pptxSQLSatOregon_kgorman_keynote_NIAIMLEC.pptx
SQLSatOregon_kgorman_keynote_NIAIMLEC.pptx
 
Boston_sql_kegorman_highIO.pptx
Boston_sql_kegorman_highIO.pptxBoston_sql_kegorman_highIO.pptx
Boston_sql_kegorman_highIO.pptx
 
Oracle on Azure IaaS 2023 Update
Oracle on Azure IaaS 2023 UpdateOracle on Azure IaaS 2023 Update
Oracle on Azure IaaS 2023 Update
 
IaaS for DBAs in Azure
IaaS for DBAs in AzureIaaS for DBAs in Azure
IaaS for DBAs in Azure
 
Being Successful with ADHD
Being Successful with ADHDBeing Successful with ADHD
Being Successful with ADHD
 
Azure DBA with IaaS
Azure DBA with IaaSAzure DBA with IaaS
Azure DBA with IaaS
 
Turning ADHD into "Awesome Dynamic Highly Dependable"
Turning ADHD into "Awesome Dynamic Highly Dependable"Turning ADHD into "Awesome Dynamic Highly Dependable"
Turning ADHD into "Awesome Dynamic Highly Dependable"
 
PASS Summit 2020
PASS Summit 2020PASS Summit 2020
PASS Summit 2020
 
DevOps in Silos
DevOps in SilosDevOps in Silos
DevOps in Silos
 
Azure Databases with IaaS
Azure Databases with IaaSAzure Databases with IaaS
Azure Databases with IaaS
 
How to Win When Migrating to Azure
How to Win When Migrating to AzureHow to Win When Migrating to Azure
How to Win When Migrating to Azure
 
Securing Power BI Data
Securing Power BI DataSecuring Power BI Data
Securing Power BI Data
 
Cepta The Future of Data with Power BI
Cepta The Future of Data with Power BICepta The Future of Data with Power BI
Cepta The Future of Data with Power BI
 
Pass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft ProfessionalPass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft Professional
 
Taming the shrew Power BI
Taming the shrew Power BITaming the shrew Power BI
Taming the shrew Power BI
 
PASS 24HOP Linux Scripting Tips and Tricks
PASS 24HOP Linux Scripting Tips and TricksPASS 24HOP Linux Scripting Tips and Tricks
PASS 24HOP Linux Scripting Tips and Tricks
 
Power BI with Essbase in the Oracle Cloud
Power BI with Essbase in the Oracle CloudPower BI with Essbase in the Oracle Cloud
Power BI with Essbase in the Oracle Cloud
 
ODTUG Leadership Talk- WIT and Sponsorship
ODTUG Leadership Talk-  WIT and SponsorshipODTUG Leadership Talk-  WIT and Sponsorship
ODTUG Leadership Talk- WIT and Sponsorship
 
DevOps and Decoys How to Build a Successful Microsoft DevOps Including the Data
DevOps and Decoys  How to Build a Successful Microsoft DevOps Including the DataDevOps and Decoys  How to Build a Successful Microsoft DevOps Including the Data
DevOps and Decoys How to Build a Successful Microsoft DevOps Including the Data
 

Dernier

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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...Miguel Araújo
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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 2024The Digital Insurer
 
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.pdfUK Journal
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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 RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Dernier (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Ash and awr deep dive hotsos

  • 1. How to Dive in Fast and Find the Right Answer to the Big Questions Kellyn Pot’Vin, Sr. Technical Consultant
  • 2. A Little About Me:  ACE Director, Oak Table Member  Board of Directors for RMOUG  Conference Director for RMOUG  DB Track Lead for KSCOPE  Author and presenter at Oracle Open World, HotSos, Collaborate, KSCOPE and others…  Advocate for Women in Technology  Lives in Westminster, CO!
  • 3. Bit of a Change What do I get questions on?  Work Smart, Don’t Work Hard…   ASH/AWR Reports in EM12c  Compare ADDM  SQL Monitor  ASH/AWR Reporting from the Command Line  Search SQL, (Least Used Feature of EM)  ASH Queries
  • 4. The Road Trip Where do you want to go?  How will you get there? 
  • 7. Stay on the Right Road Optimization- Tune for Time or You’re Wasting Time.  Know Your Goal(s)  Set a Stopping Point, avoid OTD, (Obsessive Tuning Disorder)  Do NOT Assume. Always do the Research and Have Data. 
  • 8. Brief History       ASH= Active Session History AWR= Automatic Workload Repository Introduced in Oracle 10g Evolution to statspack, requests for performance reporting improvements. “Always on” approach to performance metrics with requirement of non-locking collection process. Requires Management Diagnostic Pack License from Oracle.
  • 9.
  • 10. The Location in EM12c For Some of Today’s Presentation…
  • 11. Running ASH Report from EM • • • • ASH is by time, not snapshot. Set start date and time. End date and time Generate report
  • 14. Top SQL, Top Sessions
  • 16. Top Parallel, Top DB Files
  • 17. How Often Are We Asked, “What Changed?” It ran fine last week, now it doesn’t!  ETL loads have changed, but no one has released any new code!  The DBA says there hasn’t been any parameter changes to this database, but I’m sure there have been.   Compare ADDM Resolution
  • 18. What is Compare ADDM? Uses Two AWR snapshots  Creates Report that  Compares SQL that is common and different.  SGA changes  IO/CPU bound issues  Parameter Changes
  • 19. What is in an ADDM Compare?  Report Includes Following:  Clear Demonstration of impact of change.  Recommendations to address issue.  Identifies causes behind change, (with limitations.)  Lists Regressed SQL, too!  Tip: If Installing to database for first time, (simple installation, nothing to concern about, just pkg to fulfill views) you must have preferred credentials SET of install will fail!
  • 20. Executing a Report from EM12c Choose focus period  Choose to compare to an Offset, Baseline or Custom 
  • 21. 2-3PM, 12th Vs. 13th Familiar interface with visual wait event comparisons.  Average # of sessions during each period are displayed. 
  • 22. Detail Report  High level data, highlight for analysis and recommendations.
  • 23. Regression SQL  Any performance degradation is noted with the down arrow icon:
  • 24. Top Segments Causing IO Waits High Level data  Click on “Show Hot Object Breakdown” to see more detail. 
  • 25. Resource Comparisons Comparisons of Memory, CPU, IO and Interconnect.  Memory Is there Virtual paging?  Memory Base Period  Memory Comparison Period 
  • 26. Dashboard Provided for CPU, Memory, IO and Interconnect  Is something OTHER than Oracle the cause?
  • 27. IO Bound Dashboard Base vs. comparison period  Temp reads/writes specified  Single block read latency 
  • 28. SQL Monitor, EM12c Style One More way to identify performance issues.  Monitoring view ease for those less familiar with database performance. 
  • 29. SQL Monitor Dashboard Status of Statement SQL_ID Wait Events Degree of Parallelism SQL Text
  • 30. Exadata and Offloading  Drill down to specific statement within SQL Monitor will display offload efficiency per statement.
  • 31. Full Detail of SQL Execution
  • 33. SQL Monitor Report CLI SET LONG 1000000 SET LONGCHUNKSIZE 1000000 SET LINESIZE 1000 SET PAGESIZE 0 SET TRIM ON SET TRIMSPOOL ON SET ECHO OFF SET FEEDBACK OFF SELECT DBMS_SQLTUNE.report_sql_monitor( sql_id => '5vh6y3b7tnv8r', type => 'TEXT', report_level => 'ALL') AS report FROM dual;
  • 34. Text Output of SQL Monitor
  • 35. One of the Best & Least Used Features in EM Search SQL Problem Query
  • 36. We Have the SQL_ID, What Next? 4v2tsp8dz0nhn is our SQL_ID Go to the EM Console, (Example is EM12c)
  • 37. Search SQL Interface  Choose AWR Snapshots, (change Time Period), AWR Baselines and put SQL_ID
  • 38. Click on Search SQL_ID link for SQL Details  Split up by tabs for Cursor, AWR, Baselines and SQL Tuning Sets  Plan Hash Value  Elapsed Time 
  • 40. Snapshot IDs  Click on Snapshot ID and gather valuable data on resource usage during snapshot time or choose to view report.
  • 41. AWR Report or Run ADDM Report
  • 42. AWR and ASH from the CLI All DBAs should know how to do this!
  • 43. Running Reports, Command Line $ORACLE_HOME/rdbms/admin/awrrpt.sql; $ORACLE_HOME/rdbms/admin/ashrpt.sql; $ORACLE_HOME/rdbms/admin/awrsqlrpt.sql; Less Known AWR Reports: awrinfo.sql General AWR Info awrddrpt.sql Comparison report between snapshots awrblmig.sql Migrates pre-11g baseline data into 11g Baseline tables. awrgrpt.sql RAC Aware AWR Report.
  • 44. AWR Info Report Snapshot Interval Information  Basic Info on Instances and Nodes  No User or Application Schema info.  Space Usage by SYSAUX  WRH$ and Non- AWR Objects, ordered by size  Snapshot info and if any errors.  Advisor Tasks 
  • 46. ASH Info Report @$ORACLE_HOME/rdbms/admin/awrrpt.sql; -Report Format: Text or HTML -Days to view snapshot IDs -Beginning and Ending Snapshot ID’s - Name of Report
  • 47. ASH Report @$ORACLE_HOME/rdbms/admin/ashrpt.sql; -Report Format: Text or HTML. -Timestamp to being report from. -Duration in minutes. -Name of report.
  • 50. Finale! Select * from table(dbms_xplan.display_awr(‘43mp3mjufgnkg’));
  • 51. Querying ASH Data Directly More defined reporting  No need to pull full report  Detail on waits that are of interest  Join to non-AWR objects   Examples and Ideas…
  • 52. V$ACTIVE_SESSION_HISTORY            SAMPLE_ID- This is a unique identifier within an ASH sample. SAMPLE_TIME- A unit of time used by Active Session History, (not to be confused with DB_TIME) USER_ID- Identifier for a user that’s executing the session. SESSION_ID- Same as the SID or Session ID and can be used to join to SID in other views/tables. SESSION_STATE- What was the state of the session when ASH recorded the sample. ON CPU/WAITING- The two session states in Active Session History. ON CPU is active, vs. Waiting, which is self-explanatory. EVENT- Type of event that the session is currently active or waiting on. TIME_WAITED- How long the session has been waiting if waiting. WAIT_TIME- Confusing- but this is populated by any wait time if the session is currently active and for the previous waits. SQL_ID- The unique identifier for the SQL statement being executed. SQL_CHILD_NUMBER-The cursor child number.
  • 53. Session Averages select ROUND(RATIO_TO_REPORT(SUM(1)) OVER () * 100 ,2) PERCENTAGE, ash.session_type SESS_TYPE, session_state STATUS, decode(nvl(sql_id,'-1'),'-1','nonsql','sql') SQL_TYPE, count(distinct to_char(session_id)|| to_char(session_serial#)) SESS_CNT from v$active_session_history ash where sample_time > sysdate - 30/(24*60) and ( ( ash.session_state = 'ON CPU' ) or ( ash.session_type != 'BACKGROUND' ) ) group by ash.session_type, ash.session_state, decode(nvl(sql_id,'-1'),'-1','nonsql','sql') order by count(*) /
  • 54. Session Avg. Output  Note the % of Background processes
  • 55. Inspecting What col type for a20 select * from (select ash.SQL_ID , ash.SQL_PLAN_HASH_VALUE Plan_hash, aud.name type, sum(decode(ash.session_state,'ON CPU',1,0)) "CPU", sum(decode(ash.session_state,'WAITING',1,0)) "WAITING", sum(decode(ash.session_state,'WAITING', decode(wait_class, 'User I/O',1,0),0)) "IO WAIT" , sum(decode(ash.session_state,'WAITING', decode(wait_class, 'User I/O',1,0),0)) "IO" , sum(decode(ash.session_state,'WAITING', decode(wait_class, 'Concurrency',1,0))) "CONCURRENCY" , sum(decode(ash.session_state,'WAITING', decode(wait_class, 'Application',1,0))) "Application" , sum(decode(ash.session_state,'ON CPU',1,1)) "TOTAL" from v$active_session_history ash, audit_actions aud where SQL_ID is not NULL and ash.sql_opcode=aud.action and ash.sample_time > sysdate - &minutes /( 60*24) group by sql_id, SQL_PLAN_HASH_VALUE , aud.name order by sum(decode(session_state,'ON CPU',1,1)) desc ) where rownum < 5;
  • 56. 10 Min. View of Waits by SQL_ID Choose Time in Minutes To Review, (10 in our example)  SQL_ID and Plan Hash Value Shown  Waits for CPU, Wait, IO Wait and others. 
  • 57. Quantity of Events Occurred Over Small Amounts of Time Col event for a50 select event, count(1) from v$active_session_history where sample_time between to_date('21-FEB-14 01.43.00 PM','dd-MON-yy hh:mi:ss PM') and to_date('21-FEB-15 01.53.00 PM','dd-MON-yy hh:mi:ss PM') group by event order by event;
  • 59. Transaction Wait Detail col event for a22 col block_type for a18 col objn for a18 col otype for a10 col fn for 99 col sid for 9999 col bsid for 9999 col lm for 99 col p3 for 99999 col blockn for 99999 select to_char(sample_time,'HH:MI') st, substr(event,0,20) event, ash.session_id sid, mod(ash.p1,16) lm, ash.p2, ash.p3, nvl(o.object_name,ash.current_obj#) objn, substr(o.object_type,0,10) otype, CURRENT_FILE# fn, CURRENT_BLOCK# blockn, ash.SQL_ID, BLOCKING_SESSION bsid from v$active_session_history ash, all_objects o where event like 'enq: TX%' and o.object_id (+)= ash.CURRENT_OBJ# and sample_time > sysdate - 10/(60*24) Order by sample_time
  • 60. Transaction Lock Output  What TX row locks are occurring!
  • 61. Knowing What’s in the ASH Buffer • Deters from making assumptions on what data is being queried. • Know your samples!
  • 63. Query top 10 SQL_ID’s in the last 10 minutes?
  • 64. SQL_ID and CPU Usage
  • 65. IO Waits by Object from ASH
  • 66. SQL Text with ASH • SQL for most recent five minutes of sample data from ASH
  • 67. SQL Results • SQL_ID, SQL Text, Sample Time that Process was captured in.
  • 69. Formatting and Setup accept hours prompt "hours (default 12) : " default 12 column f_hours new_value v_hours select &hours f_hours from dual; column f_secs new_value v_secs column f_samples new_value samples select 3600 f_secs from dual; select &v_secs f_samples from dual; --select &seconds f_secs from dual; column f_bars new_value v_bars select 5 f_bars from dual; column aas format 999.99 column f_graph new_value v_graph select 30 f_graph from dual; column graph format a30 column total format 99999 column npts format 99999 col waits for 99999 col cpu for 9999
  • 70. select to_char(to_date(tday||' '||tmod*&v_secs,'YYMMDD SSSSS'),'DD-MON HH24:MI:SS') tm, samples npts,total/&samples aas, substr(substr(substr(rpad('+',round((cpu*&v_bars)/&samples),'+') || rpad('-',round((waits*&v_bars)/&samples),'-') || rpad(' ',p.value * &v_bars,' '),0,(p.value * &v_bars)) || p.value || substr(rpad('+',round((cpu*&v_bars)/&samples),'+') || rpad('-',round((waits*&v_bars)/&samples),'-') || rpad(' ',p.value * &v_bars,' '),(p.value * &v_bars),10) ,0,30) ,0,&v_graph)graph,total,cpu, waits from ( select to_char(sample_time,'YYMMDD')tday , trunc(to_char(sample_time,'SSSSS')/&v_secs) tmod , sum(decode(session_state,'ON CPU',1,decode(session_type,'BACKGROUND',0,1))) total , (max(sample_id) - min(sample_id) + 1 ) samples , sum(decode(session_state,'ON CPU' ,1,0)) cpu , sum(decode(session_type,'BACKGROUND',0,decode(session_state,'WAITING',1,0))) waits /* for waits I want to subtract out the BACKGROUND but for CPU I want to count everyon */ from v$active_session_history where sample_time > sysdate - &v_hours/24 group by trunc(to_char(sample_time,'SSSSS')/&v_secs), to_char(sample_time,'YYMMDD') union all select to_char(sample_time,'YYMMDD')tday , trunc(to_char(sample_time,'SSSSS')/&v_secs) tmod , sum(decode(session_state,'ON CPU',10,decode(session_type,'BACKGROUND',0,10))) total , (max(sample_id) - min(sample_id) + 1 ) samples , sum(decode(session_state,'ON CPU' ,10,0)) cpu , sum(decode(session_type,'BACKGROUND',0,decode(session_state,'WAITING',10,0))) waits /* for waits I want to subtract out the BACKGROUND but for CPU I want to count everyon */ from dba_hist_active_sess_history where sample_time > sysdate - &v_hours/24 and sample_time < (select min(sample_time) from v$active_session_history) group by trunc(to_char(sample_time,'SSSSS')/&v_secs), to_char(sample_time,'YYMMDD')) ash, v$parameter p where p.name='cpu_count' order by to_date(tday||' '||tmod*&v_secs,'YYMMDD SSSSS') /
  • 71. Pivot the Wait Events
  • 73. Process Information SELECT * FROM ( SELECT /*+ PARALLEL */ count(*) AS count, user_id, program, module, sql_id FROM SYS.DBA_HIST_ACTIVE_SESS_HISTORY WHERE sample_time > TO_DATE('19-FEB-2014 03.00.00 PM','dd-MON-yy hh:mi:ss PM') AND sample_time < TO_DATE('19-FEB-2014 08.00.00 PM','ddMON-yy hh:mi:ss PM') AND program LIKE 'oracle@%' GROUP BY user_id, program, module, machine, sql_id ORDER BY count(*) desc ) WHERE rownum <= 20 /
  • 75. Tyler Muth ASH Mining Query
  • 76. ASH Mining Output Additional Options: • Physical Read Averages • Physical Writes, (Max/Averages) • Redo Info • Login Info • Hard Parsing, etc.
  • 77. Best Practice When Querying ASH Data       Keep it Simple and don’t reinvent the wheel. Samples are an alias for time, not for counts. Understand what is valuable and compare to packaged reports. Be aware on RAC of node specific data. Take care when querying Obj#, File# and Block#, (still issues in different versions…) Check the time that is available in buffer, don’t assume!
  • 78. AWR/ASH Links/Blogs      Tyler Muth: http://tylermuth.wordpress.com/ Kyle Hailey, John Beresniewicz, Graham Wood: http://ashmasters.com/ Mine- “For the Love of ASH and AWR” http://dbakevlar.com/2011/02/for-the-loveof-awr-and-ash/ Karl Arao- http://karlarao.tiddlyspot.com/ Guy Harrisonhttp://guyharrison.squarespace.com/opsgs amples/