91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

數據庫中如何查詢pga/sga及組件值

發布時間:2021-11-10 14:41:29 來源:億速云 閱讀:238 作者:小新 欄目:關系型數據庫

這篇文章主要介紹數據庫中如何查詢pga/sga及組件值,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!

查詢buffer_cache設置的大小對于物理讀次數和時間的預估影響:
select size_for_estimate         "Cache Size (MB)",
       size_factor,
       buffers_for_estimate      "Buffers",
       estd_physical_read_factor est_read_factor,
       estd_physical_reads       estd_phy_red,
       estd_physical_read_time   est_phy_red_t
  from v$db_cache_advice
 where name = 'DEFAULT'
   and block_size =
       (select value from v$parameter where name = 'db_block_size');


查詢當sga組件大小
SQL> select component,current_size,max_size,min_size from v$sga_dynamic_components;

COMPONENT                                                        CURRENT_SIZE   MAX_SIZE   MIN_SIZE
---------------------------------------------------------------- ------------ ---------- ----------
shared pool                                                        4294967296          0 4294967296
large pool                                                          268435456          0  268435456
java pool                                                           134217728          0  134217728
streams pool                                                        436207616          0  436207616
DEFAULT buffer cache                                               1.6744E+10          0 1.6744E+10
KEEP buffer cache                                                           0          0          0
RECYCLE buffer cache                                                        0          0          0
DEFAULT 2K buffer cache                                                     0          0          0
DEFAULT 4K buffer cache                                                     0          0          0
DEFAULT 8K buffer cache                                                     0          0          0
DEFAULT 16K buffer cache                                                    0          0          0

COMPONENT                                                        CURRENT_SIZE   MAX_SIZE   MIN_SIZE
---------------------------------------------------------------- ------------ ---------- ----------
DEFAULT 32K buffer cache                                                    0          0          0
ASM Buffer Cache                                                            0          0          0

13 rows selected.

SQL>


SQL>  select pool,sum(bytes/1024/1024) size_m from v$sgastat group by pool;

POOL             SIZE_M
------------ ----------
             15983.9976
shared pool  4126.17428
streams pool  416.03157
large pool          256
java pool           128



oracle 提供了多個初始化參數,來設置SGA中各個部分的內存大小
SQL> show parameter shared_pool_size;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
shared_pool_size                     big integer 244M
控制共享池的大小,實例運行期間可以動態調整


SQL> show parameter java_pool_size;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
java_pool_size                       big integer 52M
 控制JAVA池的大小,實例運行期間可以動態調整


SQL> show parameter large_pool_size;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
large_pool_size                      big integer 60M
 控制大池的大小,實例運行期間可以動態調整


SQL> show  parameter streams_pool_size;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
streams_pool_size                    big integer 0
 控制流池的大小,實例運行期間可以動態調整


SQL> show parameter db_cache_size;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_cache_size                        big integer 160M
控制數據緩沖區的大小,實例運行期間可以動態調整


SQL> show parameter log_buffer;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_buffer                           integer     5603328
 控制日志緩沖區的大小,該參數在運行期間是不能修改的。


SQL> show parameter sga_target;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sga_target                           big integer 0
與SGA的自動管理相關,如果值是零,需要DBA手動管理SGA


SQL> show parameter sga_max_size;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sga_max_size                         big integer 524M
sga可以使用的最大內存,sga_target的值不能超過sga_max_size,在為SGA中個部分組成 分配內存時,SGA的總內存不能超過sga_max_size設置的值,否則會報錯。sga_max_size 在實例運行期間不能夠動態調整,必須先修改初始化參數文件,然后重啟實例。
sga_max_size參數僅在實例運行期間有效,如果實例啟動時發現SGA各部分組成的參數值 總和大于sga_max_size,實例會忽略當前設置的sga_max_size值,并修改sga_max_size為 當前SGA的最大值。
 
SQL> show parameter statistics_level;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
statistics_level                     string      TYPICAL
 該值與SGA內存的自動管理相關,值為typical或者all的時候oracle會根據會更加收集到的相關統計信息作為參照,確定如何分配SGA中的各部分內存。
 
 oracle SGA中的各部分內存都是以粒度進行分配與回收。粒度的大小不能由DBA設定,取決與SGA的大小,系統平臺的類型。 在大多數平臺下SGA<1G 粒度是4MB,SGA>1G 粒度是16MB。 在win32平臺下,SGA>1G,粒度是8MB。設置oracle SGA中各部分的值時,需要是oracle 粒度的整倍數,否則oracle會自動進行調整
