Beruflich Dokumente
Kultur Dokumente
10
Copyright 2008, Oracle. All rights reserved.
Objectives
After completing this lesson, you should be able to manage schema objects and: Determine appropriate table types for your requirements: heap, partition, IO , or cluster !erform related D"A tas#s:
$stimating the si%e of ne& tables Analy%ing gro&th trends Managing optimi%er statistics 'eorgani%ing schema objects online
10 - 2
able ypes
)eap -ype Ordi"ary &heaporga"i,ed( ta#le .artitio"ed ta#le +"de*-orga"i,ed ta#le &+O-( Cl$stered ta#le %escriptio" %ata is stored as a" $"ordered collectio" &heap(. %ata is divided i"to s!aller, !ore !a"agea#le pieces. %ata &i"cl$di"g "o"-'ey val$es( is sorted a"d stored i" a )-tree i"de* str$ct$re. Related data ro! o"e or !ore ta#les are stored together. (lustered
!artitioned
10 - 3 Copyright 2008, Oracle. All rights reserved.
IO
A partition is: A piece of a -very large. table or inde/ Stored in its o&n segment +sed for improved performance and manageability
10 - /
!artitions
(haracteristics of partitions are: Same logical attributes: Same columns, constraints, and inde/es Different physical attributes: Stored in different tablespaces ransparent to applications Several partitioning methods
10 - 0
(reating a !artition
10 - 1
!artitioning Methods
'ange partitioning: Maps ro&s based on logical ranges of columns values1for e/ample, months in a year )ash partitioning: Maps ro&s based on the hash value of the partitioning #ey 2ist partitioning: Maps ro&s based on a discrete list of values, provided by the D"A 'ange3hash partitioning: Maps ro&s using the range method, and &ithin each range partition, creates hash subpartitions 'ange3list partitioning: Maps ro&s first based on a range of values, then based on discrete values
Copyright 2008, Oracle. All rights reserved.
10 - 2
!artition Maintenance
10 - 8
Inde/3Organi%ed ables
IO access
10 - 10
10 - 11
(lusters
ORD_NO ????? 6)6 6)2 6)2 6)2 6)6 6)6 7ROD ?????? A$6)2 A2)46 G/1!) N4*1/ A*+/* W)12$ QT9 ?????? 2) 66 2) 2+ 64 6) AAA
(luster ypes
Inde/ cluster
6 7 8
10 - 1/
10 - 10
Criterio" <"i or! 'ey distri#$tio" ;ve"ly distri#$ted 'ey val$es Rarely $pdated 'ey O te" :oi"ed !aster-detail ta#les .redicta#le "$!#er o 'ey val$es 8$eries $si"g e9$ality predicate o" 'ey %ata is retrieved i" the order it 5as i"serted
10 - 11
+"de*
>ash
+sed to guarantee that ro& order is returned by queries &ithout sorting data:
'o&s are returned in ascending or descending order for a particular cluster #ey value9 ORDER B9 clause is not mandatory to retrieve ro&s in ascending order9
10 - 12
:
10 - 13
10 - 20
10 - 21
10 - 22
Not analyzed
10 - 23 Copyright 2008, Oracle. All rights reserved.
10 - 2/
10 - 20
10 - 21
10 - 22
Summary
In this lesson, you should have learned ho& to manage schema objects and: Determine appropriate table types for your requirements !erform related D"A tas#s:
$stimating the si%e of ne& tables Analy%ing gro&th trends Managing optimi%er statistics 'eorgani%ing schema objects online
10 - 23
10 - 30