Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
SQL	
  Tuning	
  Made	
  Easier	
  with	
  	
  
SQLTXPLAIN	
  (SQLT)	
  
Carlos	
  Sierra	
  
Carlos	
  Sierra	
  
•  Consultant/Developer/DBA	
  
•  Oracle	
  Performance	
  
•  SQLTXPLAIN	
  (SQLT)	
  
•  SQL	
  Tuning	
  
•  Tools	
  
Enkitec	
  (c)	
  2014	
   2	
  
Topics	
  
•  SQLTXPLAIN	
  101	
  
•  Sample	
  Output	
  
•  InstallaLon	
  
•  Using	
  XTRACT	
  and	
  XECUTE	
  
•  Demos	
  
Enkitec	
  (c)	
  2014	
   3	
  
SQLTXPLAIN	
  (SQLT)	
  
•  Tool	
  for	
  SQL	
  Tuning	
  
– DiagnosLcs	
  
•  Inputs	
  one	
  SQL	
  
•  Outputs	
  one	
  compressed	
  file	
  
– Main	
  HTML	
  Report	
  +	
  many	
  other	
  files	
  
•  MOS	
  215187.1	
  
– Free	
  download	
  and	
  use	
  
Enkitec	
  (c)	
  2014	
   4	
  
Some	
  Tools	
  
•  One	
  Database	
  
– ORAchk,	
  OEM,	
  AWR,	
  OS	
  Stats,	
  etc	
  
•  One	
  Process	
  
– SQL	
  Trace,	
  TKPROF,	
  Method	
  R,	
  ASH,	
  etc	
  
•  One	
  SQL	
  
– SQLT,	
  SQLHC,	
  planx,	
  sqlmon,	
  sqlash,	
  etc	
  
Enkitec	
  (c)	
  2014	
   5	
  
Enkitec	
  (c)	
  2014	
   6	
  
Demos	
  1	
  and	
  2	
  
•  Main	
  HTML	
  Report	
  
•  SQLT	
  XTRACT	
  Output	
  
Enkitec	
  (c)	
  2014	
   7	
  
SQLT	
  InstallaLon	
  
•  My	
  Oracle	
  Support	
  (Metalink)	
  
– Note	
  215187.1	
  
•  Unzip	
  sqlt.zip	
  on	
  Database	
  Server	
  
•  Read	
  sqlt/sqlt_instrucLons.html	
  
•  Execute	
  sqlt/install/sqcreate.sql	
  
– Connect	
  as	
  SYS	
  
Enkitec	
  (c)	
  2014	
   8	
  
InstallaLon	
  Parameters	
  
Enkitec	
  (c)	
  2014	
   9	
  
Using	
  SQLT	
  
•  Read	
  sqlt/sqlt_instrucLons.html	
  
•  Navigate	
  to	
  sqlt/run	
  
•  Connect	
  as	
  applicaLon	
  user	
  
– Or	
  user	
  granted	
  sqlt_user_role	
  or	
  dba	
  
•  Execute	
  one	
  of	
  these	
  two	
  
– sqltxtract.sql	
  
– sqltxecute.sql	
  
Enkitec	
  (c)	
  2014	
   10	
  
SQLT	
  XTRACT	
  
•  Inputs	
  
– SQL_ID	
  
– SQLTXPLAIN	
  Password	
  
•  Outputs	
  
– ZIP	
  File	
  
•  Main	
  HTML	
  Report	
  
•  Other	
  Files	
  
Enkitec	
  (c)	
  2014	
   11	
  
SQLT	
  XECUTE	
  
•  Inputs	
  
– File	
  Name	
  with	
  SQL	
  
•  Binds	
  declaraLon	
  and	
  assignment	
  
•  SQL	
  Text	
  
– SQLTXPLAIN	
  Password	
  
•  Outputs	
  
– ZIP	
  File	
  
Enkitec	
  (c)	
  2014	
   12	
  
Demos	
  3	
  and	
  4	
  
•  SQLT	
  InstallaLon	
  
•  SQLT	
  XTRACT	
  
– SQL_ID	
  8u0n7w1jug5dg	
  
Enkitec	
  (c)	
  2014	
   13	
  
Conclusion	
  
•  SQLT	
  is	
  a	
  comprehensive	
  tool	
  for	
  SQL	
  Tuning	
  
•  SQLT	
  is	
  free	
  to	
  download	
  and	
  use	
  
•  SQLT	
  is	
  easy	
  to	
  use	
  
•  SQLT	
  makes	
  SQL	
  Tuning	
  easier	
  
Enkitec	
  (c)	
  2014	
   14	
  
Mastering	
  SQLTXPLAIN	
  