SQL> select component,granule_size from v$sga_dynamic_components;
 
COMPONENT                                                        GRANULE_SIZE
---------------------------------------------------------------- ------------
shared pool                                                           4194304
large pool                                                            4194304
java pool                                                             4194304
streams pool                                                          4194304
DEFAULT buffer cache                                                  4194304
KEEP buffer cache                                                     4194304
RECYCLE buffer cache                                                  4194304
DEFAULT 2K buffer cache                                               4194304
DEFAULT 4K buffer cache                                               4194304
DEFAULT 8K buffer cache                                               4194304
DEFAULT 16K buffer cache                                              4194304
DEFAULT 32K buffer cache                                              4194304
Shared IO Pool                                                        4194304
ASM Buffer Cache                                                      4194304
14 rows selected
oracle SGA中各部分組成粒度值

SQL> select name,bytes from v$sgainfo;
NAME                                  BYTES
-------------------------------- ----------
Fixed SGA Size                      1375820    存儲數據庫與實例的狀態信息
Redo Buffers                        5795840
Buffer Cache Size                 167772160
Shared Pool Size                  255852544
data dictionary cache              62914560
Java Pool Size                     54525952
Streams Pool Size                         0
Shared IO Pool Size                       0
Granule Size                        4194304
Maximum SGA Size                  548237312
Startup overhead in Shared Pool    58720256
Free SGA Memory Available                 0
SGA中各部分內存分配情況查看
 
SQL> select * from v$sga;
 
NAME                      VALUE
-------------------- ----------
Fixed Size              1375820
Variable Size         373293492 包括共享池,大池,java池,流池幾個組成部分。
Database Buffers      167772160  數據緩沖區(Buffer Cache Size)
Redo Buffers            5795840
SGA中各部分內存分配情況查看。

SGA中各個部分所使用的內存只能供自己使用,相互之間無法共享。如果Java Pool分配了1G的內存,但是當前數據庫并沒有運用流特性,分配給流池的空間也不能被SGA中的其他
組件使用。所以使用alter system set 設置SGA中各部分組成的內存的時候,需要謹慎設置以免導致系統內存的浪費,性能損耗。

SQL> show parameter shared_pool_size;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
shared_pool_size                     big integer 244M
 
SQL> alter system set shared_pool_size=230m;
System altered

SQL> show parameter shared_pool_size;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
shared_pool_size                     big integer 232M  
 

oracle自動根據粒度調整為粒度(此處是4MB)進行調整。


SQL> show parameter pga

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
pga_aggregate_target                 big integer 4G

SQL> select * from v$pgastat;

NAME                                                                  VALUE UNIT
---------------------------------------------------------------- ---------- ------------
aggregate PGA target parameter                                   4294967296 bytes
aggregate PGA auto target                                        2837357568 bytes
global memory bound                                               429496320 bytes
total PGA inuse                                                  1607690240 bytes
total PGA allocated                                              2188926976 bytes
maximum PGA allocated                                            1.0088E+10 bytes
total freeable PGA memory                                         176619520 bytes
process count                                                           336
max processes count                                                    1115
PGA memory freed back to OS                                      7.4384E+13 bytes
total PGA used for auto workareas                                 464832512 bytes

NAME                                                                  VALUE UNIT
---------------------------------------------------------------- ---------- ------------
maximum PGA used for auto workareas                              5814672384 bytes
total PGA used for manual workareas                                       0 bytes
maximum PGA used for manual workareas                               1062912 bytes
over allocation count                                                 82922
bytes processed                                                  3.2595E+14 bytes
extra bytes read/written                                         4.6775E+12 bytes
cache hit percentage                                                  98.58 percent
recompute count (total)                                            15634412

19 rows selected.

SQL>

以上是“數據庫中如何查詢pga/sga及組件值”這篇文章的所有內容,感謝各位的閱讀!希望分享的內容對大家有幫助,更多相關知識,歡迎關注億速云行業資訊頻道!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

云阳县| 大邑县| 闻喜县| 清徐县| 抚顺市| 平谷区| 麟游县| 永兴县| 香港| 杨浦区| 翁牛特旗| 迁西县| 浙江省| 澄城县| 高安市| 新野县| 承德县| 搜索| 肥乡县| 浦城县| 临武县| 大新县| 通许县| 雅江县| 沂南县| 通辽市| 呼伦贝尔市| 杂多县| 西吉县| 民县| 西丰县| 丽江市| 盘山县| 儋州市| 黑河市| 两当县| 长兴县| 织金县| 永新县| 马龙县| 报价|