1 / 23

XML Labling and Query Optimization

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

violet
Download Presentation

XML Labling and Query Optimization

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XML Labling and Query Optimization Sigmod2009 2009-7-3

  2. Outline • XML DBS related researches in sigmod2009 • DDE labeling Scheme • XQuery Optimization • conclusion

  3. sigmod2009 • Research Session 16: Query Processing on Semi-structured DataCost 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 SchemeLiang 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)

  4. Outline • XML DBS related researches in sigmod2009 • DDE labeling Scheme • XQuery Optimization • conclusion

  5. 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?

  6. 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 Scheme Liang Xu, Tok Wang Ling School of Computing National University of singapore

  7. 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 insertbelow 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

  8. DDE Labeling (3)--example 1 B A 1.1 1.2 1.-1 1.0 D C 1.1.1 1.1.2 1.2.1 1.2.2 1.2.3 H G F E 3.3.5 1.1.1.1 2.2.3 5.4.8 I 3.3.5.1

  9. DDE Labeling (4) • AD relationship A/m is an ancestorofB/n ifm<n and • PC relationship A/m is the parentofB/n if m=n and A/m is an ancestorofB/n • Document order A precedes B if A<ddeB • Sibling relationship A is the sibling of B if

  10. CDDE labeling(1) • Compact DDE • Enhance the performance of DDE for insertion • Relationship between them CDDE label ->DDE label

  11. CDDE labeling(2)—example 1 B A 1.1 1.2 1.-1 1.0 D C 1.1.1 1.1.2 1.2.1 1.2.2 1.2.3 H G F E 3.1.5 1.1.1.1 2.1.3 5.1.8 I K J -1.3.3.5.2 -1.3.3.5.1 -2.3.3.5.3

  12. Outline • XML DBS related researches in sigmod2009 • DDE labeling Scheme • XQuery Optimization • conclusion

  13. 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 XQueries Riham Abdel Kader University of Twente Enschede, The Netherlands

  14. 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

  15. Related notation • CutOff Sampled Operators :return a sample with size l :return partial execution results of the operator OP with size l • Weight of edge • cost(p)=cost(p’)+est*card(source) ÷T • Sf(p)=est/T

  16. 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

  17. Example for Chain Sampling p1 p2 p2 V4 V1 V2 V3 p3 p4 p3 is selected V5 V7 p3 V6 V8 [cost, sf ](p1) = [1500, 1.5] [cost, sf ](p2) = [2000, 1] [cost, sf ](p3) = [1300, 0.1] [cost, sf ](p4) = [3200, 2]

  18. Optimization Algorithm • Reduce the intermediate results • exploring the search space by Chain Sampling • Find the optimal path • interleave optimization and execution steps

  19. 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/@id return $a

  20. Illustration(续) 14 p2 13 11 p2 p2 10 p2 12 p2 9 p2 8 p1 4 p1 7 p1 p1 3 5 p1 6 p1

  21. Outline • XML DBS related researches in sigmod2009 • DDE labeling Scheme • XQuery Optimization • conclusion

  22. conclusion • DDE and CDDE They are tailored for both static and dynamic XML documents. • ROX: Runtime Optimization To reduce the number of intermediate results

  23. Thank you

More Related