25.01.2015 Views

Cost-Based Optimization of Integration Flows - Datenbanken ...

Cost-Based Optimization of Integration Flows - Datenbanken ...

Cost-Based Optimization of Integration Flows - Datenbanken ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.2 Adaptive Query Processing<br />

Adaptive Query Processing<br />

System<br />

Aspect<br />

Plan-<strong>Based</strong><br />

Adaptation<br />

<strong>Integration</strong>-Flow<br />

Adaptation<br />

Continuous-Query<br />

Adaptation<br />

Tuple<br />

Routing<br />

Inter-<br />

Query<br />

Late<br />

Binding<br />

Inter-<br />

Operator<br />

Intra-<br />

Operator<br />

Inter-<br />

Instance<br />

Intra-<br />

Operator<br />

Time<br />

Aspect<br />

Proactive Reactive Proactive Reactive<br />

synchronous<br />

asynchronous<br />

Figure 2.7: Classification <strong>of</strong> Adaptive Query Processing<br />

natural blocking operators such as Sort and Group By in order to evaluate statistics and<br />

to re-optimize the remaining query plan during runtime. Third, inter-operator adaptation<br />

can re-optimize a plan at any possible point between operators by inserting artificial<br />

materialization points (Checkpoint operators). Fourth, the fine-grained intra-operator<br />

adaptation allows for re-optimization during the runtime <strong>of</strong> a single operator by data<br />

partitioning across concurrent subplans (and thus, concurrent instances <strong>of</strong> an operator).<br />

From a time perspective, we additionally use the notation <strong>of</strong> reactive (react to suboptimalities)<br />

and proactive (create switchable plans before execution) re-optimization [BBD05a].<br />

Furthermore, we distinguish between synchronous and asynchronous re-optimization. For<br />

synchronous re-optimization (late-binding and inter-operator), execution is blocked because<br />

the current execution process requires the optimization result (in terms <strong>of</strong> the optimal<br />

remaining subplan), while for asynchronous optimization (intra-operator), execution<br />

is not blocked and plans are exchanged or merged at the next possible point.<br />

Putting it all together, in the context <strong>of</strong> plan-based adaptation in DBMS, there exist<br />

approaches for inter-query optimization, late-binding, inter-operator and intra-operator reoptimization.<br />

Here, only intra-operator re-optimization can be executed asynchronously,<br />

while all other approaches require synchronous re-optimization because the remaining plan<br />

is optimized. Furthermore, the integration flow adaptation is classified as inter-instance<br />

adaptation, which is similar to inter-query adaptation. In the opposite, continuous query<br />

adaptation refers to intra-operator adaptation because theoretically, an infinite stream<br />

<strong>of</strong> tuples is processed (and thus, we cannot block execution until all tuples are read by<br />

any operator). Finally, the tuple routing strategies, as an alternative for continuous query<br />

adaptation, represent by themselves the most fine-grained time scheme for re-optimization,<br />

where the optimization decisions in the sense <strong>of</strong> routing paths over operators can be made<br />

for each individual tuple. In the following, we use this general classification to put existing<br />

techniques into the context <strong>of</strong> adaptive query processing.<br />

2.2.2 Plan-<strong>Based</strong> Adaptation<br />

For reactive, inter-operator re-optimization, the traditional optimizer is used to create a<br />

plan. During execution, intermediate results are materialized, and if estimation errors are<br />

detected, the current plan is re-optimized. In ReOpt [KD98], the optimizer is invoked<br />

if statistics differ significantly, regardless <strong>of</strong> whether or not this will produce another<br />

19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!