oracle sga相關
oracle主要影響效能的記憶體:
-
Shared pool
-
Large pool
-
Java pool
-
Buffer cache
-
Streams pool size
-
Log buffer
-
Process-private memory, such as memory used for sorting and hash joins
share pool
存放不同的資料型別,如plsql塊和sql語句,字典資料
優點:
減少sql語句解析開銷
減少資源鎖定
減少記憶體需求
減少io,字典儲存在此。large pool
不是LRU的,不會把老的資料移除。
應用並行查詢,並行查詢用共享池儲存並行查詢資訊
恢復管理用共享池儲存備份的資訊
共享服務用共享池儲存每個session資訊java pool
主要用於JAVA語言的開發
buffer cache
作用儲存從磁碟讀的block
buffer由keep pool,recycle pool,default pool組成
keep pool常用小表,recycle pool不常使用的大段,default pool 上述兩個不符放在這裡。
修改表的儲存池 alter table table_name storage(buffer_pool keep);
設定SGA_TARGET為非零,STATISTICS_LEVEL為TYPICAL
或者 ALL啟動自動共享記憶體。
alter system set sga_target=500m scope=both statistics=typical;
一般情況下sga_target<=sga_max_size;
注意sga target+pga_target=memory_target或者memory_target不能小於之和,這樣oracle啟動時會報錯。
解決方式
sqlplus / as sysdba;
通過spfile建立pfile;
create pfile ='/home/oracle/initora11g.ora' from spfile;
修改memory_target或者sga_target值
建立spfile
create spfile from pfile = '/home/oracle/initora11g.ora';
starup重啟完成
設定cursor_sharing
如果該引數設定為similar,那麼如果在shared pool中無法找到exact statement的存在的時候,就會在shared pool進行一次新的查詢,就是查詢和當前要解析的語句是否是similar statement的語句。這裡需要對similar statement進行解釋,similar statement就是除了value of some literal不同的語句,別的地方都相同的語句。比如下面:
select * from a where a=1;
select * from a where a=2;
alter system set cursor_sharing=similar
scope=both;
設定sequence的快取數量
alter sequence seq_name cache=value;
設定表的並行度
select
table_name,degree from dba_tables;
其中degree就是表的並行度
出了數值外degree還有值default
Default = parallel_threads_per_cpu * cpu_count
alter table xxx parallel (degree default);
parallel_threads_per_cpu檢視
show parameter parallel_threads_per_cpu
批量更新表並行度
select
'alter table '||user_tables||' parallel(degree 64);' from user_tables;
可以看到所以的alter語句,在plsql
develop中拷貝執行
相關文章
- Oracle 10g SGA 相關的VIEWOracle 10gView
- oracle sga配置相關的os 核心引數Oracle
- SGA相關的幾個動態效能檢視
- Oracle相關Oracle
- oracle 相關Oracle
- Oracle相關命令Oracle
- Oracle synonym 相關Oracle
- Oracle相關收集Oracle
- Oracle Log Miner相關Oracle
- ORACLE db相關nameOracle
- oracle job_相關Oracle
- Oracle 密碼相關Oracle密碼
- oracle維護相關Oracle
- oracle sga構成Oracle
- Linux核心引數(如kernel.shmmax)及Oracle相關引數調整(如SGA_MAX_SIZE)LinuxHMMOracle
- oracle關於分割槽相關操作Oracle
- Oracle 相關知識點Oracle
- oracle awr相關知識Oracle
- Oracle Standby系統相關Oracle
- oracle 連線數相關Oracle
- oracle Metrics相關檢視Oracle
- oracle asmlib包相關OracleASM
- oracle相關內容索引Oracle索引
- oracle10g SGAOracle
- oracle SGA配置和管理Oracle
- ORACLE SGA 的分配(轉)Oracle
- Oracle相關基礎知識Oracle
- oracle最大連線數相關Oracle
- oracle字符集相關整理Oracle
- Oracle相關NUMA特性淺析Oracle
- Oracle RAC 相關概念(Final)Oracle
- 檢視oracle鎖相關資訊Oracle
- Oracle MTS的相關問題Oracle
- oracle執行計劃相關Oracle
- Oracle壞塊處理相關Oracle
- Oracle表空間相關操作Oracle
- oracle串物件相關的bugOracle物件
- oracle index索引相關筆記OracleIndex索引筆記