日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

关于 数据文件自增长 的一点理解

發(fā)布時間:2024/4/15 编程问答 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 关于 数据文件自增长 的一点理解 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

?

?

同事問了我數(shù)據(jù)文件自增長的問題。

?

我對表空間數(shù)據(jù)文件的處理原則是:

(1)??? 數(shù)據(jù)文件設(shè)置為自增長,每次自增長的大小為100M。最大值32G。 因為8k的數(shù)據(jù)塊最大支持32G。

(2)??? 用腳本監(jiān)控表空間使用率,超過90%時,手動的添加數(shù)據(jù)文件。 因為現(xiàn)在的文件系統(tǒng)比以前的好,可以將單個數(shù)據(jù)文件設(shè)置成10G20G。 都沒有什么問題。

?

?

?? 同事問我,為什么不使用自增長,這個問題我也給不出一個十分有說服力的解釋。 我把數(shù)據(jù)文件設(shè)成自增長是為了防止因為數(shù)據(jù)文件暴漲,導(dǎo)致表空間不足的問題。 至于手動添加數(shù)據(jù)文件,我的理解是多個數(shù)據(jù)文件比單個數(shù)據(jù)文件好,至少在出現(xiàn)壞塊的時候,可以減少數(shù)據(jù)丟失的可能性,而且如果把數(shù)據(jù)文件放在不同的位置,還可以提高I/O的性能。 DBA1群的 西安-布豆 討論了一下這個問題,他說Oracle 的專家也是使用手動添加數(shù)據(jù)文件的。

?

?????? 手動添加數(shù)據(jù)文件,增加了數(shù)據(jù)文件管理上的透明度,我們可以知道文件添加成功與否,而自動擴(kuò)展的話,可能會出現(xiàn)因磁盤空間不足而導(dǎo)致的擴(kuò)展失敗。

?

還有一點(diǎn)就是I/O的影響。 我的理解: 如果每次都自增100M,在磁盤分配的空間不一定是連續(xù)的。 這樣磁盤比較分散,每次讀數(shù)據(jù)的時候,I/O的時間比較長,如果一次給10G,這樣磁盤上空間是連續(xù)的,這樣I/O會塊一點(diǎn)。 在備份的時候,速度也會快一點(diǎn)。 西安-布豆 說這個是系統(tǒng)上應(yīng)該考慮的問題。

?

?????? 個人對這塊的理解也不是很透徹, 所以又google了一下。

?

?????? 這是itpub 論壇上,關(guān)于數(shù)據(jù)文件自增長的一些討論,也沒有一個統(tǒng)一的說法。

??? http://www.itpub.net/thread-1281633-1-1.html

?

?? 數(shù)據(jù)文件自增長的好處是很明顯的,不用DBA過多的關(guān)注表空間的問題。 但是我覺得監(jiān)控表空間是DBA日常職責(zé)之一,如果使用自增長的話,可能會在思想上出現(xiàn)麻痹,過度依賴數(shù)據(jù)文件的自增長。反而不利于數(shù)據(jù)庫的管理。

?

?

官網(wǎng)的一些說法:

?

You can create datafiles or alter existing datafiles so that they automatically increase in size when more space is needed in the database. The file size increases in specified increments up to a specified maximum.

Setting your datafiles to extend automatically provides these advantages:

·???????? Reduces the need for immediate intervention when a tablespace runs out of space

·???????? Ensures applications will not halt or be suspended because of failures to allocate extents

?

http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/dfiles003.htm

?

?

Autoextend Tablespace

You can set a tablespace to automatically extend itself by a specified amount when it reaches its size limit. If you do not enable autoextend, you are alerted when the tablespace reaches its critical or warning threshold size. The critical and warning threshold parameters have default values that you can change at any time. These parameters also cause alerts to be generated for autoextending tablespaces that are approaching their specified size limit. You can respond to size alerts by manually increasing the tablespace size. You do so by increasing the size of one or more of the tablespace datafiles or by adding another datafile to the tablespace.

http://download.oracle.com/docs/cd/B28359_01/server.111/b28301/storage001.htm#ADMQS12057

?

?

?

?

?

?

------------------------------------------------------------------------------

Blog http://blog.csdn.net/tianlesoftware

網(wǎng)上資源: http://tianlesoftware.download.csdn.net

相關(guān)視頻:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx

DBA1 群:62697716(滿); DBA2 群:62697977(滿)

DBA3 群:63306533;???? 聊天 群:40132017

--加群需要在備注說明SGA的組成部分,否則拒絕申請

轉(zhuǎn)載于:https://www.cnblogs.com/zlja/archive/2010/09/30/2449797.html

總結(jié)

以上是生活随笔為你收集整理的关于 数据文件自增长 的一点理解的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。