您好,登錄后才能下訂單哦!
優化sql的利器SQLT是怎么樣的,相信很多沒有經驗的人對此束手無策,為此本文總結了問題出現的原因和解決方法,通過這篇文章希望你能解決這個問題。
優化sql的利器SQLT
Sqlt適用環境:
1、sql優化功底不是很深的同學
2、sql太復雜(2000行以上的SQL)
3、快速優化sql,不考慮業務邏輯
Setup SQLT Method:
SQL> conn /as sysdba
SQL>@/home/oracle/sqlt/install/sqcreate.sql
…
Define SQLTXPLAIN password (hidden and case sensitive).
Password for user SQLTXPLAIN:
Re-enter password:
…
Default tablespace [UNKNOWN]: USERS <== hidden and case sensitive
…
Temporary tablespace [UNKNOWN]: TEMP <== hidden and case sensitive
…
Main application user of SQLT: doudou <==administrator;grant SQLT_USER_ROLE
…
Oracle Pack license [T]: T <==choose
…
SQCREATE completed. Installation completed successfully.
Remove SQLT Method:
@/home/oracle/sqlt/install/sqdrop.sql
SQL> start sqltxtract.sql 0w6uydn50g8c <=SQL sql_id
Administrator privilege
grant connect,resource to doudou;
grant SQLT_USER_ROLE to doudou;
What is different SQLT XECUTE Method and SQLT XTRACT Method ?
SQLT XECUTE Method
? Pros
? Accurate 10053 (considers bind peeking)
? Plan execution statistics (sets STATISTICS_LEVEL=ALL)
? Actual Execution Plan (may be different than explain plan)
? Invokes SQL Tuning Advisor
? No need to know, or get before hand, hash_value or sql_id
? 10046 trace and Trace Analyzer (if installed)
? Cons
? SQL is executed (may take long time)
? Need to know the values of bind variables
SQLT XTRACT Method
? Pros
? Child plans and plan statistics (if STATISTICS_LEVEL=ALL)
? Actual Execution Plan (may be different than explain plan)
? Invokes SQL Tuning Advisor
? SQL is not executed
? No need to know the values of bind variables
? Easy to execute (if hash_value or sql_id are known)
? Cons
? 10053 is generated based on EXPLAIN PLAN FOR (may not
be accurate due to binds peeking)
? Requires to know, or get before hand, hash_value or sql_id
優化SQL的又一利器SQLT(SQLTXPLAIN),SQLT把收集的信息和建議方法都形成了html(main.html;readme.html;lite.html)格式,方便用戶查看!
Main.html:SQLT給出了收集的信息和調優建議
Readme.html:SQLT給出了具體優化的方法
Lite.html:SQLT給出了簡易的PLANS信息
Document 215187.1
看完上述內容,你們掌握優化sql的利器SQLT是怎么樣的的方法了嗎?如果還想學到更多技能或想了解更多相關內容,歡迎關注億速云行業資訊頻道,感謝各位的閱讀!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。