<s>
Query	B-Language
optimization	I-Language
is	O
a	O
feature	B-Architecture
of	O
many	O
relational	B-Application
database	I-Application
management	I-Application
systems	I-Application
and	O
other	O
databases	B-Application
such	O
as	O
NoSQL	B-General_Concept
and	O
graph	B-Application
databases	I-Application
.	O
</s>
<s>
The	O
query	B-Language
optimizer	I-Language
attempts	O
to	O
determine	O
the	O
most	O
efficient	O
way	O
to	O
execute	O
a	O
given	O
query	B-Language
by	O
considering	O
the	O
possible	O
query	B-Language
plans	I-Language
.	O
</s>
<s>
Generally	O
,	O
the	O
query	B-Language
optimizer	I-Language
cannot	O
be	O
accessed	O
directly	O
by	O
users	O
:	O
once	O
queries	B-Language
are	O
submitted	O
to	O
the	O
database	O
server	O
,	O
and	O
parsed	O
by	O
the	O
parser	O
,	O
they	O
are	O
then	O
passed	O
to	O
the	O
query	B-Language
optimizer	I-Language
where	O
optimization	O
occurs	O
.	O
</s>
<s>
However	O
,	O
some	O
database	O
engines	O
allow	O
guiding	O
the	O
query	B-Language
optimizer	I-Language
with	O
hints	O
.	O
</s>
<s>
A	O
query	B-Language
is	O
a	O
request	O
for	O
information	O
from	O
a	O
database	O
.	O
</s>
<s>
The	O
result	O
of	O
a	O
query	B-Language
is	O
generated	O
by	O
processing	O
the	O
rows	O
in	O
a	O
database	O
in	O
a	O
way	O
that	O
yields	O
the	O
requested	O
information	O
.	O
</s>
<s>
Since	O
database	O
structures	O
are	O
complex	O
,	O
in	O
most	O
cases	O
,	O
and	O
especially	O
for	O
not-very-simple	O
queries	B-Language
,	O
the	O
needed	O
data	O
for	O
a	O
query	B-Language
can	O
be	O
collected	O
from	O
a	O
database	O
by	O
accessing	O
it	O
in	O
different	O
ways	O
,	O
through	O
different	O
data-structures	O
,	O
and	O
in	O
different	O
orders	O
.	O
</s>
<s>
Processing	O
times	O
of	O
the	O
same	O
query	B-Language
may	O
have	O
large	O
variance	O
,	O
from	O
a	O
fraction	O
of	O
a	O
second	O
to	O
hours	O
,	O
depending	O
on	O
the	O
chosen	O
method	O
.	O
</s>
<s>
The	O
purpose	O
of	O
query	B-Language
optimization	I-Language
,	O
which	O
is	O
an	O
automated	O
process	O
,	O
is	O
to	O
find	O
the	O
way	O
to	O
process	O
a	O
given	O
query	B-Language
in	O
minimum	O
time	O
.	O
</s>
<s>
The	O
large	O
possible	O
variance	O
in	O
time	O
justifies	O
performing	O
query	B-Language
optimization	I-Language
,	O
though	O
finding	O
the	O
exact	O
optimal	O
query	B-Language
plan	I-Language
,	O
among	O
all	O
possibilities	O
,	O
is	O
typically	O
very	O
complex	O
,	O
time-consuming	O
by	O
itself	O
,	O
may	O
be	O
too	O
costly	O
,	O
and	O
often	O
practically	O
impossible	O
.	O
</s>
<s>
Thus	O
query	B-Language
optimization	I-Language
typically	O
tries	O
to	O
approximate	O
the	O
optimum	O
by	O
comparing	O
several	O
common-sense	O
alternatives	O
to	O
provide	O
in	O
a	O
reasonable	O
time	O
a	O
"	O
good	O
enough	O
"	O
plan	O
which	O
typically	O
does	O
not	O
deviate	O
much	O
from	O
the	O
best	O
possible	O
result	O
.	O
</s>
<s>
There	O
is	O
a	O
trade-off	O
between	O
the	O
amount	O
of	O
time	O
spent	O
figuring	O
out	O
the	O
best	O
query	B-Language
plan	I-Language
and	O
the	O
quality	O
of	O
the	O
choice	O
;	O
the	O
optimizer	O
may	O
not	O
choose	O
the	O
best	O
answer	O
on	O
its	O
own	O
.	O
</s>
<s>
Different	O
qualities	O
of	O
database	B-Application
management	I-Application
systems	I-Application
have	O
different	O
ways	O
of	O
balancing	O
these	O
two	O
.	O
</s>
<s>
Cost-based	B-Language
query	I-Language
optimizers	I-Language
evaluate	O
the	O
resource	O
footprint	O
of	O
various	O
query	B-Language
plans	I-Language
and	O
use	O
this	O
as	O
the	O
basis	O
for	O
plan	O
selection	O
.	O
</s>
<s>
These	O
assign	O
an	O
estimated	O
"	O
cost	O
"	O
to	O
each	O
possible	O
query	B-Language
plan	I-Language
,	O
and	O
choose	O
the	O
plan	O
with	O
the	O
smallest	O
cost	O
.	O
</s>
<s>
Costs	O
are	O
used	O
to	O
estimate	O
the	O
runtime	O
cost	O
of	O
evaluating	O
the	O
query	B-Language
,	O
in	O
terms	O
of	O
the	O
number	O
of	O
I/O	O
operations	O
required	O
,	O
CPU	B-General_Concept
path	I-General_Concept
length	I-General_Concept
,	O
amount	O
of	O
disk	O
buffer	O
space	O
,	O
disk	O
storage	O
service	O
time	O
,	O
and	O
interconnect	O
usage	O
between	O
units	O
of	O
parallelism	O
,	O
and	O
other	O
factors	O
determined	O
from	O
the	O
data	B-Application
dictionary	I-Application
.	O
</s>
<s>
The	O
set	O
of	O
query	B-Language
plans	I-Language
examined	O
is	O
formed	O
by	O
examining	O
the	O
possible	O
access	O
paths	O
(	O
e.g.	O
,	O
primary	O
index	B-Data_Structure
access	O
,	O
secondary	O
index	B-Data_Structure
access	O
,	O
full	O
file	O
scan	O
)	O
and	O
various	O
relational	O
table	B-Language
join	I-Language
techniques	O
(	O
e.g.	O
,	O
merge	B-Algorithm
join	I-Algorithm
,	O
hash	B-Algorithm
join	I-Algorithm
,	O
product	O
join	B-Language
)	O
.	O
</s>
<s>
The	O
search	O
space	O
can	O
become	O
quite	O
large	O
depending	O
on	O
the	O
complexity	O
of	O
the	O
SQL	B-Language
query	B-Language
.	O
</s>
<s>
These	O
consist	O
of	O
logical	O
optimization	O
—	O
which	O
generates	O
a	O
sequence	O
of	O
relational	B-Algorithm
algebra	I-Algorithm
to	O
solve	O
the	O
query	B-Language
—	O
and	O
physical	O
optimization	O
—	O
which	O
is	O
used	O
to	O
determine	O
the	O
means	O
of	O
carrying	O
out	O
each	O
operation	O
.	O
</s>
<s>
Most	O
query	B-Language
optimizers	I-Language
represent	O
query	B-Language
plans	I-Language
as	O
a	O
tree	B-Application
of	O
"	O
plan	O
nodes	O
"	O
.	O
</s>
<s>
A	O
plan	O
node	O
encapsulates	O
a	O
single	O
operation	O
that	O
is	O
required	O
to	O
execute	O
the	O
query	B-Language
.	O
</s>
<s>
The	O
nodes	O
are	O
arranged	O
as	O
a	O
tree	B-Application
,	O
in	O
which	O
intermediate	O
results	O
flow	O
from	O
the	O
bottom	O
of	O
the	O
tree	B-Application
to	O
the	O
top	O
.	O
</s>
<s>
Each	O
node	O
has	O
zero	O
or	O
more	O
child	O
nodes	O
—	O
those	O
are	O
nodes	O
whose	O
output	O
is	O
fed	O
as	O
input	O
to	O
the	O
parent	B-Application
node	I-Application
.	O
</s>
<s>
For	O
example	O
,	O
a	O
join	B-Language
node	O
will	O
have	O
two	O
child	O
nodes	O
,	O
which	O
represent	O
the	O
two	O
join	B-Language
operands	O
,	O
whereas	O
a	O
sort	O
node	O
would	O
have	O
a	O
single	O
child	O
node	O
(	O
the	O
input	O
to	O
be	O
sorted	O
)	O
.	O
</s>
<s>
The	O
leaves	O
of	O
the	O
tree	B-Application
are	O
nodes	O
which	O
produce	O
results	O
by	O
scanning	O
the	O
disk	O
,	O
for	O
example	O
by	O
performing	O
an	O
index	B-Data_Structure
scan	O
or	O
a	O
sequential	O
scan	O
.	O
</s>
<s>
The	O
performance	O
of	O
a	O
query	B-Language
plan	I-Language
is	O
determined	O
largely	O
by	O
the	O
order	O
in	O
which	O
the	O
tables	O
are	O
joined	O
.	O
</s>
<s>
For	O
example	O
,	O
when	O
joining	O
3	O
tables	O
A	O
,	O
B	O
,	O
C	O
of	O
size	O
10	O
rows	O
,	O
10,000	O
rows	O
,	O
and	O
1,000,000	O
rows	O
,	O
respectively	O
,	O
a	O
query	B-Language
plan	I-Language
that	O
joins	O
B	O
and	O
C	O
first	O
can	O
take	O
several	O
orders-of-magnitude	O
more	O
time	O
to	O
execute	O
than	O
one	O
that	O
joins	O
A	O
and	O
C	O
first	O
.	O
</s>
<s>
Most	O
query	B-Language
optimizers	I-Language
determine	O
join	B-Language
order	O
via	O
a	O
dynamic	B-Algorithm
programming	I-Algorithm
algorithm	O
pioneered	O
by	O
IBM	O
's	O
System	B-Application
R	I-Application
database	O
project	O
.	O
</s>
<s>
First	O
,	O
all	O
ways	O
to	O
access	O
each	O
relation	B-Architecture
in	O
the	O
query	B-Language
are	O
computed	O
.	O
</s>
<s>
Every	O
relation	B-Architecture
in	O
the	O
query	B-Language
can	O
be	O
accessed	O
via	O
a	O
sequential	O
scan	O
.	O
</s>
<s>
If	O
there	O
is	O
an	O
index	B-Data_Structure
on	O
a	O
relation	B-Architecture
that	O
can	O
be	O
used	O
to	O
answer	O
a	O
predicate	B-Algorithm
in	O
the	O
query	B-Language
,	O
an	O
index	B-Data_Structure
scan	O
can	O
also	O
be	O
used	O
.	O
</s>
<s>
For	O
each	O
relation	B-Architecture
,	O
the	O
optimizer	O
records	O
the	O
cheapest	O
way	O
to	O
scan	O
the	O
relation	B-Architecture
,	O
as	O
well	O
as	O
the	O
cheapest	O
way	O
to	O
scan	O
the	O
relation	B-Architecture
that	O
produces	O
records	O
in	O
a	O
particular	O
sorted	O
order	O
.	O
</s>
<s>
The	O
optimizer	O
then	O
considers	O
combining	O
each	O
pair	O
of	O
relations	O
for	O
which	O
a	O
join	B-Language
condition	O
exists	O
.	O
</s>
<s>
For	O
each	O
pair	O
,	O
the	O
optimizer	O
will	O
consider	O
the	O
available	O
join	B-Language
algorithms	O
implemented	O
by	O
the	O
DBMS	B-Application
.	O
</s>
<s>
It	O
will	O
preserve	O
the	O
cheapest	O
way	O
to	O
join	B-Language
each	O
pair	O
of	O
relations	O
,	O
in	O
addition	O
to	O
the	O
cheapest	O
way	O
to	O
join	B-Language
each	O
pair	O
of	O
relations	O
that	O
produces	O
its	O
output	O
according	O
to	O
a	O
particular	O
sort	O
order	O
.	O
</s>
<s>
Then	O
all	O
three-relation	O
query	B-Language
plans	I-Language
are	O
computed	O
,	O
by	O
joining	O
each	O
two-relation	O
plan	O
produced	O
by	O
the	O
previous	O
phase	O
with	O
the	O
remaining	O
relations	O
in	O
the	O
query	B-Language
.	O
</s>
<s>
Sort	O
order	O
can	O
avoid	O
a	O
redundant	O
sort	O
operation	O
later	O
on	O
in	O
processing	O
the	O
query	B-Language
.	O
</s>
<s>
Second	O
,	O
a	O
particular	O
sort	O
order	O
can	O
speed	O
up	O
a	O
subsequent	O
join	B-Language
because	O
it	O
clusters	O
the	O
data	O
in	O
a	O
particular	O
way	O
.	O
</s>
<s>
A	O
SQL	B-Language
query	B-Language
to	O
a	O
modern	O
relational	O
DBMS	B-Application
does	O
more	O
than	O
just	O
selections	O
and	O
joins	O
.	O
</s>
<s>
In	O
particular	O
,	O
SQL	B-Language
queries	B-Language
often	O
nest	O
several	O
layers	O
of	O
SPJ	O
blocks	O
(	O
Select-Project-Join	O
)	O
,	O
by	O
means	O
of	O
group	B-Language
by	I-Language
,	O
exists	O
,	O
and	O
not	O
exists	O
operators	O
.	O
</s>
<s>
In	O
some	O
cases	O
such	O
nested	O
SQL	B-Language
queries	B-Language
can	O
be	O
flattened	O
into	O
a	O
select-project-join	O
query	B-Language
,	O
but	O
not	O
always	O
.	O
</s>
<s>
Query	B-Language
plans	I-Language
for	O
nested	O
SQL	B-Language
queries	B-Language
can	O
also	O
be	O
chosen	O
using	O
the	O
same	O
dynamic	B-Algorithm
programming	I-Algorithm
algorithm	O
as	O
used	O
for	O
join	B-Language
ordering	O
,	O
but	O
this	O
can	O
lead	O
to	O
an	O
enormous	O
escalation	O
in	O
query	B-Language
optimization	I-Language
time	O
.	O
</s>
<s>
So	O
some	O
database	B-Application
management	I-Application
systems	I-Application
use	O
an	O
alternative	O
rule-based	O
approach	O
that	O
uses	O
a	O
query	B-Language
graph	O
model	O
.	O
</s>
<s>
One	O
of	O
the	O
hardest	O
problems	O
in	O
query	B-Language
optimization	I-Language
is	O
to	O
accurately	O
estimate	O
the	O
costs	O
of	O
alternative	O
query	B-Language
plans	I-Language
.	O
</s>
<s>
Optimizers	O
cost	O
query	B-Language
plans	I-Language
using	O
a	O
mathematical	O
model	O
of	O
query	B-Language
execution	O
costs	O
that	O
relies	O
heavily	O
on	O
estimates	O
of	O
the	O
cardinality	B-Application
,	O
or	O
number	O
of	O
tuples	O
,	O
flowing	O
through	O
each	O
edge	O
in	O
a	O
query	B-Language
plan	I-Language
.	O
</s>
<s>
Cardinality	B-Application
estimation	O
in	O
turn	O
depends	O
on	O
estimates	O
of	O
the	O
selection	B-Algorithm
factor	I-Algorithm
of	O
predicates	B-Algorithm
in	O
the	O
query	B-Language
.	O
</s>
<s>
Traditionally	O
,	O
database	B-Application
systems	I-Application
estimate	O
selectivities	O
through	O
fairly	O
detailed	O
statistics	O
on	O
the	O
distribution	O
of	O
values	O
in	O
each	O
column	O
,	O
such	O
as	O
histograms	B-Algorithm
.	O
</s>
<s>
This	O
technique	O
works	O
well	O
for	O
estimation	O
of	O
selectivities	O
of	O
individual	O
predicates	B-Algorithm
.	O
</s>
<s>
However	O
many	O
queries	B-Language
have	O
conjunctions	O
of	O
predicates	B-Algorithm
such	O
as	O
.	O
</s>
<s>
Query	B-Language
predicates	B-Algorithm
are	O
often	O
highly	O
correlated	O
(	O
for	O
example	O
,	O
model='Accord'	O
implies	O
make='Honda'	O
)	O
,	O
and	O
it	O
is	O
very	O
hard	O
to	O
estimate	O
the	O
selectivity	O
of	O
the	O
conjunct	O
in	O
general	O
.	O
</s>
<s>
Poor	O
cardinality	B-Application
estimates	O
and	O
uncaught	O
correlation	O
are	O
one	O
of	O
the	O
main	O
reasons	O
why	O
query	B-Language
optimizers	I-Language
pick	O
poor	O
query	B-Language
plans	I-Language
.	O
</s>
<s>
This	O
is	O
one	O
reason	O
why	O
a	O
database	B-General_Concept
administrator	I-General_Concept
should	O
regularly	O
update	O
the	O
database	O
statistics	O
,	O
especially	O
after	O
major	O
data	O
loads/unloads	O
.	O
</s>
<s>
Classical	O
query	B-Language
optimization	I-Language
assumes	O
that	O
query	B-Language
plans	I-Language
are	O
compared	O
according	O
to	O
one	O
single	O
cost	O
metric	O
,	O
usually	O
execution	O
time	O
,	O
and	O
that	O
the	O
cost	O
of	O
each	O
query	B-Language
plan	I-Language
can	O
be	O
calculated	O
without	O
uncertainty	O
.	O
</s>
<s>
Both	O
assumptions	O
are	O
sometimes	O
violated	O
in	O
practice	O
and	O
multiple	O
extensions	O
of	O
classical	O
query	B-Language
optimization	I-Language
have	O
been	O
studied	O
in	O
the	O
research	O
literature	O
that	O
overcome	O
those	O
limitations	O
.	O
</s>
<s>
Those	O
extended	O
problem	O
variants	O
differ	O
in	O
how	O
they	O
model	O
the	O
cost	O
of	O
single	O
query	B-Language
plans	I-Language
and	O
in	O
terms	O
of	O
their	O
optimization	O
goal	O
.	O
</s>
<s>
Classical	O
query	B-Language
optimization	I-Language
associates	O
each	O
query	B-Language
plan	I-Language
with	O
one	O
scalar	O
cost	O
value	O
.	O
</s>
<s>
Parametric	O
query	B-Language
optimization	I-Language
assumes	O
that	O
query	B-Language
plan	I-Language
cost	O
depends	O
on	O
parameters	O
whose	O
values	O
are	O
unknown	O
at	O
optimization	O
time	O
.	O
</s>
<s>
Such	O
parameters	O
can	O
for	O
instance	O
represent	O
the	O
selectivity	O
of	O
query	B-Language
predicates	B-Algorithm
that	O
are	O
not	O
fully	O
specified	O
at	O
optimization	O
time	O
but	O
will	O
be	O
provided	O
at	O
execution	O
time	O
.	O
</s>
<s>
Parametric	O
query	B-Language
optimization	I-Language
therefore	O
associates	O
each	O
query	B-Language
plan	I-Language
with	O
a	O
cost	O
function	O
that	O
maps	O
from	O
a	O
multi-dimensional	O
parameter	O
space	O
to	O
a	O
one-dimensional	O
cost	O
space	O
.	O
</s>
<s>
The	O
goal	O
of	O
optimization	O
is	O
usually	O
to	O
generate	O
all	O
query	B-Language
plans	I-Language
that	O
could	O
be	O
optimal	O
for	O
any	O
of	O
the	O
possible	O
parameter	O
value	O
combinations	O
.	O
</s>
<s>
This	O
yields	O
a	O
set	O
of	O
relevant	O
query	B-Language
plans	I-Language
.	O
</s>
<s>
The	O
advantage	O
of	O
parametric	O
query	B-Language
optimization	I-Language
is	O
that	O
optimization	O
(	O
which	O
is	O
in	O
general	O
a	O
very	O
expensive	O
operation	O
)	O
is	O
avoided	O
at	O
run	O
time	O
.	O
</s>
<s>
There	O
are	O
often	O
other	O
cost	O
metrics	O
in	O
addition	O
to	O
execution	O
time	O
that	O
are	O
relevant	O
to	O
compare	O
query	B-Language
plans	I-Language
.	O
</s>
<s>
In	O
a	O
cloud	B-Architecture
computing	I-Architecture
scenario	O
for	O
instance	O
,	O
one	O
should	O
compare	O
query	B-Language
plans	I-Language
not	O
only	O
in	O
terms	O
of	O
how	O
much	O
time	O
they	O
take	O
to	O
execute	O
but	O
also	O
in	O
terms	O
of	O
how	O
much	O
money	O
their	O
execution	O
costs	O
.	O
</s>
<s>
Or	O
in	O
the	O
context	O
of	O
approximate	O
query	B-Language
optimization	I-Language
,	O
it	O
is	O
possible	O
to	O
execute	O
query	B-Language
plans	I-Language
on	O
randomly	O
selected	O
samples	O
of	O
the	O
input	O
data	O
in	O
order	O
to	O
obtain	O
approximate	O
results	O
with	O
reduced	O
execution	O
overhead	O
.	O
</s>
<s>
In	O
such	O
cases	O
,	O
alternative	O
query	B-Language
plans	I-Language
must	O
be	O
compared	O
in	O
terms	O
of	O
their	O
execution	O
time	O
but	O
also	O
in	O
terms	O
of	O
the	O
precision	O
or	O
reliability	O
of	O
the	O
data	O
they	O
generate	O
.	O
</s>
<s>
Multi-objective	O
query	B-Language
optimization	I-Language
models	O
the	O
cost	O
of	O
a	O
query	B-Language
plan	I-Language
as	O
a	O
cost	O
vector	O
where	O
each	O
vector	O
component	O
represents	O
cost	O
according	O
to	O
a	O
different	O
cost	O
metric	O
.	O
</s>
<s>
Classical	O
query	B-Language
optimization	I-Language
can	O
be	O
considered	O
as	O
a	O
special	O
case	O
of	O
multi-objective	O
query	B-Language
optimization	I-Language
where	O
the	O
dimension	O
of	O
the	O
cost	O
space	O
(	O
i.e.	O
,	O
the	O
number	O
of	O
cost	O
vector	O
components	O
)	O
is	O
one	O
.	O
</s>
<s>
Different	O
cost	O
metrics	O
might	O
conflict	O
with	O
each	O
other	O
(	O
e.g.	O
,	O
there	O
might	O
be	O
one	O
plan	O
with	O
minimal	O
execution	O
time	O
and	O
a	O
different	O
plan	O
with	O
minimal	O
monetary	O
execution	O
fees	O
in	O
a	O
cloud	B-Architecture
computing	I-Architecture
scenario	O
)	O
.	O
</s>
<s>
Therefore	O
,	O
the	O
goal	O
of	O
optimization	O
cannot	O
be	O
to	O
find	O
a	O
query	B-Language
plan	I-Language
that	O
minimizes	O
all	O
cost	O
metrics	O
but	O
must	O
be	O
to	O
find	O
a	O
query	B-Language
plan	I-Language
that	O
realizes	O
the	O
best	O
compromise	O
between	O
different	O
cost	O
metrics	O
.	O
</s>
<s>
The	O
goal	O
of	O
optimization	O
is	O
therefore	O
either	O
to	O
find	O
the	O
best	O
query	B-Language
plan	I-Language
based	O
on	O
some	O
specification	O
of	O
user	O
preferences	O
provided	O
as	O
input	O
to	O
the	O
optimizer	O
(	O
e.g.	O
,	O
users	O
can	O
define	O
weights	O
between	O
different	O
cost	O
metrics	O
to	O
express	O
relative	O
importance	O
or	O
define	O
hard	O
cost	O
bounds	O
on	O
certain	O
metrics	O
)	O
or	O
to	O
generate	O
an	O
approximation	O
of	O
the	O
set	O
of	O
Pareto-optimal	O
query	B-Language
plans	I-Language
(	O
i.e.	O
,	O
plans	O
such	O
that	O
no	O
other	O
plan	O
has	O
better	O
cost	O
according	O
to	O
all	O
metrics	O
)	O
such	O
that	O
the	O
user	O
can	O
select	O
the	O
preferred	O
cost	O
tradeoff	O
out	O
of	O
that	O
plan	O
set	O
.	O
</s>
<s>
Multi-objective	O
parametric	O
query	B-Language
optimization	I-Language
generalizes	O
parametric	O
and	O
multi-objective	O
query	B-Language
optimization	I-Language
.	O
</s>
<s>
The	O
cost	O
of	O
a	O
query	B-Language
plan	I-Language
is	O
therefore	O
modeled	O
as	O
a	O
function	O
from	O
a	O
multi-dimensional	O
parameter	O
space	O
to	O
a	O
multi-dimensional	O
cost	O
space	O
.	O
</s>
<s>
The	O
goal	O
of	O
optimization	O
is	O
to	O
generate	O
the	O
set	O
of	O
query	B-Language
plans	I-Language
that	O
can	O
be	O
optimal	O
for	O
each	O
possible	O
combination	O
of	O
parameter	O
values	O
and	O
user	O
preferences	O
.	O
</s>
<s>
A	O
number	O
of	O
tools	O
display	O
query	B-Language
execution	I-Language
plans	I-Language
to	O
show	O
which	O
operations	O
have	O
the	O
highest	O
processing	O
cost	O
.	O
</s>
<s>
See	O
Sargable	B-Application
.	O
</s>
