SQLT XPLORE - The SQLT XPLAIN Hidden Child

629
-1

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

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

No notes for slide

SQLT XPLORE - The SQLT XPLAIN Hidden Child

  1. 1. SQLT  XPLORE   The  SQLT  XPLAIN  Hidden  Child   Carlos  Sierra  -­‐  Enkitec  
  2. 2. Carlos  Sierra   •  •  •  •  Enkitec  Consultant   Oracle  Performance   SQL  Tuning   PL/SQL   11/12/13   Enkitec  (c)   2  
  3. 3. SQLT  XPLORE   •  •  •  •  IntroducDon   Input  and  Output   Screen  Shots   Demo   11/12/13   Enkitec  (c)   3  
  4. 4. SQLTXPLAIN  (SQLT)   •  •  •  •  •  Free  SQL  Tuning  Tool   Oracle  10g  to  12c   Linux/UNIX/Windows   Available  @  MOS  215187.1   Includes  SQLT  Test  Case  (TC)  and  XPLORE   11/12/13   Enkitec  (c)   4  
  5. 5. SQLT  Test  Case  (TC)   •  Metadata  to  create  a  SQL  Tuning  test  case   –  SQL  Text  with  bind  variables  and  their  values   –  Schema  Objects  creaDon  script   –  CBO  StaDsDcs   –  Schema  Objects  mapping   11/12/13   Enkitec  (c)   5  
  6. 6. What  is  SQLT  XPLORE?   •  Brute  Force  stand-­‐alone  module     •  Under  sqlt/utl/xplore  out  of  sqlt.zip   •  Acts  on  top  of  a  SQLT  TC     –  Or  any  SQL  on  a  Test  System   •  Discovers  several  ExecuDon  Plans   11/12/13   Enkitec  (c)   6  
  7. 7. XPLORE  Mechanics   •  Iterates  over     –  CBO  Parameters  and  Fix  Control   •  For  each  iteraDon   –  Executes  input  SQL   –  Captures  Plan   •  Reports  Summary   11/12/13   Enkitec  (c)   7  
  8. 8. XPLORE  Input  and  Output   •  Inputs  one  script  with  one  SQL   •  Outputs  a  zip  with   –  HTML  Report   –  SQL  Monitor  zip   –  Staging  SQL  Script   –  ExecuDon  Log   11/12/13   Enkitec  (c)   8  
  9. 9. XPLORE  HTML  Report   •  •  •  •  •  Plans  Summary   Discovered  Plans   Baseline   Completed  Tests  for  each  Plan   ExecuDon  Plans   11/12/13   Enkitec  (c)   9  
  10. 10. SQL  Monitor  ZIP   •  Only  on  11g   •  Requires  Oracle  Tuning  Pack   –  Controlled  by  XPLORE  execuDon  parameter   •  You  may  need  to  embed  /*+  MONITOR  */  hint   •  One  SQL  Monitor  Report  for  each  iteraDon   11/12/13   Enkitec  (c)   10  
  11. 11. 11/12/13   Enkitec  (c)   11  
  12. 12. When  to  use  XPLORE?   •  SQL  performance  analysis     –  Afer  a  database  sofware  upgrade   •  Bad  Plan  is  reproducible  on  Test  System   •  Good  Plan  can  be  obtained  using  OpDmizer   Features  Enabled  (OFE)  set  to  prior  release   •  You  want  to  narrow  reason  of  regression   11/12/13   Enkitec  (c)   12  
  13. 13. MulDple  Uses   •  SQL  Performance  Regression  afer  Upgrade   •  Long  Parse  Time  Analysis   •  Wrong  Results  Analysis   –  DiagnosDc  of  Query  TransformaDons  Errors   •  Discover  effect  of  “disabled”  fixes   •  Find  a  beler  performing  Plan   11/12/13   Enkitec  (c)   13  
  14. 14. When  NOT  to  use  XPLORE?   •  When  your  SQL  to  be  analyzed  may  corrupt  or   update  data   •  When  using  XPLORE  with  data  and  each   iteraDon  takes  more  than  a  few  seconds   11/12/13   Enkitec  (c)   14  
  15. 15. XPLORE  Prerequisites   •  Create  a  SQL  Script  with  one  SQL   –  Binds  are  allowed   •  SQL  on  script  must  include  /*  ^^unique_id  */   •  Script  must  be  capable  to  execute  stand  alone   •  SQL  may  or  may  not  return  rows     –  XPLORE  works  with  and  without  data   11/12/13   Enkitec  (c)   15  
  16. 16. XPLORE  InstallaDon   •  Place  your  input  SQL  Script  into  sqlt/utl/xplore   •  Execute  sqlt/utl/xplore/install.sql  as  SYS   •  Input  test  case  user  and  its  password   –  XPLORE  will  be  executed  as  test  case  user   11/12/13   Enkitec  (c)   16  
  17. 17. Uninstalling  XPLORE   •  Execute  sqlt/utl/xplore/uninstall.sql  as  SYS   •  Provide  test  case  user  when  asked   11/12/13   Enkitec  (c)   17  
  18. 18. XPLORE  use   •  •  •  •  •  Navigate  to  sqlt/utl/xplore/   Connect  as  the  test  case  user   Set  the  CBO  environment  (opDonal)   Execute  create_xplore_script.sql   Execute  dynamically  generated  xplore_script   11/12/13   Enkitec  (c)   18  
  19. 19. Create  XPLORE  Script  Parameters   •  •  •  •  •  XPLORE  Method:  [  XECUTE  |  XPLAIN  ]   Include  CBO  Parameters:  [  Y  |  N  ]   Include  Exadata  Parameters:  [  Y  |  N  ]   Include  Fix  Control:  [  Y  |  N  ]   Generate  SQL  Monitor  Reports:  [  N  |  Y  ]   11/12/13   Enkitec  (c)   19  
  20. 20. XPLORE  Script  Parameters   •  Script  to  be  executed  on  each  iteraDon   –  Script  must  reside  on  sqlt/utl/xplore   –  Must  contain  /*  ^^unique_id  */   –  Must  be  capable  of  stand-­‐alone  error-­‐free  exec   •  Password  for  test  case  user   –  Each  iteraDon  re-­‐connects  and  sets  CBO  env  (opt)   11/12/13   Enkitec  (c)   20  
  21. 21. Input  tc.sql  Sample   11/12/13   Enkitec  (c)   21  
  22. 22. 11/12/13   Enkitec  (c)   22  
  23. 23. 11/12/13   Enkitec  (c)   23  
  24. 24. Input  q1.sql  Sample   11/12/13   Enkitec  (c)   24  
  25. 25. 11/12/13   Enkitec  (c)   25  
  26. 26. 11/12/13   Enkitec  (c)   26  
  27. 27. Input  q2.sql  Sample   11/12/13   Enkitec  (c)   27  
  28. 28. 11/12/13   Enkitec  (c)   28  
  29. 29. 11/12/13   Enkitec  (c)   29  
  30. 30. 11/12/13   Enkitec  (c)   30  
  31. 31. Input  q3.sql  Sample   11/12/13   Enkitec  (c)   31  
  32. 32. 11/12/13   Enkitec  (c)   32  
  33. 33. 11/12/13   Enkitec  (c)   33  
  34. 34. Demo  Time   11/12/13   Enkitec  (c)   34  
  35. 35. References   •  SQLTXPLAIN  (SQLT)   –  MOS  215187.1   11/12/13   Enkitec  (c)   35  
  36. 36. Carlos  Sierra  Contact  Info   •  carlos.sierra@enkitec.com   •  csierra_usa   •  carlos-­‐sierra.net   11/12/13   Enkitec  (c)   36  
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×