Complete Reference To 11g New Feature : SQL Query Result Cache

作者: Maclean Liu , post on December 6th, 2009 , English Version
【本站文章除注明转载外,均为本站原创编译】
转载请注明:文章转载自: Oracle Clinic – Maclean Liu的个人技术博客 [http://www.oracledatabase12g.com/]
本文标题: Complete Reference To 11g New Feature : SQL Query Result Cache
本文永久地址: http://www.oracledatabase12g.com/archives/complete-reference-to-11g-new-feature-sql-query-result-cache.html


Video:

© 2009, www.oracledatabase12g.com. 版权所有.文章允许转载,但必须以链接方式注明源地址,否则追究法律责任.

相关文章 | Related posts:

  1. 11gR2 NEW FEATURE OCI Client Result Cache – Table annotations support
  2. SQL*Loader Date Cache
  3. 11.2 Database New Feature Deferred Segment Creation
  4. "hcheck.sql" script to check for known problems in Oracle8i, Oracle9i, Oracle10g and Oracle 11g
  5. Most of library cache latches have gone in 11g
  6. Reference:Dissecting the Redo Logs
  7. 搜索结果|Search Result
  8. DSI404e: Query Optimization eStudy
  9. Complete Upgrade Checklist for Manual Upgrades from 8.X / 9.0.1 to Oracle9iR2 (9.2.0)
  10. A Complete Understanding of RMAN Compression

2 comments to Complete Reference To 11g New Feature : SQL Query Result Cache

  • admin

    Result Cache Can Not Be Enabled

    Applies to:

    Oracle Server – Enterprise Edition – Version: 11.1.0.6.0
    This problem can occur on any platform.

    Symptoms

    Result Cache does not work. When changing the result_cache_max_size parameter and restarting the
    database, the value of the parameter is still 0 which means that Result Cache is disabled:

    sys@abc> show parameter result_cache_max_size

    NAME TYPE VALUE
    ———————————— ———– ——————————
    result_cache_max_size big integer 0

    However the size in the spfile is set to a non-zero value:

    sys@abc> !strings spfileELF.ora |grep result_cache
    *.result_cache_max_size=5242880

    Running dbms_result_cache.status() shows that the Result Cache status is BYPASS while it should have been ENABLED:

    sys@elf> SELECT dbms_result_cache.status() FROM dual; 
    DBMS_RESULT_CACHE.STATUS() 
    —————————————————————————————————- 
    —————————————- 
    BYPASS

    Changes

    Using SGA_TARGET:

    *.sga_target=584M
    *.db_cache_size=0
    *.shared_pool_size=0
    *.large_pool_size=0
    *.java_pool_size=0

    Cause

    A minimum value was not set for the shared_pool_size. The Result Cache memory area is located in the Shared Pool so, the value of result_cache_max_size is consumed from the Shared Pool size.

    Solution

    Setting a minimum value for shared_pool_size resolves the problem.

    *.result_cache_max_size=5242880
    *.shared_pool_size=7000000

    SQL> show parameter result_cache_max_size

    NAME TYPE VALUE
    ———————————— ———– ——————————
    result_cache_max_size big integer 5M

    SQL> SELECT dbms_result_cache.status() FROM dual;

    DBMS_RESULT_CACHE.STATUS()
    ——————————————————————————–
    ENABLED 

  • admin

    What v$ table tracks usage of the new Result Cache feature In 11g

    Applies to:

    Oracle Server – Enterprise Edition – Version: 11.1.0.7
    Information in this document applies to any platform.
    11g

    Goal

    What database tables do track the 11g client result cache objects ?

    Solution

    There are 2 v$ tables which may be interesting:
      
    client_result_cache_stats$ :tracks cache statistics
      
    v$result_cache_objects: tracks objets used in the result chache

    You can use the following  query below to get a list of all sql statements currently used in the result cache : 
      
    [ Not the following Output is generated by running cdemoqc.c from $OH/rdbms/demo directory ]

    SQL> select name , type, ROW_COUNT from v$result_cache_objects;
    NAME
    ——————————————————————————–
    TYPE ROW_COUNT
    ———- ———-
    OCITEST.QCTABLE
    Dependency 0
    SELECT /*+ result_cache */ empno, ename, sal FROM qctable
    Result 1000


     

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>