ArcSDE性能优化-Oracle将数据库对象Pin到共享池中来提高数据库性能

来源:互联网 发布:淘宝抢购前100名怎么抢 编辑:程序博客网 时间:2024/05/17 21:56
 

Summary

Pinning database objects in Oracle's shared pool can improve database performance. It is recommended that all ESRI stored procedures and sequences be pinned. Once objects reside in Oracle's shared pool, they do not need to be parsed, which saves considerable resources.

Pinning objects in the shared pool uses available memory that might otherwise be used for other processes that share the pool. Allocate the additional memory to the shared pool as needed. In general, do not pin objects that are rarely used; this could have the adverse affect on database performance.

Procedure

  1. Before pinning database objects, create the SYS package that pins the objects in the shared pool. As the SYS user in SQL*Plus, execute the dbmspool.sql script located under the $ORACLE_HOME/rdbms/admin directory.

    Optionally, it is possible to grant execute privileges to the new DBMS_SHARED_POOL package to users who will need to pin objects. For example, to grant these privileges to the SDE user:

    GRANT execute ON dbms_shared_pool TO sde; 

  2. Begin pinning objects in the shared pool.

    EXECUTE dbms_shared_pool.keep ('STANDARD', 'P'); 

    As a general rule, always pin the following packages owned by SYS:

       STANDARD    DBMS_STANDARD    DBMS_UTILITY    DBMS_DESCRIBE    DBMS_OUTPUT 

    Pinning other SYS packages that are often used, such as DBMS_LOCK and DBMS_ALERT, may be desired.
  3. As the SDE user, pin the objects that the application frequently uses.

    EXECUTE dbms_shared_pool.keep ('VERSION_UTIL', 'P'); 


     EXECUTE dbms_shared_pool.keep ('LOCK_UTIL', 'P'); 

    Database objects are not limited to stored procedures. Database sequences, triggers, and cursors can all be pinned in the shared pool. ESRI recommends pinning frequently used sequences as well.

    EXECUTE dbms_shared_pool.keep ('SDE.CONNECTION_ID_GENERATOR', 'Q'); 


     Database objects have to be pinned after each instance startup, and ideally, immediately after the startup.



     Portions of this article are from Oracle's Documentation. It is not intended to replace or supersede Oracle documentation. Please refer to Oracle documentation for additional information and further clarifications.
原创粉丝点击