資源描述:
《Sybase數(shù)據(jù)庫性能優(yōu)化的具體過程.doc》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫。
1、Sybase數(shù)據(jù)庫性能優(yōu)化的具體過程用一個實例講解了Sybase數(shù)據(jù)庫性能優(yōu)化的具體過程,具體內(nèi)容請參考下文:共享鎖sp_getapplock鎖定應(yīng)用程序資源sp_releaseapplock為應(yīng)用程序資源解鎖SETLOCK_TIMEOUT1800鎖超時期限設(shè)置sp_configure'deadlockcheckingperiod',5000設(shè)置鎖檢測周期sp_configure'lockwaitperiod',5000設(shè)置鎖的等待時間sp_setrowlockpromote設(shè)置基本個表的最大行鎖升級數(shù)(鎖數(shù))sp
2、_setrowlockpromote'TABLE',TREECODE,500,500,100sp_setrowlockpromote'TABLE',LCD05,500,500,100[LockManager]numberoflocks=50000#鎖數(shù)deadlockcheckingperiod=DEFAULTfreelocktransferblocksize=DEFAULTmaxenginefreelocks=DEFAULTlockspinlockratio=DEFAULTlockhashtablesize=DE
3、FAULTlockscheme=DEFAULTlockwaitperiod=DEFAULTreadcommittedwithlock=DEFAULT當很多事務(wù)同時訪問同一個數(shù)據(jù)庫時,會加劇鎖資源爭奪,嚴重時事務(wù)之間會發(fā)生死鎖??捎胹p_object_stats查明死鎖位置。該過程報告資源爭奪最激烈的10張表、一個數(shù)據(jù)庫中資源爭奪的表和單個表的爭奪情況。語法為sp_object_statsinterval[,top_n[,dbname[,objname[,rpt_option]]]],查看鎖爭奪情況只需設(shè)置inter
4、val為“hh:mm:ss”。如果顯示每種鎖的爭奪程度超過15%,應(yīng)該改變加鎖方式,比如表的全頁鎖改成數(shù)據(jù)頁鎖,數(shù)據(jù)頁鎖改成數(shù)據(jù)行鎖等。ParameterNameDefaultMemoryUsedConfigValueRunValue-----------------------------------------------------allowremoteaccess1011printrecoveryinformation0000recoveryintervalinminutes5055taperetentio
5、nindays0000ParameterNameDefaultMemoryUsedConfigValueRunValue-----------------------------------------------------globalasyncprefetchlimit1001010globalcachepartitionnumber1011memoryalignmentboundary2048020482048numberofindextrips0000numberofoamtrips0000procedur
6、ecachepercent20224262020totaldatacachesize089698089698totalmemory471041966089830498304ParameterNameDefaultMemoryUsedConfigValueRunValue-----------------------------------------------------cisbulkinsertbatchsize0000cisconnecttimeout0000ciscursorrows5005050cispa
7、cketsize5120512512cisrpchandling0000enablecis1011maxcisremoteconnections0000maxcisremoteservers25192525ParameterNameDefaultMemoryUsedConfigValueRunValue-----------------------------------------------------dtmdetachtimeoutperiod0000dtmlocktimeoutperiod300030030
8、0enablexactcoordination1011numberofdtxparticipants500149500500strictdtmenforcement0000txntopssratio1636921616xactcoordinationinterval6006060ParameterNameDefaultMemoryUsedConfigValu