優化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
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26442936/viewspace-774380/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 最佳化sql的利器SQLTSQL
- 達夢SQL優化利器-ET使用方法SQL優化
- sql最佳化工具SQLTSQL
- SQLT 最佳化SQL 用複合索引代替單列索引的案例SQL索引
- sql最佳化工具之--sqlTSQL
- 【SQL優化】SQL優化的10點注意事項SQL優化
- 【SQL優化】SQL優化工具SQL優化
- mysql的sql優化MySql優化
- 優化SQL中的or優化SQL
- SQL Server優化之SQL語句優化SQLServer優化
- SQL優化SQL優化
- with as優化sql優化SQL
- 效能優化案例-SQL優化優化SQL
- Oracle SQLT 診斷SQL語句效能(3)OracleSQL
- Oracle SQLT 診斷SQL語句效能(2)OracleSQL
- Oracle SQLT 診斷SQL語句效能(1)OracleSQL
- sqltSQL
- SQL優化的方法論SQL優化
- SQL語句的優化SQL優化
- 一個sql的優化SQL優化
- 資料庫優化 - SQL優化資料庫優化SQL
- sql優化之邏輯優化SQL優化
- SQL優化:limit分頁優化SQL優化MIT
- MySQL 效能優化之SQL優化MySql優化
- SQL優化--用各種hints優化一條SQLSQL優化
- SQL SERVER中SQL優化SQLServer優化
- SQL優化指南SQL優化
- SQL SERVER優化SQLServer優化
- sql效能優化SQL優化
- Sql優化方法SQL優化
- oracle sql優化OracleSQL優化
- SQL優化-索引SQL優化索引
- SQL優化(一)SQL優化
- oracle sql 優化OracleSQL優化
- sql 效能優化SQL優化
- Oracle效能優化-SQL優化(案例一)Oracle優化SQL
- Oracle效能優化-SQL優化(案例二)Oracle優化SQL
- Oracle效能優化-SQL優化(案例三)Oracle優化SQL