您的位置:首页 > 其它

How To Size UNDO Tablespace For Automatic Undo Management [ID 262066.1]

2013-01-12 23:00 561 查看


SizinganUNDOtablespacerequiresthreepiecesofdata.

(UR)UNDO_RETENTIONinseconds

(UPS)Numberofundodatablocksgeneratedpersecond

(DBS)Overheadvariesbasedonextentandfilesize(db_block_size)

Theundospaceneedediscalculatedas:

UndoSpace=UR*(UPS*DBS)

Twoofthepiecesofinformationcanbeobtainedfromtheinstanceconfiguration:UNDO_RETENTIONandDB_BLOCK_SIZE.Thethirdpieceoftheformularequiresaquerybeingrunagainstthedatabase.Themaximumnumberofundoblocksgeneratedpersecondcan
beacquiredfromV$UNDOSTAT.

Note:Overallconsiderationforpeak/heavyvs.normalsystemactivityshouldbetakenintoaccountwhenpeformingthecalculations.AutoextendOFFvs.ONwillchangethebehaviorforUNDO_RETENTIONgrowthanduseofUNEXPIREDextents.SeeNote461480.1for
moreinformation.

Thefollowingformulacalculatesthepeakundoblocksgeneratedpersecond:

SQL>SELECTundoblks/((end_time-begin_time)*86400)"PeakUndoBlockGeneration"FROMv$undostatWHEREundoblks=(SELECTMAX(undoblks)FROMv$undostat);


ColumnEND_TIMEandBEGIN_TIMEareDATEdatatypes.WhenDATEdatatypesaresubtracted,theresultingvalueisthe#ofdaysbetweenbothdates.Toconvertdaystoseconds,youmultiplyby86400,thenumberofsecondsinaday(24hours*60minutes*60
seconds).

Thefollowingquerycalculatesthenumberofbytesneededtohandleapeakundoactivity:

SQL>SELECT(UR*(UPS*DBS))AS"Bytes"FROM(SELECTvalueASURFROMv$parameterWHEREname='undo_retention'),(SELECTundoblks/((end_time-begin_time)*86400)ASUPSFROMv$undostatWHEREundoblks=(SELECTMAX(undoblks)FROMv$undostat)),(SELECTblock_sizeASDBSFROMdba_tablespacesWHEREtablespace_name=(SELECTUPPER(value)FROMv$parameterWHEREname='undo_tablespace'));


ColumnEND_TIMEandBEGIN_TIMEareDATEdatatypes.WhenDATEdatatypesaresubtracted,theresultingvalueisthe#ofdaysbetweenbothdates.Toconvertdaystoseconds,youmultiplyby86400,thenumberofsecondsinaday(24hours*60minutes*60
seconds).

Thefollowingquerycalculatesthenumberofbytesneededtohandleapeakundoactivity:
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