<s>
Database	B-General_Concept
tuning	I-General_Concept
describes	O
a	O
group	O
of	O
activities	O
used	O
to	O
optimize	O
and	O
homogenize	O
the	O
performance	O
of	O
a	O
database	O
.	O
</s>
<s>
It	O
usually	O
overlaps	O
with	O
query	B-Language
tuning	O
,	O
but	O
refers	O
to	O
design	O
of	O
the	O
database	O
files	O
,	O
selection	O
of	O
the	O
database	B-Application
management	I-Application
system	I-Application
(	O
DBMS	O
)	O
application	O
,	O
and	O
configuration	O
of	O
the	O
database	O
's	O
environment	O
(	O
operating	B-General_Concept
system	I-General_Concept
,	O
CPU	B-Device
,	O
etc	O
.	O
</s>
<s>
Database	B-General_Concept
tuning	I-General_Concept
aims	O
to	O
maximize	O
use	O
of	O
system	O
resources	O
to	O
perform	O
work	O
as	O
efficiently	O
and	O
rapidly	O
as	O
possible	O
.	O
</s>
<s>
Hardware	O
and	O
software	B-Application
configuration	O
of	O
disk	O
subsystems	O
are	O
examined	O
:	O
RAID	B-Architecture
levels	O
and	O
configuration	O
,	O
block	B-General_Concept
and	O
stripe	B-General_Concept
size	O
allocation	O
,	O
and	O
the	O
configuration	O
of	O
disks	O
,	O
controller	B-Device
cards	I-Device
,	O
storage	O
cabinets	O
,	O
and	O
external	O
storage	O
systems	O
such	O
as	O
SANs	O
.	O
</s>
<s>
Transaction	B-General_Concept
logs	I-General_Concept
and	O
temporary	O
spaces	O
are	O
heavy	O
consumers	O
of	O
I/O	O
,	O
and	O
affect	O
performance	O
for	O
all	O
users	O
of	O
the	O
database	O
.	O
</s>
<s>
Frequently	O
joined	B-Language
tables	O
and	O
indexes	O
are	O
placed	O
so	O
that	O
as	O
they	O
are	O
requested	O
from	O
file	O
storage	O
,	O
they	O
can	O
be	O
retrieved	O
in	O
parallel	O
from	O
separate	O
disks	O
simultaneously	O
.	O
</s>
<s>
This	O
is	O
typically	O
done	O
through	O
configuring	O
the	O
DBMS	O
,	O
but	O
the	O
resources	O
involved	O
are	O
shared	O
with	O
the	O
host	B-Protocol
system	I-Protocol
.	O
</s>
<s>
Tuning	O
the	O
DBMS	O
can	O
involve	O
setting	O
the	O
recovery	O
interval	O
(	O
time	O
needed	O
to	O
restore	O
the	O
state	O
of	O
data	O
to	O
a	O
particular	O
point	O
in	O
time	O
)	O
,	O
assigning	O
parallelism	B-Operating_System
(	O
the	O
breaking	O
up	O
of	O
work	O
from	O
a	O
single	O
query	B-Language
into	O
tasks	O
assigned	O
to	O
different	O
processing	O
resources	O
)	O
,	O
and	O
network	O
protocols	O
used	O
to	O
communicate	O
with	O
database	O
consumers	O
.	O
</s>
<s>
Memory	O
is	O
allocated	O
for	O
data	O
,	O
execution	B-Language
plans	I-Language
,	O
procedure	O
cache	B-General_Concept
,	O
and	O
.	O
</s>
<s>
It	O
is	O
much	O
faster	O
to	O
access	O
data	O
in	O
memory	O
than	O
data	O
on	O
storage	O
,	O
so	O
maintaining	O
a	O
sizable	O
cache	B-General_Concept
of	O
data	O
makes	O
activities	O
perform	O
faster	O
.	O
</s>
<s>
Caching	O
execution	B-Language
plans	I-Language
and	O
procedures	O
means	O
that	O
they	O
are	O
reused	O
instead	O
of	O
recompiled	O
when	O
needed	O
.	O
</s>
<s>
It	O
is	O
important	O
to	O
take	O
as	O
much	O
memory	O
as	O
possible	O
,	O
while	O
leaving	O
enough	O
for	O
other	O
processes	O
and	O
the	O
OS	O
to	O
use	O
without	O
excessive	O
paging	B-Architecture
of	O
memory	O
to	O
storage	O
.	O
</s>
<s>
Processing	O
resources	O
are	O
sometimes	O
assigned	O
to	O
specific	O
activities	O
to	O
improve	O
concurrency	B-Operating_System
.	O
</s>
<s>
On	O
a	O
server	B-Application
with	O
eight	O
processors	O
,	O
six	O
could	O
be	O
reserved	O
for	O
the	O
DBMS	O
to	O
maximize	O
available	O
processing	O
resources	O
for	O
the	O
database	O
.	O
</s>
<s>
Database	O
maintenance	O
includes	O
backups	B-Protocol
,	O
column	O
statistics	O
updates	O
,	O
and	O
defragmentation	B-Application
of	O
data	O
inside	O
the	O
database	O
files	O
.	O
</s>
<s>
On	O
a	O
heavily	O
used	O
database	O
,	O
the	O
transaction	B-General_Concept
log	I-General_Concept
grows	O
rapidly	O
.	O
</s>
<s>
Transaction	B-General_Concept
log	I-General_Concept
entries	O
must	O
be	O
removed	O
from	O
the	O
log	O
to	O
make	O
room	O
for	O
future	O
entries	O
.	O
</s>
<s>
Frequent	O
transaction	B-General_Concept
log	I-General_Concept
backups	B-Protocol
are	O
smaller	O
,	O
so	O
they	O
interrupt	O
database	O
activity	O
for	O
shorter	O
periods	O
of	O
time	O
.	O
</s>
<s>
DBMS	O
use	O
statistic	O
histograms	B-Algorithm
to	O
find	O
data	O
in	O
a	O
range	O
against	O
a	O
table	O
or	O
index	O
.	O
</s>
<s>
Accurate	O
and	O
updated	O
statistics	O
allow	O
query	B-Language
engines	O
to	O
make	O
good	O
decisions	O
about	O
execution	B-Language
plans	I-Language
,	O
as	O
well	O
as	O
efficiently	O
locate	O
data	O
.	O
</s>
<s>
Defragmentation	B-Application
of	O
table	O
and	O
index	O
data	O
increases	O
efficiency	O
in	O
accessing	O
data	O
.	O
</s>
<s>
The	O
amount	O
of	O
fragmentation	O
depends	O
on	O
the	O
nature	O
of	O
the	O
data	O
,	O
how	O
it	O
is	O
changed	O
over	O
time	O
,	O
and	O
the	O
amount	O
of	O
free	O
space	O
in	O
database	O
pages	O
to	O
accept	O
inserts	B-Language
of	O
data	O
without	O
creating	O
additional	O
pages	O
.	O
</s>
