4

Click here to load reader

Locally vs Dictionary Managed Tablespaces

Embed Size (px)

DESCRIPTION

lll

Citation preview

Locally vs. Dictionary Managed TablespacesSubmitted by admin on Tue, 2003-07-01 12:31 RDBMS ServerWhen Ora!e a!!oate" "#ae to a "e$ment %!i&e a tab!e or inde'(, a $rou# o) onti$uou" )ree b!o&", a!!ed an e'tent, i" added to the "e$ment* Metadata re$ardin$ e'tent a!!oation and una!!oated e'tent" are either "tored in the data ditionary, or in the tab!e"#ae it"e!)* Tab!e"#ae"that reord e'tent a!!oation in the ditionary, are a!!ed ditionary mana$ed tab!e"#ae", and tab!e"#ae" that reord e'tent a!!oation in the tab!e"#ae header, are a!!ed !oa!!y mana$ed tab!e"#ae"*SQL> select tablespace_name, extent_management, allocation_type from dba_tablespaces;TABLESPAE_!A"EE#TE!T_"A! ALL$AT%$&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&& &&&&&&&&&S'STE" (%T%$!A)' *SE)S'S_*!($TS L$ALS'STE"TE"P L$AL*!%+$)"Dictionary Managed Tablespaces (DMT):Ora!e u"e the data ditionary %tab!e" in the S+S "hema( to tra& a!!oated and )ree e'tent" )or tab!e"#ae" that i" in ,ditionary mana$ed, mode* -ree "#ae i" reorded in the S+S*-.T/ tab!e, and u"ed "#ae in the S+S*0.T/ tab!e* Whenever "#ae i" re1uired in one o) the"e tab!e"#ae", the ST %"#ae tran"ation( en1ueue !ath mu"t be obtained to do in"ert" and de!ete" a$ian"t the"e tab!e"* 2" on!y one #roe"" an a1uire the ST en1ue at a $iven time, thi" o)ten !ead to ontention*.'eute the )o!!o3in$ "tatement to reate a ditionary mana$edtab!e"#ae:SQL> )EATE TABLESPAE ts, (ATA+%LE -.oradata.ts,_/,0dbf- S%1E 2/" E#TE!T "A!A3E"E!T (%T%$!A)' (E+A*LT ST$)A3E 4 %!%T%AL 2/5 !E#T 2/5 "%!E#TE!TS 6 "A#E#TE!TS 2/ PT%!)EASE /7;Locally Managed Tablespaces (LMT):0"in$ 4MT, eah tab!e"#ae mana$e" it5" o3n )ree and u"ed "#ae 3ithin a bitma# "truture "tored in one o) the tab!e"#ae5" data )i!e"* .ah bit orre"#ond" to a databa"e b!o& or $rou# o) b!o&"* .'eute one o) the )o!!o3in$ "tatement" to reate a !oa!!y mana$edtab!e"#ae:SQL> )EATE TABLESPAE ts6 (ATA+%LE -.oradata.ts6_/,0dbf- S%1E 2/"E#TE!T "A!A3E"E!T L$AL A*T$ALL$ATE;SQL> )EATE TABLESPAE ts8 (ATA+%LE -.oradata.ts8_/,0dbf- S%1E 2/"E#TE!T "A!A3E"E!T L$AL *!%+$)" S%1E ,695;6ote the di))erene bet3een 20TO244O72T. and 068-ORM S89.:20TO244O72T. "#ei)ie" that e'tent "i:e" are "y"tem mana$ed* Ora!e 3i!! hoo"e ,o#tima!,ne't e'tent "i:e" "tartin$ 3ith ;MB, and eventua!!y to ;