IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    [原]并发请求:统计数据收集模式

    changyanmanman发表于 2015-07-29 11:29:28
    love 0
    并发请求: 统计数据收集模式(FNDGSCST) / Gather Schema Statistics
    
    Oracle ERP中有几个与Gather有关的标准Request:
    Gather All Column Statistics –FND_STATS.GATHER_ALL_COLUMN_STATS()
    Gather Column Statistics –FND_STATS.GATHER_COLUMN_STATS()
    Gather Schema Statistics –FND_STATS.GATHER_SCHEMA_STATS()
    Gather Table Statistics –FND_STATS.GATHER_TABLE_STATS()
    查看FND_STATS 这个Package的写法,其实它就是在调用Oracle DB中Standard的Package dbms_stats 中的某些Function。
    Oracle DB中常用的Gather有以下一些,DBA也可以直接在Database级别上定期Run这些Function,以便能让Oracle统计到最新的数据库状况:
    dbms_stats.gather_database_stats();
    dbms_stats.gather_schema_stats();
    dbms_stats.gather_table_stats();
    dbms_stats.gather_index_stats();
    
    Oracle CBO需要系统定期分析统计表/索引。 只有这样CBO才能使用正确的SQL访问路径,提高查询效率。 因此在Instance Level的optimizer_mode = choose ,定期运行ANALYZE 或dbms_stats是非常重要的,尤其是当上次统计后,数据量已发生较大变化之后。
    注意:统计操作是很耗资源的动作,要在系统Loading小的时候进行。


沪ICP备19023445号-2号
友情链接