•  PracLce	
  using	
  SQLT	
  
•  Read	
  Stelios	
  Charalambides	
  book	
  
	
  
Enkitec	
  (c)	
  2014	
   15	
  
Some	
  SQL	
  Tuning	
  Masters	
  
•  Jonathan	
  Lewis	
  
•  Maria	
  Colgan	
  
•  Tom	
  Kyte	
  
•  Kerry	
  Osborne	
  
•  Guy	
  Harrison	
  
•  Karen	
  Morton	
  
Enkitec	
  (c)	
  2014	
   16	
  
Contact	
  InformaLon	
  
•  carlos.sierra@enkitec.com	
  
•  carlos-­‐sierra.net	
  
•  @csierra_usa	
  
Enkitec	
  (c)	
  2014	
   17	
  

More Related Content

Sql tuning made easier with sqltxplain (sqlt)

  • 1. SQL  Tuning  Made  Easier  with     SQLTXPLAIN  (SQLT)   Carlos  Sierra  
  • 2. Carlos  Sierra   •  Consultant/Developer/DBA   •  Oracle  Performance   •  SQLTXPLAIN  (SQLT)   •  SQL  Tuning   •  Tools   Enkitec  (c)  2014   2  
  • 3. Topics   •  SQLTXPLAIN  101   •  Sample  Output   •  InstallaLon   •  Using  XTRACT  and  XECUTE   •  Demos   Enkitec  (c)  2014   3  
  • 4. SQLTXPLAIN  (SQLT)   •  Tool  for  SQL  Tuning   – DiagnosLcs   •  Inputs  one  SQL   •  Outputs  one  compressed  file   – Main  HTML  Report  +  many  other  files   •  MOS  215187.1   – Free  download  and  use   Enkitec  (c)  2014   4  
  • 5. Some  Tools   •  One  Database   – ORAchk,  OEM,  AWR,  OS  Stats,  etc   •  One  Process   – SQL  Trace,  TKPROF,  Method  R,  ASH,  etc   •  One  SQL   – SQLT,  SQLHC,  planx,  sqlmon,  sqlash,  etc   Enkitec  (c)  2014   5  
  • 7. Demos  1  and  2   •  Main  HTML  Report   •  SQLT  XTRACT  Output   Enkitec  (c)  2014   7  
  • 8. SQLT  InstallaLon   •  My  Oracle  Support  (Metalink)   – Note  215187.1   •  Unzip  sqlt.zip  on  Database  Server   •  Read  sqlt/sqlt_instrucLons.html   •  Execute  sqlt/install/sqcreate.sql   – Connect  as  SYS   Enkitec  (c)  2014   8  
  • 9. InstallaLon  Parameters   Enkitec  (c)  2014   9  
  • 10. Using  SQLT   •  Read  sqlt/sqlt_instrucLons.html   •  Navigate  to  sqlt/run   •  Connect  as  applicaLon  user   – Or  user  granted  sqlt_user_role  or  dba   •  Execute  one  of  these  two   – sqltxtract.sql   – sqltxecute.sql   Enkitec  (c)  2014   10  
  • 11. SQLT  XTRACT   •  Inputs   – SQL_ID   – SQLTXPLAIN  Password   •  Outputs   – ZIP  File   •  Main  HTML  Report   •  Other  Files   Enkitec  (c)  2014   11  
  • 12. SQLT  XECUTE   •  Inputs   – File  Name  with  SQL   •  Binds  declaraLon  and  assignment   •  SQL  Text   – SQLTXPLAIN  Password   •  Outputs   – ZIP  File   Enkitec  (c)  2014   12  
  • 13. Demos  3  and  4   •  SQLT  InstallaLon   •  SQLT  XTRACT   – SQL_ID  8u0n7w1jug5dg   Enkitec  (c)  2014   13  
  • 14. Conclusion   •  SQLT  is  a  comprehensive  tool  for  SQL  Tuning   •  SQLT  is  free  to  download  and  use   •  SQLT  is  easy  to  use   •  SQLT  makes  SQL  Tuning  easier   Enkitec  (c)  2014   14  
  • 15. Mastering  SQLTXPLAIN   •  PracLce  using  SQLT   •  Read  Stelios  Charalambides  book     Enkitec  (c)  2014   15  
  • 16. Some  SQL  Tuning  Masters   •  Jonathan  Lewis   •  Maria  Colgan   •  Tom  Kyte   •  Kerry  Osborne   •  Guy  Harrison   •  Karen  Morton   Enkitec  (c)  2014   16  
  • 17. Contact  InformaLon   •  carlos.sierra@enkitec.com   •  carlos-­‐sierra.net   •  @csierra_usa   Enkitec  (c)  2014   17