zoukankan      html  css  js  c++  java
  • OCP-1Z0-053-V13.02-144题

    144.In your database, the RESULT_CACHE_MODE parameter has been set to MANUAL in the

    initialization parameter file. You issued the following command:

    SQL>SELECT /*+ RESULT_CACHE */ sale_category, sum(sale_amt)

    FROM sales

    GROUP BY sale_category;

    Where would the result of this query be stored?

    A. database buffer cache

    B. shared pool

    C. PGA

    D. large pool

    Answer: B

    答案解析:

    RESULT_CACHE_MODE specifies when a ResultCache operator is spliced into a query's execution plan.

    Values:

    • MANUAL

      The ResultCache operator is added only when the query is annotated (that is, hints).

    • FORCE

      The ResultCache operator is added to the root of all SELECT statements (provided that it is valid to do so).



      Shared Pool Concepts

      The main components of the shared pool are the library cache, the dictionary cache, and, depending on your configuration, the server result cache. The library cache stores the executable (parsed or compiled) form of recently referenced SQL and PL/SQL code. The dictionary cache stores data referenced from the data dictionary. The server result cache stores the results of queries and PL/SQL function results.

      Many of the caches in the shared pool automatically increase or decrease in size, as needed, including the library cache and the dictionary cache. Old entries are aged out to accommodate new entries when the shared pool does not have free space.

      A cache miss on the data dictionary cache or library cache is more expensive than a miss on the buffer cache. For this reason, the shared pool should be sized to ensure that frequently used data is cached.

      Several features make large memory allocations in the shared pool: for example, the shared server, parallel query, or Recovery Manager. Oracle recommends segregating the SGA memory used by these features by configuring a distinct memory area, called the large pool.

      Allocation of memory from the shared pool is performed in chunks. This chunking enables large objects (over 5 KB) to be loaded into the cache without requiring a single contiguous area. In this way, the database reduces the possibility of running out of enough contiguous memory due to fragmentation.

      Infrequently, Java, PL/SQL, or SQL cursors may make allocations out of the shared pool that are larger than 5 KB. To allow these allocations to occur most efficiently, Oracle Database segregates a small amount of the shared pool. This memory is used if the shared pool does not have enough space. The segregated area of the shared pool is called the reserved pool.


  • 相关阅读:
    Web负载均衡的几种实现方式
    Apache和Nginx的区别
    Nginx和Apache区别
    Git 使用中显示“Another git process seems to be running in this repository...”问题解决
    上传本地代码到gitHub过程详解
    MySQL数据库中varchar与char类型的区别
    正则表达式中/i,/g,/ig,/gi,/m的区别和含义
    内行看门道:看似“佛系”的《QQ炫舞手游》,背后的音频技术一点都不简单
    惧怕羊毛党?腾讯云为你保驾护航
    教你1天搭建自己的“微视”
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13316318.html
Copyright © 2011-2022 走看看