• User accounts
• Use%ul %eatures
Setting up a Database server
• DB Server setup is t&e responsibility o% t&e DBA
tea#
• !rucial to &ave a good plat%or# c&eap does not
pay'''$ ( )ard*are selection cluster vs" single
&ost$+ )A
con%iguration ,
( Ra* partitions - RAID .0 stripping and #irroring$
1ogical 2olu#e #anager SAN,$
( 3b4t&ernet or &ig&er+ &o* #any
inter%aces,
• A properly tuned database is ON15 !6U bound
Setting up a Database server
• 5ou &ave to plan %or t&e database and %or t&e
instance
• Database ( Si7ing t&e tablespaces TS$ is 24R5
i#portant
• 3eneral versus Dedicated
• 1ocally #anaged vs" Dictionary #anaged
• Instance ( Dedicated vs" 8ulti T&readed Server
connections
( Nu#ber o% processes
( Sort area si7e
( 8any #ore;
• Backup policy see !at&erine slides$ ( )as to be
agreed *it& t&e users
( Several options e<p/i#p+ &ot/cold
backups$
DATAEI14
1O3EI14
User accounts
• Any user can re:uest an account in t&e central develop#ent
and production DB &andled by IT ( But %or
p&ysics use+ t&ere *ill be dedicated servers
• Accounts &ave space :uota on one or #ore tablespaces
• In t&is account+ t&e user *ill create ne* database
applications tables+ inde<es+ types ;$
• Users can also see/play *it& data t&at is on re#ote
databases %ro# t&e local account ( 6er%or#ance
issues #ust be taken into account due to
net*ork access
S=1> create user c#sKanodeKboard identi%ied by yupyup
de%ault tablespace data.0 te#porary
tablespace te#p.0 :uota 0..8 on data.0
:uota unli#ited on ind<.0H
S=1> grant designer to c#sKanodeKboardH
Security0/G$
• T&e database catalog in tablespace S5ST48$ can not be
#odi%ied directly
• Eor everyt&ing t&at you can do in t&e database
t&ere is an associated database privilege ( A DBA
can group syste# privileges into roles and
assign t&e# to user accounts
( A user can also create roles to assign access
privileges on &is/&er ob9ects$ to anot&er users
( Data itsel% can be stored encrypted
( 6ass*ord can e<pire like in t&e nor#al
OS$
( Secure t&e co##unication *it& t&e db
using D4S+
TripleMD4S+ RSA R!"""
Bio#etri<;
• Alt&oug& t&e de%ault is everything in
clear
( @e can s*itc& to security #ode
i##ediately
• T&e ability to #ake your :ueries %aster
( C.P o% t&e ti#es all t&e tuning is done at
t&e
user code level
( 8issing inde< or *rong Query Plan c&osen
by
t&e Opti#i7er
EI14 Q TAB14'''$
DB Tuning ( clientG/G$
• 5ou can al*ays see t&e Query Plan be%ore you run t&e
:uery ( I% t&e opti#i7er c&ooses t&e *rong
options you can %orce a
di%%erent c&oice via Hints
• Detailed statistics about e<ecution o% your :ueries %or #ore
advanced tuning ( !an easily identi%y &otspots
• Re#edies ( no*ing your data - :uery patterns is
essential
Reducing :uery ti#es %ro# &ours to #inutes or even
seconds$ is not unusual
DB Tuning M server
• T&e database itsel% &as #any para#eters t&at can
be t*eaked to i#prove t&e per%or#ance
• T&e role o% t&e DBA is to understand t&e i#pact o%
t&ose para#eters in t&e general per%or#ance o% t&e db"
( In t&e past+ you could not #odi%ied t&e#
*it&out
stopping t&e database
( No* #any can be #odi%ied online
Use%ul %eatures 0/$
• 6artitioning see 8ontse slides$ ( Data is separated
p&ysically according to a key alt&oug&
logically+ *e see it as single unit
( Increased per%or#ance+ i#proved data #anage#ent
• Bit#ap inde< see urt/4ric slides$ ( 2ery use%ul %or
lo* cardinality data
( 4ven %or &ig& cardinality i% *e apply a
%unction t&at reduces it
• Eunction based inde< see 4ric slides$ ( Inde<
is not created on t&e data but on t&e result o%
applying
a %unction native or e<ternal$
• Server side processing pl/s:l+ 9ava$ ( !loser to data+
code reusability
( Database can do #any #ore t&ings %or you t&an
9ust storing/retrieving data
• Resu#able state#ents ( Transaction %ree7es *&ile
t&e error condition is %i<ed
( User code does not need to be #odi%ied to pro%it
( 1i#ited set o% errors are trapped in Ci initial
version$
• ava 28 inside t&e database kernel ( ava co#piler
to speed up t&e per%or#ance
( S6+Servlets+4B+ava stored procedures
( Using ! %or t&e #o#ent
• External table api allo*s any e<ternal source e<
a
socket$ to look like a nor#al table
• 81
( 81 native data type
Use%ul %eatures /$
• 6arallel =uery see 8ontse slides$ ( =uery/analy7e
large a#ounts o% data
( Inter parallelis# S86 #ac&ines ( tested$
( Intra parallelis# %or clusters M not tested$
• Transportable tablespaces see 8arcin/!at&erine slides$
( Allo*s you to #ove data %ro# one database to
anot&er very easily and %ast al#ost plug-play$