使用 Toad 实现 SQL 优化

标签: sqlstatisticsoracletoolsjointable
8710人阅读 评论(0) 收藏 举报

       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

Author : Robinson Cheng

Blog: http://blog.csdn.net/robinson_0612

 

2
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:4858548次
    • 积分:49503
    • 等级:
    • 排名:第62名
    • 原创:610篇
    • 转载:0篇
    • 译文:7篇
    • 评论:706条
    关于我

    • 十年以上数据库运维管理,性能优化经验
    • 提供数据库相关技术支持及数据库培训
    •  全部文章,欢迎扩散,转载请注明出处


    QQ/Weixin:645746311

    DBA交流群:170233858

    打赏作者
      支付宝&微信支付二维码
      支付宝&微信支付
    最新评论