您的位置:首页 > 博客中心 > 数据库 >

PLSQL_统计信息系列5_统计信息生成和还原(案例)

时间:2022-03-14 04:43

2015-02-01 Created By BaoXinjian

技术分享一、摘要


统计信息在重新生成后,发现并不能改善程序的性能,甚至更差的时候

Oracle提供了dbms_stat包,对统计信息进行还原

还原步骤如下

Step1. Regather the stats of the tables involved in the query. 重新产生统计信息

Step2. Check the excution plan of the SQL with explain plan. 统计信息更新后解析计划效果

Step3. If the plan changes back, ask to kill the current running job and re-run it. 如果效果可以,则杀掉该进程,重启程序

Step4. If regather doesn‘t work, try to restore the stats of the table whose stats are gathered recently. 如效果不行,则对计息计划进行还原

 

技术分享二、案例


 

 

 

 

 

Thanks and Regards

热门排行

今日推荐

热门手游