Tree Graph Views

Rules definition for extensible optimization

barre
Introduction - TGV - Rule Patterns - Annotations barre
To optimize the XQuery evaluation, a search-strategy is needed. This strategy relies on rule valuation with an coefficient of improvement []. This coefficient is directed by information such as cost model. We define TGV transformation rules that transforms a given execution plan into an equivalent execution plan (ie. that give the same result when evaluated). Transformation rules can be logical (ie. based on the algebraic properties of the operators), physical (ie. based on the hardware, system and data statistics, formulas ad coefficients) or user-defined (ie. defined arbitrarily by the user or the administrator according to its knowledge of some particular specificities on datas and sources, or expected results).

Rule Definition Language

We define the rules definition language. A rule consists in a rule condition followed by a rule conclusion. Operations applying on the rule condition to result in the rule conclusion is called a rule transformation.

FOR [Variables]
IF [Conditions]
THEN [Modifications]
Table 1: Rule Language
In table 1, we propose a rule definition language which contains three clauses: FOR, IF, THEN. Each one defines a rule property:

Rule Patterns

Like tgv mappings on XML documents with Tree Patterns, we represent rules in intuitive manners in order to build a pattern to map visually on tgv representations. This rule modelling is called Rule Pattern Model (RP Model). The RP Model consists in two patterns: condition pattern and conclusion pattern. Part(s) of the TGV that match the condition pattern must be replaced by the conclusion pattern.
Example
1)A logical Rule Pattern

 
Figure 1 shows a logical rule example: a constraint of one member of a join hyperlink also apply to the other member.

Example
2)A Physical Rule Pattern

 
Figure 2 shows another user-defined rule example: a descendant optional nodelink can be replace by the full path with optional child link.

Example
3)Application of the first transformation (figure 1)

 
Figure 3 illustrates the transformation applied to the TGV on the left sides using the two previous rules. We obtain the TGV on the right side.