Handwritten Text Recognition for manuscripts and early printed texts
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
1. Part 1 : What, When and How Virtathon 7/2011 Uday Moogala Vlado Barun
2.
3.
4.
5. In order to know what to fix, we need to be able to see what’s broken! - Dan Roam
6. What Identify (app is slow) Quantify (takes 1m) Timeline (in peak hours) Component (MT or DB or N/W) Flow chart Root Cause (Stats not updated) AWR/ASH, Trace, Apps Logs/Tables, OS/IO stats etc SQL/Object Stats, Execution Plans, etc Initial Data collec-tion How Much When Where How Why Analyze Additional Data collec-tion Understanding the issue…
8. An example… I/O On CPU I/O On CPU Browse Books Read Reviews For One Book Add to Cart Checkout TIME = time spent in database = user/network/app tier time
9. = time spent in database SQL Trace (Microsecond level) Application Logging (custom level) Gathering Performance Data… (SQL Trace, ASH) 21 ASH Samples 3 ASH Samples in AWR Browse Books Read Reviews For One Book Add to Cart Checkout TIME v$active_session_history (1 second intervals) dba_hist_active_sess_history (10 second intervals)
Who: one or all users/programs What: Response Time, Throughput, Error, Crash etc How Much: How Slow When: At what times? Where: Which component? How: Series of events Why: seeing big picture
Collects database performance statistics stored in memory and in database used by ADDM and Advisors (SQL Tuning, Segment, Undo) Select * from dict where table_name like ‘DBA_HIST%SQL%’; TABLE_NAME COMMENTS ------------------------------ -------------------------------------------------------------------------------- DBA_HIST_COLORED_SQL Marked SQLs for snapshots DBA_HIST_SQLBIND SQL Bind Information DBA_HIST_SQLCOMMAND_NAME Sql command types DBA_HIST_SQLSTAT SQL Historical Statistics Information DBA_HIST_SQLTEXT SQL Text DBA_HIST_SQL_BIND_METADATA SQL Bind Metadata Information DBA_HIST_SQL_PLAN SQL Plan Information DBA_HIST_SQL_SUMMARY Summary of SQL Statistics DBA_HIST_SQL_WORKAREA_HSTGRM SQL Workarea Histogram History select distinct stat_name from V$SYS_TIME_MODEL ; STAT_NAME ---------------------------------------------------------------- DB CPU background elapsed time hard parse elapsed time RMAN cpu time (backup/restore) DB time hard parse (bind mismatch) elapsed time inbound PL/SQL rpc elapsed time repeated bind elapsed time background cpu time connection management call elapsed time failed parse elapsed time hard parse (sharing criteria) elapsed time PL/SQL compilation elapsed time failed parse (out of shared memory) elapsed time Java execution elapsed time parse time elapsed sequence load elapsed time sql execute elapsed time PL/SQL execution elapsed time 19 rows selected.
11g has SQL_PLAN_LINE_ID, SQL_PLAN_OPERATION to further drilldown a SQL performance issue using ASH