ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 讨论:关于The REBIND utility and the FLUSH PACKAGE CACHE

讨论:关于The REBIND utility and the FLUSH PACKAGE CACHE

原创 Linux操作系统 作者:rheet1978 时间:2007-06-25 18:01:22 0 删除 编辑
在看The REBIND utility and the FLUSH PACKAGE CACHE command时,原文如下:
For static SQL statements, packages are created and bound to the database at compile time. If statistics are updated to reflect the physical database characteristics,existing packages should also be updated. The REBIND utility allows you to recreate a package so that the current database statistics can be used. The command is very simple:
REBIND PACKAGE package_name

However, if you are going to change the application source, the existing associated package needs to be explicitly dropped and recreated. The REBIND utility is not used for this purpose. We bring this to your attention here because DBAs often misunderstand the usage of REBIND.
As for dynamic SQL statements, they are precompiled at runtime and stored in the package cache. If statistics are updated, you may flush the cache so that dynamic SQL statements are compiled again to pick up the updated statistics. The command looks like this:
FLUSH PACKAGE CACHE DYNAMIC

有一个疑惑,对基于数据库的application,比如procedure,如果用到了静态sql,每次统计信息变化了,都要重新绑定application的话,不是很麻烦吗?其他数据库也是这么处理的吗?

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9524210/viewspace-376282/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
暂无介绍

注册时间:2008-06-09

  • 博文量
    84
  • 访问量
    548249