Information Technology Reference
In-Depth Information
9.4.1
What is Optimization?
Imagine yourself standing in front of an exquisite buffet with numerous
delicacies. Your goal is to try them all out, but you need to decide in what
order. With the exchanging order and some trade-off, it can guarantee you
achieve your goal with the maximum benei t. In other words, it will
maximize the total enjoyment for your palate. This exchanging order or
trade-off is a successful optimization.
In DSMS, to evaluate a query, there are many plans that can be adopted
to produce the satisfactory answers. From a functional point of view, we
can call these equivalent query plans. But the query processing perfor-
mances vary from one to the other, such as their space cost or the amount
of time that they need to run. What is the query plan solving the problem
with the least time and the least system cost? To i nd out, we have to
depend on optimization [36,38].
In the following query l ow (shown in Figure 9.14), we can see that
optimizations are widely involved in the query l ow processing for
DSMS. Specii cally, a query process in the DSMS can be divided into i ve
steps: Query Parser, Query Optimizer, Code Interpreter, Query Processor , and
Runtime Optimizer .
The
Query Parser checks the validity of the query and then trans-
lates it into an internal presentation, usually a calculus expression
or something equivalent.
Query language (SQL,
Xpath, etc.)
Query
parser
Functions and calculus
Query
optimizer
Algebra
Code
generator
Data unit access
Runtime
optimizer
Query
processor
FIGURE 9.14
Query l ow through a DSMS.
 
 
Search WWH ::




Custom Search