Toad 實現 SQL 優化


 It is very easy for us to implement sql tuning by toad.  We need to do is just give complex sql statement to toad. The article
give you some examples to demonstrate how to tuning sql by toad for oracle.

 

1. Get execution plan
Editor  --> Explain plan current SQL  or CTRL + E
 

2. Get statistics/Auto Trace
Enable Auto Trace panel.

or you can right click and choose auto trace to enable it in SQL editor blank.

 

3. Get statistics after executed sql.
 

4. Tuning SQL

Executed sql

 

Then current SQL will be executed and many alternative sql statement will be generated.

 

5. Compare result
 

From above using where clause replace having clause is fine.

Actually SQL tuning tools is derived from Quest SQL optimizer. If you learn more please go through http://www.quest.com/sql-optimizer-for-oracle/

Although  SQL tuning optimizer help us a lot ,master SQL tuning we should have deep understand such like sql execution plan, 
auto trace statistics, table join, index and so on.

The demo is based on Toad for Oracle 10.5.0.41


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM