Visualizing ORACLE Performance with R

Click here to load reader

Embed Size (px)

description

A picture is worth a thousand words. This is especially true during performance problem investigations where a well done graph of the issue can often cut resolution time from days to mere minutes. ORACLE database provides a wealth of performance information, but unfortunately only a small part of it is currently visualized by standard tools, such as Enterprise Manager. Enter "R": a well known (and free) statistical analysis and graphing framework that can create relevant and interesting visualizations on pretty much any data. Come to this presentation to learn how with a bit of R knowledge, you can make your ASH, AWR, 10046 trace, listener log etc data come alive.

Transcript of Visualizing ORACLE Performance with R

  • REMINDER Check in on the COLLABORATE mobile app Visualizing ORACLE performance with R Maxym Kharchenko Senior Database Engineer Amazon.com
  • Whoami Started as a database kernel developer Network database: db_VISTA ORACLE DBA for ~ 10-12 years Starting with ORACLE 8 Last 3 years: Sr. Persistence Engineer @Amazon.com OCM, ORACLE Ace Associate Blog: http://intermediatesql.com Twitter: @maxymkh
  • Agenda Why visualize with R How to visualize with R Pretty pictures ! Interesting use cases (more pretty pictures!)
  • Why visualize ?
  • Why visualize ? [1] 10.06 10.07 9.99 9.95 10.56 9.82 10.06 9.97 9.97 9.91 [11] 9.99 10.68 10.04 10.05 9.92 10.08 9.91 9.97 10.11 10.03 [21] 10.08 10.22 8.84 10.42 8.68 10.14 9.46 9.69 11.56 9.55 [31] 10.32 8.77 10.20 10.16 10.03 10.05 10.47 9.83 10.18 10.00 [41] 10.11 9.76 9.89 10.09 10.09 10.15 9.86 10.06 10.56 9.87 [51] 9.95 10.19 10.01 10.04 10.93 11.03 11.07 11.08 11.21 10.77 [61] 11.01 10.87 11.06 11.16 10.94 9.82 10.09 10.16 10.05 9.87 [71] 10.01 9.92 9.90 10.23 10.14 10.09 10.08 9.92 10.05 10.60 [81] 10.06 10.10 9.97 10.25 10.10 10.19 10.07 9.97 10.05 10.08 [91] 9.90 10.41 10.19 9.96 9.90 10.07 9.95 10.22 9.94 9.93
  • Why visualize ?
  • DBA 2.0: EM Pretty
  • DBA 2.0: EM Pretty but not flexible
  • DBA 1.0: sqlplus Flexible SQL*Plus: Release 11.2.0.2.0 Production on Fri Feb 14 Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 With the Partitioning and Real Application Testing options SQL> @event_histograms db%file%sequential
  • DBA 1.0: sqlplus Flexible but not pretty EVENT Ms PCT GRAPH ----------------------- ---- ------- -------------------- db file sequential read 1 18.43 ######## 2 4.09 # 4 23.52 ########## 8 43.04 #################### 16 10.05 #### 32 .72 64 .06 128 .09 256 .01
  • DBA 1.0: sqlplus Flexible but not pretty EVENT Ms PCT GRAPH ----------------------- ---- ------- -------------------- db file sequential read 1 18.43 ******** 2 4.09 * 4 23.52 ********** 8 43.04 ******************** 16 10.05 **** 32 .72 64 .06 128 .09 256 .01
  • Ok, sqlplus CAN be pretty Tanel Poders fish.sql
  • Need a tool: both pretty AND flexible
  • DBA 1.5: Enter R
  • How to visualize data with R
  • http://www.r-project.org/ What R looks like
  • What R looks like
  • If you know how to program in Perl/Python/Ruby etc You know how to program in R
  • #*********************************************************** # Prepare exploration: Define categories, set plot type etc #*********************************************************** prepare_exploration