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.

3.2 Prerequisites for <strong>Cost</strong>-<strong>Based</strong> <strong>Optimization</strong><br />

Table 3.2: Double-Metric <strong>Cost</strong>s <strong>of</strong> Control-Flow-Oriented Operators<br />

Operator Abstract Execution Time W (o i )<br />

Name <strong>Cost</strong>s C(o i )<br />

⎛ ⎛<br />

⎞⎞<br />

Switch |ds in |<br />

n∑<br />

i∑<br />

⎝P (path i ) · ⎝ W ( ) ∑m i<br />

expr pathj + W (o i,k ) ⎠⎠<br />

Fork -<br />

i=1<br />

n<br />

max<br />

i=1<br />

j=1<br />

k=1<br />

⎛<br />

⎞<br />

∑m i<br />

⎝ W (o i,j ) + i · W (Start Thread) ⎠<br />

Iteration - r · ∑n<br />

i=1 W (o i)<br />

Delay - W (o i )<br />

Signal - W (o i )<br />

j=1<br />

Table 3.3: Double-Metric <strong>Cost</strong>s <strong>of</strong> Data-Flow-Oriented Operators<br />

Operator<br />

Name<br />

Abstract <strong>Cost</strong>s C(o i ) Execution Time W (o i )<br />

Assign |ds in | + |ds out | W (o i )<br />

Translation |ds in | + |ds out | W (o i )<br />

Selection |ds in | W (o i )<br />

sorted:|ds in |/2<br />

Projection π distinct : |ds in | · |ds out |/2 W (o i )<br />

π all /sorted : |ds in |<br />

Join ⋊⋉ NL : |ds in1 | + |ds in1 | · |ds in2 | W (o i )<br />

sorted:|ds in1 | + |ds in2 |<br />

Setoperation ∪, \, ∩ : |ds in1 | + |ds in2 | · |ds out |/2 W (o i )<br />

sorted:|ds in1 | + |ds in2 |<br />

∪ all : |ds in1 | + |ds in2 |<br />

Split<br />

|ds in | + ∑ n i<br />

j=1 |ds out j<br />

| W (o i )<br />

Orderby |ds in | · log 2 |ds in | W (o i )<br />

Groupby |ds in | + |ds in | · |ds out |/2 W (o i )<br />

Window |ds in | · |ds out |/2 W (o i )<br />

Validate |ds in | W (o i )<br />

Savepoint |ds in | W (o i )<br />

Action |ds in | + |ds out | W (o i )<br />

do not introduce additional requirements on plan rewriting and they are not applicable<br />

without extensions for persistent messages that do not fit into main memory. Additionally<br />

to the relational operators, the operators Assign and Translation both exhibit abstract<br />

costs <strong>of</strong> |ds in | + |ds out | because they get an input message and transform it to an output<br />

message, where the output can be smaller or larger than the input. Furthermore, the<br />

Split operator decomposes a message into multiple smaller messages. Hence, the sum <strong>of</strong><br />

cardinalities for the input message |ds in | and <strong>of</strong> the set <strong>of</strong> output messages ∑ n i<br />

j=1 |ds out j<br />

|<br />

is a representative indicator. Both the Validate and the Savepoint operator have costs<br />

<strong>of</strong> |ds in | because they do not create any output message. Integrating the Savepoint into<br />

the cost model enables, for example, to include the overhead for recoverability [SWDC10]<br />

41

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

Saved successfully!

Ooh no, something went wrong!