优化sql的利器SQLT是怎么样的,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。优化sql的利器SQLTSqlt适用环境:sql优化功底不是很深的同学sql太复杂(2000行以
优化sql的利器SQLT是怎么样的,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。
优化sql的利器SQLT
Sqlt适用环境:
sql优化功底不是很深的同学
sql太复杂(2000行以上的SQL)
快速优化sql,不考虑业务逻辑
Setup SQLT Method:
SQL>conn /as sysdba
SQL>@/home/oracle/sqlt/install/sqcreate.sql
…
DefineSQLTXPLaiN password (hidden and case sensitive).
PassWordfor user SQLTXPLAIN:
Re-enterpassword:
…
Defaulttablespace [UNKNOWN]: USERS <== hidden and case sensitive
…
Temporarytablespace [UNKNOWN]: TEMP <== hidden and case sensitive
…
Mainapplication user of SQLT: doudou <==administrator;grant SQLT_USER_ROLE
…
oraclePack license [T]: T <==choose
…
SQCREATEcompleted. Installation completed successfully.
Remove SQLT Method:
@/home/oracle/sqlt/install/sqdrop.sql
SQL> start sqltxtract.sql 0w6uydn50g8c <=SQLsql_id
Administrator privilege
grantconnect,resource to doudou;
grantSQLT_USER_ROLE to doudou;
Whatis different SQLT XECUTE Method and SQLT XTRACT Method ?
SQLT XECUTE Method
? Pros
?Accurate 10053 (considers bind peeking)
? Planexecution statistics (sets STATISTICS_LEVEL=ALL)
?Actual Execution Plan (may be different than explain plan)
?Invokes SQL Tuning Advisor
? Noneed to know, or get before hand, hash_value or sql_id
?10046 trace and Trace Analyzer (if installed)
? Cons
? SQLis executed (may take long time)
? Needto 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
? SQLis not executed
? Noneed to know the values of bind variables
? Easyto execute (if hash_value or sql_id are known)
? Cons
?10053 is generated based on EXPLAIN PLAN FOR (may not
beaccurate 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信息
Document215187.1
看完上述内容,你们掌握优化sql的利器SQLT是怎么样的的方法了吗?如果还想学到更多技能或想了解更多相关内容,欢迎关注编程网精选频道,感谢各位的阅读!
--结束END--
本文标题: 优化sql的利器SQLT是怎么样的
本文链接: https://lsjlt.com/news/245740.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0