xml labling and query optimization

Post on 31-Jan-2016

49 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

XML Labling and Query Optimization. Sigmod2009 2009-7-3. Outline. XML DBS related researches in sigmod2009 DDE labeling Scheme XQuery Optimization conclusion. sigmod2009. - PowerPoint PPT Presentation

TRANSCRIPT

XML Labling and Query Optimization

Sigmod2009 2009-7-3

Outline

XML DBS related researches in sigmod2009 DDE labeling Scheme XQuery Optimization conclusion

sigmod2009 Research Session 16: Query Processing on Semi-structured Data

Cost Based Plan Selection for XPathHaris Georgiadis (Athens University of Economics and Business)Minas Charalambides (Athens University of Economics and Business)Vasilis Vassalos (Athens University of Economics and Business)ROX: Run-time Optimization of XQueriesRiham Abdel Kader (University of Twente)Peter Boncz (CWI)Stefan Manegold (CWI)Maurice Van Keulen (University of Twente)

Research Session 19: Semi-structured Data Management DDE: From Dewey to a Fully Dynamic XML Labeling Scheme

Liang Xu (National University of Singapore)Tok Wang Ling (National University of Singapore)Huayu Wu (National University of Singapore)Zhifeng Bao (National University of Singapore)Simplifying XML Schema: Effortless Handling of Nondeterministic Regular ExpressionsGeert Jan Bex (Hasselt University and Transnational University of Limburg)Wouter Gelade (Hasselt University and Transnational University of Limburg)Wim Martens (Technical University of Dortmund)Frank Neven (Hasselt University and Transnational University of Limburg)FlexRecs: Expressing and Combining Flexible RecommendationsGeorgia Koutrika (Stanford University)Benjamin Bercovitz (Stanford University)Hector Garcia-Molina (Stanford University)

Outline

XML DBS related researches in sigmod2009 DDE labeling Scheme XQuery Optimization conclusion

Dewey labeling Concatenation of its parent

labeling and local order helpful for Keyword search High cost of relabeling for

dynamic XML document

Is there a labeling scheme which not only has compact size and high query performance but also completely avoids relabeling?

DDE Labeling (1) Character

Can completely avoid relabeling Efficiently support query Not add the length of labeling Only the definition of “preorder”

Preorder

labels A :a1.a2 … am and B : b1.b2 ...bn

A≤dde B if

DDE: From Dewey to a Fully Dynamic XML Labeling SchemeLiang Xu, Tok Wang Ling School of Computing National University of singapore

DDE Labeling (2) Leftmost insertion insert before node A : a1.a2 … an (A is the first child ) a1.a2

… (an-1) ->this node. Rightmost insertion insert after node A : a1.a2 … an (A is the last child ) a1.a2 … (an + 1) -> this node. Insertion below a leaf node insert below a leaf node A :a1.a2 … an a1.a2 … an .1 -> this node. Insertion between two consecutive siblings insert between A and B A+B->this node

DDE Labeling (3)--example

AB

C D

H G FE

1

1.-1

1.1 1.2

1.0

1.1.1

1.1.2 1.2.1 1.2.2 1.2.3

I

3.3.5

3.3.5.1

5.4.82.2.31.1.1.1

DDE Labeling (4) AD relationship A/m is an ancestor of B/n if m<n and

PC relationship A/m is the parent of B/n if m=n and A/m is an ancestor of B/n

Document order A precedes B if A<ddeB

Sibling relationship A is the sibling of B if

CDDE labeling(1) Compact DDE Enhance the performance of DDE for insertion Relationship between them

CDDE label ->DDE label

CDDE labeling(2)—example

AB

C D

H G FE

1

1.-1

1.1 1.2

1.0

1.1.1

1.1.2 1.2.1 1.2.2 1.2.3

I

3.1.5

-1.3.3.5.1

5.1.82.1.31.1.1.1

K J

-2.3.3.5.3 -1.3.3.5.2

Outline

XML DBS related researches in sigmod2009 DDE labeling Scheme XQuery Optimization conclusion

Optimization of XQueries Take Join Graph as input and care the

correlations Interleave optimization and execution steps Use sample to estimate the cost Use index to get sample Use Chain Sampling to get optimal path

ROX: Runtime Optimization of XQueriesRiham Abdel Kader University of Twente Enschede, The Netherlands

Join Graphs

let $r := doc(“auction.xml”)

for $a in $r//open auction[./r

eserve]/bidder//personref,

$b in $r//person[.//education]

where $a/@person = $b/@id

return $a

Related notation CutOff Sampled Operators :return a sample with size l :return partial execution results of the operator OP with s

ize l Weight of edge

cost(p)=cost(p’)+est*card(source) ÷T Sf(p)=est/T

Chain Sampling Chain Sampling makes ROX avoid local

minimum due to correlations only explore those paths that branch from the

edge with the smallest weight Find the optimal path pi

Example for Chain Sampling

[cost, sf ](p1) = [1500, 1.5][cost, sf ](p2) = [2000, 1][cost, sf ](p3) = [1300, 0.1][cost, sf ](p4) = [3200, 2]

V2 V3

V5

V1 V4

V7

V6 V8

p1 p2

p3

p2

p3

p4p3 is selected

Optimization Algorithm

Reduce the intermediate results exploring the search space by Chain Sampling Find the optimal path interleave optimization and execution steps

Illustration let $d := doc(“xmark.xml”)for $o in $d//open auction[.//current/text() < 145],$p in $d//person[.//province],$i in $d//item[./quantity = 1]where $o//bidder//personref/@person = $p/@id and $o//itemref/@item = $c/@idreturn $a

Illustration(续 )

p1

p1

p1

p1p1

p1

p2

p2p2

p2p2

p2

8

7

6

54

3

9

1011

1213

14

Outline

XML DBS related researches in sigmod2009 DDE labeling Scheme XQuery Optimization conclusion

conclusion

DDE and CDDE

They are tailored for both static and dynamic XML documents.

ROX: Runtime Optimization

To reduce the number of intermediate results

top related