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
时间: 2024-09-29 01:20:20