1. DMR를 사용할 경우 익스텐트 할당등 공간관리 작업을 수행할 때 획득하는 락이다.
2. 전체 인스턴스에서 하나의 프로세스만이 획득 가능하다.
3. 8i 이상에서 LMT를 사용하면 해결된다.
{code} SYS@TEST3 >create tablespace dmt_tbs 2 extent management dictionary 3 datafile '/data01/oradata/TEST3/dmt01.dbf' size 100M 4 autoextend on ; |
LKWTEST@TEST3 >create table dmt_test ( id number )
2 storage ( initial 10K next 10K pctincrease 0 maxextents unlimited freelists 5)
3 initrans 20
4 tablespace dmt_tbs;
LKWTEST@TEST3 >
LKWTEST@TEST3 >alter session set events '10046 trace name context forever, level 8';
LKWTEST@TEST3 >alter table dmt_test allocate extent;
--SQL Trace
select length from fet$ where file#=:1 and block#=:2 and ts#=:3
update tsq$ set blocks=:3,maxblocks=:4,grantor#=:5,priv1=:6,priv2=:7,priv3=:8 where ts#=:1 and user#=:2
insert into fet$ (file#,block#,ts#,length) values (:1,:2,:3,:4)
delete from fet$ where file#=:1 and block#=:2 and ts#=:3
update seg$ set type#=:4,blocks=:5,extents=:6,minexts=:7,maxexts=:8,extsize=:9,extpct=:10,user#=:11,iniexts=:12,lists=decode(:13, 65535, NULL, :13),groups=decode(:14, 65535, NULL, :14), cachehint=:15, hwmincr=:16, spare1=DECODE(:17,0,NULL,:17),scanhint=:18 where ts#=:1 and file#=:2 and block#=:3
update tab$ set ts#=:2,file#=:3,block#=:4,bobj#=decode(:5,0,null,:5),tab#=decode(:6,0,null,:6),intcols=:7,kernelcols=:8,clucols=decode(:9,0,null,:9),audit$=:10,flags=:11,pctfree$=:12,pctused$=:13,initrans=:14,maxtrans=:15,rowcnt=:16,blkcnt=:17,empcnt=:18,avgspc=:19,chncnt=:20,avgrln=:21,analyzetime=:22,samplesize=:23,cols=:24,property=:25,degree=decode(:26,1,null,:26),instances=decode(:27,1,null,:27),dataobj#=:28,avgspc_flb=:29,flbcnt=:30,trigflag=:31,spare1=:32,spare2=decode(:33,0,null,:33),spare4=:34,spare6=:35 where obj#=:1
update obj$ set obj#=:6,type#=:7,ctime=:8,mtime=:9,stime=:10,status=:11,dataobj#=:13,flags=:14,oid$=:15,spare1=:16, spare2=:17 where owner#=:1 and name=:2 and namespace=:3 and(remoteowner=:4 or remoteowner is null and :4 is null)and(linkname=:5 or linkname is null and :5 is null)and(subname=:12 or subname is null and :12 is null)
|
h3.2-2.LMT를 사용하는 경우
|
SYS@TEST3 >create tablespace lmt_tbs
2 extent management local uniform size 10K
3 datafile '/data01/oradata/TEST3/lmt01.dbf' size 100M
4 autoextend on ;
create tablespace lmt_tbs
*
ERROR at line 1:
ORA-03249: Uniform size for auto segment space managed tablespace should have atleast 5 blocks
SYS@TEST3 >create tablespace lmt_tbs
2 extent management local uniform size 1M
3 datafile '/data01/oradata/TEST3/lmt01.dbf' size 100M
4 autoextend on ;
Tablespace created.
LKWTEST@TEST3 >create table lmt_test ( id number )
2 storage ( freelists 5)
3 tablespace lmt_tbs;
Table created.
LKWTEST@TEST3 >alter session set events '10046 trace name context forever, level 8';
Session altered.
LKWTEST@TEST3 >alter table lmt_test allocate extent;
Table altered.
--SQL Trace
select file# from file$ where ts#=:1
update tsq$ set blocks=:3,maxblocks=:4,grantor#=:5,priv1=:6,priv2=:7,priv3=:8 where ts#=:1 and user#=:2
update seg$ set type#=:4,blocks=:5,extents=:6,minexts=:7,maxexts=:8,extsize=:9,extpct=:10,user#=:11,iniexts=:12,lists=decode(:13, 65535, NULL, :13),groups=decode(:14, 65535, NULL, :14), cachehint=:15, hwmincr=:16, spare1=DECODE(:17,0,NULL,:17),scanhint=:18 where ts#=:1 and file#=:2 and block#=:3
delete from superobj$ where subobj# = :1
delete from tab_stats$ where obj#=:1
update tab$ set ts#=:2,file#=:3,block#=:4,bobj#=decode(:5,0,null,:5),tab#=decode(:6,0,null,:6),intcols=:7,kernelcols=:8,clucols=decode(:9,0,null,:9),audit$=:10,flags=:11,pctfree$=:12,pctused$=:13,initrans=:14,maxtrans=:15,rowcnt=:16,blkcnt=:17,empcnt=:18,avgspc=:19,chncnt=:20,avgrln=:21,analyzetime=:22,samplesize=:23,cols=:24,property=:25,degree=decode(:26,1,null,:26),instances=decode(:27,1,null,:27),dataobj#=:28,avgspc_flb=:29,flbcnt=:30,trigflag=:31,spare1=:32,spare2=decode(:33,0,null,:33),spare4=:34,spare6=:35 where obj#=:1
update obj$ set obj#=:6,type#=:7,ctime=:8,mtime=:9,stime=:10,status=:11,dataobj#=:13,flags=:14,oid$=:15,spare1=:16, spare2=:17 where owner#=:1 and name=:2 and namespace=:3 and(remoteowner=:4 or remoteowner is null and :4 is null)and(linkname=:5 or linkname is null and :5 is null)and(subname=:12 or subname is null and :12 is null)
|
h2. 3. 8i부터 ST락 경합을 줄이는 방법 제공
1. LMT기능 추가
2. tablespace마다 하나씩 사용가능한 TT락 사용을 확대
* TT락 ID1 = tablespace#
* TT락 ID2 작업의 종류
3. 임시테이블스페이스 도입
: 일반tbs에서 정렬수행에 따른 과도한 익스텐트의 할당과 해제는 ST락의 경합을 유발하고 성능저하의 주요 원인이 된다.
h2. 문서에 대하여
* 최초작성자 : [~kwlee55]
* 최초작성일 : 2011년 01월 06일
* 이 문서는 [오라클클럽|http://www.gurubee.net] [코어 오라클 데이터베이스 스터디|5차 코어 오라클 데이터베이스 스터디] 모임에서 작성하였습니다.
* {color:blue}{*}이 문서의 내용은 (주)엑셈에서 출간한 'PRACTICAL OWI IN ORACLE 10G'와 'Advanced OWI in Oracle 10g'를 참고하였습니다.*{color}