Your SlideShare is downloading. ×
Oracle Performance Tools of the Trade
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Oracle Performance Tools of the Trade

286
views

Published on

Oracle Performance Tools of the Trade

Oracle Performance Tools of the Trade

Published in: Technology

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
286
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Oracle  Performance   Tools  of  the  Trade   Carlos  Sierra  
  • 2. Carlos  Sierra   •  SQLTXPLAIN  +  SQL  Health-­‐Check  SQLHC  +   •  Consultant/Developer/DBA/Design/+   •  Oracle  Performance  +  SQL  Tuning   •  Oracle  Database  Health-­‐Check   •  Tools  +  Scripts   •  Speaker   Enkitec  ©  2014   2  
  • 3. Tools  of  the  Trade   •  OEM   •  AWR   •  ADDM   •  ASH   •  Snapper   •  EDB360   Enkitec  ©  2014   3  
  • 4. OEM   •  Oracle  Enterprise  Manager  (OEM)   – Database  Control   – Grid  Control   •  GUI  Tool  for  System  Monitoring   – Including  Performance   Enkitec  ©  2014   4  
  • 5. Enkitec  ©  2014   5  
  • 6. Enkitec  ©  2014   6  
  • 7. Enkitec  ©  2014   7  
  • 8. Enkitec  ©  2014   8  
  • 9. Enkitec  ©  2014   9  
  • 10. Enkitec  ©  2014   10  
  • 11. Enkitec  ©  2014   11  
  • 12. Enkitec  ©  2014   12  
  • 13. Enkitec  ©  2014   13  
  • 14. Enkitec  ©  2014   14  
  • 15. Enkitec  ©  2014   15  
  • 16. Enkitec  ©  2014   16  
  • 17. Enkitec  ©  2014   17   What  is  wrong?  
  • 18. Enkitec  ©  2014   18  
  • 19. Enkitec  ©  2014   19  
  • 20. Enkitec  ©  2014   20  
  • 21. Enkitec  ©  2014   21  
  • 22. AWR   •  Automa[c  Workload  Repository  (AWR)   •  Requires  Oracle  Diagnos[cs  Pack  License   •  Set  of  DBA_HIST  views   •  Periodic  Snapshots  (1hr  apart  by  default)   •  7  days  history  (by  default)   Enkitec  ©  2014   22  
  • 23. AWR  Demo   •  Exadata  with  happy  Users  (no  complains)   •  Which  bo_lenecks  you  see?   •  What  is  your  hypothesis?   •  What  would  be  your  ac[on  plan?   Enkitec  ©  2014   23  
  • 24. Enkitec  ©  2014   24  
  • 25. Enkitec  ©  2014   25  
  • 26. Enkitec  ©  2014   26  
  • 27. Enkitec  ©  2014   27  
  • 28. Enkitec  ©  2014   28  
  • 29. Enkitec  ©  2014   29  
  • 30. Enkitec  ©  2014   30  
  • 31. Enkitec  ©  2014   31  
  • 32. Enkitec  ©  2014   32  
  • 33. Enkitec  ©  2014   33  
  • 34. Enkitec  ©  2014   34  
  • 35. Enkitec  ©  2014   35  
  • 36. Enkitec  ©  2014   36  
  • 37. Enkitec  ©  2014   37  
  • 38. AWR  Demo  Conclusions  (1)   •  High  Parsing   – Use  of  Literals  instead  of  Bind  Variables   •  Some  subop[mal  SQL  was[ng  CPU  cycles   •  High  Background  Waits  related  to  DBWR   •  Write  Back  Flash  Cache  disabled   – Hard  to  spot!   Enkitec  ©  2014   38  
  • 39. AWR  Demo  Conclusions  (2)   •  6  copies  of  Control  Files   – 2  members  in  2  high  redundancy  disk  groups   •  Thousands  of  Tablespaces  (thus  Data  Files)   •  Frequent  Log  switches  due  to  small  size   – Think  Checkpoints  upda[ng  SCN  on  Data  Files   and  Control  Files   Enkitec  ©  2014   39  
  • 40. AWR  Demo  Conclusions  (3)   •  There  is  usually  more  than  1  culprit   – Even  when  performance  is  fine   •  Database  health-­‐check  is  like  any  other   – Early  detec[on  is  preferred   •  Mo_o:  “if  it  ain't  broke,  don't  fix  it”   – Really?     – Would  you  apply  this  mo_o  to  your  own  health?   Enkitec  ©  2014   40  
  • 41. Alert  Log   •  As  old  as  Oracle   •  Your  friend   •  Like  reading  your  Daily  News   •  Watch  for  ORA  errors   – And  fix  them!   •  Rename  every  so  olen   Enkitec  ©  2014   41  
  • 42. ADDM  (1)   •  Automa[c  Database  Diagnos[c  Monitor   •  Requires  Oracle  Diagnos[cs  Pack  License   •  Its  goal  is  to  reduce  DB  Time   – Wait  and  CPU  [me  of  all  non-­‐idle  user  sessions   •  Based  on    AWR  data     – Hourly  execu[on  by  default   Enkitec  ©  2014   42  
  • 43. ADDM  (2)   •  Database,  Instance  or  Par[al  modes   •  Available  via  OEM  or  SQL*Plus   – DBA_ADVISOR_*   – DBA_ADDM_*   •  Be  cau[ous  with  “Advice”   Enkitec  ©  2014   43  
  • 44. ASH  (1)   •  Ac[ve  Session  History  (ASH)   •  Requires  Oracle  Diagnos[cs  Pack  License   •  Ac[ve  Session   – On  CPU;  or   – Non-­‐idle  Wait   Enkitec  ©  2014   44  
  • 45. ASH  (2)   •  Snapshot  of  V$SESSION  every  second   – V$ACTIVE_SESSION_HISTORY   – Every  10  seconds  on  AWR   •  DBA_HIST_ACTIVE_SESS_HISTORY   •  Source  of  truth   •  Mul[-­‐dimension   Enkitec  ©  2014   45  
  • 46. Enkitec  ©  2014   46  
  • 47. Snapper   •  Free  download  and  use  Script   •  Installs  nothing   •  Does  NOT  requires  Oracle  Diagnos[cs  Pack   •   Session  centric   – snapper.sql  all  seconds_in_snap  snap_count  sid   – @snapper.sql  all  30  1  2617   Enkitec  ©  2014   47  
  • 48. Enkitec  ©  2014   48  
  • 49. Enkitec  ©  2014   49  
  • 50. EDB360   Enkitec  ©  2014   50   •  Free  download  and  use  Tool   •  Installs  nothing   •  360-­‐degree  view  of  an  Oracle  database   •  Designed  to  ease  a  database  health-­‐check   •  Pack  License?  Days?  HTML?  Txt?  CSV?  Chart?   •  @edb360.sql  T  31  Y  Y  Y  Y  
  • 51. EDB360  Demo   •  11.2.0.3  on  a  barely  used  Exadata  system   •  What  do  you  see?   Enkitec  ©  2014   51  
  • 52. Enkitec  ©  2014   52  
  • 53. Enkitec  ©  2014   53  
  • 54. Enkitec  ©  2014   54  
  • 55. Enkitec  ©  2014   55  
  • 56. Enkitec  ©  2014   56  
  • 57. EDB360  Demo  Conclusions   •  Configura[on   •  Administra[on   •  Time  Model   •  Wait  Events   •  AWR  +  ADDM  +  ASH  Reports   •  Top  SQL   Enkitec  ©  2014   57  
  • 58. References   •  Oracle  Database  Performance  Tuning  Guide   11g  Release  2   •  Snapper  -­‐  Tanel  Poder   – h_p://blog.tanelpoder.com/files/scripts/ snapper4.sql   •  h_p://www.enkitec.com/products/edb360   Enkitec  ©  2014   58  
  • 59. Contact  Informa[on   •  carlos.sierra@enkitec.com   •  carlos-­‐sierra.net   •  @csierra_usa   Enkitec  ©  2014   59