过程-自动表分析GATHER_TABLE_STATS
来源:互联网 发布:女保镖走红网络 编辑:程序博客网 时间:2024/05/17 00:13
--适用于非分区表
create or replace procedure fx_table as
P_name varchar2(100);
errors varchar2(200);
info2 varchar2(200);
cursor my_cur is select b.table_name
from dba_tables b
where
and b.OWNER='XXX
and b.PARTITIONED='NO'
order by b.num_rows asc ;
BEGIN
open my_cur;
fetch my_cur into P_name ;
while my_cur%found
loop
-- dbms_output.put_line(P_name);
DBMS_STATS.GATHER_TABLE_STATS(ownname => 'XXX,
tabname => P_name,
estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE,
method_opt => 'for all columns size repeat',
degree =>4 ,
cascade=>TRUE
);
insert into fx_table_log values(P_name,sysdate,'');
commit;
fetch my_cur into P_name ;
end loop;
close my_cur;
EXCEPTION
WHEN OTHERS THEN
info2 :=SQLERRM||','||SQLCODE;
errors:=info2;
insert into fx_table_log values(P_name,sysdate,errors);
commit;
end fx_table;
- 过程-自动表分析GATHER_TABLE_STATS
- DBMS_STATS.GATHER_TABLE_STATS分析表详解
- oracle学习之:DBMS_STATS.GATHER_TABLE_STATS分析表
- sql分析常用(gather_table_stats)
- Hibernate 自动生成数据库表过程分析
- 更新oracle表的统计信息 GATHER_TABLE_STATS
- DBMS_STATS.GATHER_TABLE_STATS
- 使用dmbs_stats.gather_table_stats做分析后执行计划不准的解决方法
- xorg初始化过程分析,device节的自动配置
- Oracle自动分析索引,表
- DBMS_STATS.GATHER_TABLE_STATS详解
- DBMS_STATS.GATHER_TABLE_STATS详解
- DBMS_STATS.GATHER_TABLE_STATS 和 analyze
- DBMS_STATS.GATHER_TABLE_STATS详解
- 关于Oracle dbms_stats.gather_table_stats
- DBMS_STATS.GATHER_TABLE_STATS统计数据 详解
- DBMS_STATS.GATHER_TABLE_STATS详解
- DBMS_STATS.GATHER_TABLE_STATS详解
- 为什么我们还在用Android
- linux 安装 Gitk 和 GitGui
- Ubuntu 12.04 LTS server 编译 android-4.0.4_r2.1遇到的问题和解决方法
- mysql conv函数
- Global 设置定时器,执行某个事件
- 过程-自动表分析GATHER_TABLE_STATS
- 魔法编辑器编译老出错
- nyoj364田忌赛马
- 雷神后记
- NBA Superstar Chris Bosh: Here’s Why You Should Learn to Code
- 怎么利用嵌入的HTML渲染来生产网页的预览
- 制作简易的计算器
- css html参考资料
- mysql 语句按时间分组