oracle中視圖V$PGA_TARGET_ADVICE的用法

來源:互聯網
上載者:User

標籤:

看一下這個視圖能給我們帶來什麼樣的資訊(視圖中每個列都很有協助):
[email protected]> SELECT   pga_target_for_estimate / 1024 / 1024 "PGA(MB)",
  2           pga_target_factor,
  3           estd_pga_cache_hit_percentage,
  4           estd_overalloc_count
  5    FROM   v$pga_target_advice;

   PGA(MB) PGA_TARGET_FACTOR ESTD_PGA_CACHE_HIT_PERCENTAGE ESTD_OVERALLOC_COUNT
---------- ----------------- ----------------------------- --------------------
        10                .5                            34                   13
        15               .75                            34                   13
        20                 1                           100                   13
        24               1.2                           100                   13
        28               1.4                           100                   13
        32               1.6                           100                    3
        36               1.8                           100                    0
        40                 2                           100                    0
        60                 3                           100                    0
        80                 4                           100                    0
       120                 6                           100                    0
       160                 8                           100                    0

12 rows selected.

通過上面的資料可以得到如下的結論:
1.第一列表示不同的PGA的具體值

2.第二列PGA_TARGET_FACTOR為“1”表示當前的pga_aggregate_target設定大小(其他數值都是以這個資料為基礎的倍數),我這裡是20M,通過pga_aggregate_target參數可以確認一下
[email protected]> show parameter pga_aggregate_target;

NAME                    TYPE                 VALUE
----------------------- -------------------- -----------
pga_aggregate_target    big integer          20M

3.第三列表示PGA的估算得到的Cache命中率的百分比
目前系統如果PGA為20M的時候,就可以達到100%的命中率

4.第四列如果為“0”表示可以消除PGA的過載
從上面的資料中可以得到,當PGA為36M的時候,可以消除PGA的過載。

5.綜合以上的結論,我們最終可以將PGA的大小設定為36M。
[email protected]> alter system set pga_aggregate_target=36m;

System altered.

6.調整後,重新查詢一下v$pga_target_advice視圖得到如下的建議資訊,可以看到基本上已經滿足現在的系統需求。
[email protected]> SELECT pga_target_for_estimate / 1024 / 1024 "PGA(MB)",
  2         pga_target_factor,
  3         estd_pga_cache_hit_percentage,
  4         estd_overalloc_count
  5  FROM   v$pga_target_advice;

   PGA(MB) PGA_TARGET_FACTOR ESTD_PGA_CACHE_HIT_PERCENTAGE ESTD_OVERALLOC_COUNT
---------- ----------------- ----------------------------- --------------------
        18                .5                            94                    2
        27               .75                            94                    2
        36                 1                           100                    0
43.1992188               1.2                           100                    0
50.3994141               1.4                           100                    0
57.5996094               1.6                           100                    0
64.7998047               1.8                           100                    0
        72                 2                           100                    0
       108                 3                           100                    0
       144                 4                           100                    0
       216                 6                           100                    0
       288                 8                           100                    0

12 rows selected.

恭喜你,到這裡,您一定已經會“看”這個v$pga_target_advice視圖了。

這是一個動態過程,可以週期性查看這個視圖得到更加有效PGA大小的設定建議。

oracle中視圖V$PGA_TARGET_ADVICE的用法

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.