flush,analyze

 alter system flush shared_pool;
alter system flush buffer_cache; 





analyze  table tablename  compute  statistics;
analyze table abc estimate statistics sample 20 percent;
analyze  table tablename  delete statistics; 



9i以后推荐用dbms_stats.gather_table_stats
Begin
    Dbms_Stats.Gather_Table_Stats(Ownname          => 'BTAS', -- 用户
                                  Tabname          => 'F_DUEPAYEVENT', --表
                                  Cascade          => True, -- 分析索引
                                  Estimate_Percent => Null, --采样行的百分比 NULL为全部分析
                                  Method_Opt       => 'FOR ALL INDEXED COLUMNS SIZE 1', --索引列生成直方图 SKEWONLY
                                  Force            => True, --锁表也统计
                                  Granularity      => 'AUTO', --收集全局和分区统计数据
                                  Degree           => 8, --收集信息时并行度
                                  Stattab          => Null, -->统计数据将被存储在字典中
                                  Statid           => Null,
                                  Statown          => Null);
  End; 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值