Mr.Y 發表在 痞客邦 留言(0) 人氣(87)
Mr.Y 發表在 痞客邦 留言(0) 人氣(46)
select
fs.tablespace_name "Tablespace",
(df.totalspace - fs.freespace) "Used MB",
fs.freespace "Free MB",
df.totalspace "Total MB",
round(100 * (fs.freespace / df.totalspace)) "Pct. Free",
(df.totalspace - fs.freespace) "Pct. Used"
from
(select
tablespace_name,
round(sum(bytes) / 1048576) TotalSpace
from
dba_data_files
group by
tablespace_name
) df,
(select
tablespace_name,
round(sum(bytes) / 1048576) FreeSpace
from
dba_free_space
group by
tablespace_name
) fs
where
df.tablespace_name = fs.tablespace_name;
Mr.Y 發表在 痞客邦 留言(0) 人氣(33)
Mr.Y 發表在 痞客邦 留言(0) 人氣(35)
1. SGA Library cache hit ratio > 90
2. Data Dictionary cache hit ratio > 90
3. Data buffer cache hit ratio >90
4. Redo log cache. requests/entries 要小
5. Redo log 個數. 循環頻率. 在循環前需完成 archive
6. 大資料量表格獨立tablespace
7. 大資料量表格索引獨立tablespace
8. 存取頻繁的表格獨立tablespace
9. 避免多量的extents
10. 檔案可放在高速的硬碟上
11. Auto PGA
Mr.Y 發表在 痞客邦 留言(0) 人氣(266)
1.不要使用 malloc 動態宣告大塊記憶體
a.改用 calloc
2.不要一直 memset 大塊的動態記憶體
a.改用先 free 再 calloc
3.不要使用 fopen 來判斷檔案是否存在
a.改用 fstat 或 access 來判斷
4.不要額外使用 strlen 計算字元陣列長度
a.新的字元陣列產生當下順便得到新字元陣列的長度
5.不要使用 strcat 或 sprint 來串接字元陣列
a.改用 StringBuffer 或 指標串接
6.不要直接比較兩組字元陣列
a.改比較 int
7.不要在迴圈中重複計算不會改變的資料
a.先在迴圈外計算完畢
8.不要使用迴圈 one-by-one 的方式複製陣列內容
a.改用記憶體複製
9.不要在大型陣列中做查找行為
a.改使用 hashtable
10.不要讓大塊的記憶體被 swap 出去
a.可鎖住記憶體不被 swap
Mr.Y 發表在 痞客邦 留言(0) 人氣(59)