1.drop tuning task if task exists (删除之前的优化任务,如果存在的话)
松原ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为成都创新互联公司的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:028-86922220(备注:SSL证书合作)期待与您的合作!
sqlplus / as sysdba
exec DBMS_SQLTUNE.DROP_TUNING_TASK('zhangx_tune_taks'); <2.create tuning task ,please replace sql_id 8gn0a9gxnc125 with yours.
创建一个新的sql优化任务,
DECLARE
tune_task VARCHAR2(30);
BEGIN
tune_task:=DBMS_SQLTUNE.CREATE_TUNING_TASK(sql_id=>'8gn0a9gxnc125',task_name=>'zhangx_tune_taks',time_limit => 600,description=>'ProvideSQLID');
END;
/
3.exec tuning task
BEGIN
DBMS_SQLTUNE.EXECUTE_TUNING_TASK( task_name => 'zhangx_tune_taks' );
END;
/
4.check tuning finding
set lines 999
set long 100000
set longchunksize 100000
select dbms_sqltune.report_tuning_task('zhangxiong_tune_taks') from dual;
当前标题:oracle自带工具(自动优化sql小助手)
文章链接:http://cdxtjz.cn/article/ieigsg.html