1 / 8

A Logical Framework for XQuery Optimization

A Logical Framework for XQuery Optimization. Alin Deutsch Yannis Papakonstantinou Yu Xu University of California, San Diego. Groupby Normal Form Tree Patterns (GNFTPs). Tree patterns have been used to describe XPath and navigation and resolve logical optimization problems

diep
Télécharger la présentation

A Logical Framework for XQuery 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. A Logical Framework for XQuery Optimization Alin Deutsch Yannis Papakonstantinou Yu Xu University of California, San Diego

  2. Groupby Normal Form Tree Patterns (GNFTPs) • Tree patterns have been used to describe XPath and navigation and resolve logical optimization problems • Extend into GNFTP to capture • nested queries • mixed set, bag (and list) semantics • Normalization reduces multiple XQuery syntactic features into GNFTP

  3. Reducing XQuery into Navigate, GroupBy, Construct FOR $authorINdistinct($doc/book/author) RETURN <authors_works> { $author, FOR $book IN $doc/book WHERE SOME $a IN $book/author SATISFIES $a = $author RETURN … FOR $author IN $doc/book/author GROUPBY $author // group by value RETURN <authors_works> { $author, FOR $book IN $doc/book $a IN $book/author WHERE $a = $author GROUPBY [$book] // group by identity + no $a RETURN $book } </authors_work>

  4. Tree Pattern Representation X1 X2 $doc N1(X1; ;$author; f1($author, N2)) book $b1 book $book N2(X2; $book; ; f2($book)) author $author author $a f1($author, N2) = <authors_works> { $author, N2 } </author_works> f2($book) = $book

  5. Minimization of Redundant Navigation: Collapse & Test $author [$book] $author [$book] X1 X2 X1 X2 $doc $doc book $b1 book $book book $book author $author author $a author $author

  6. Minimization of Redundant Navigation: Collapse & Test $author $author X1 X1 $doc $doc Ul book $b1 book $book ? lU author $author author $author

  7. Minimization of Redundant Navigation: Collapse & Test [$book] [$book] X1 X2 X1 X2 $doc $doc Ul book $b1 book $book book $book ? lU author $author author $a author $author

  8. Results • We find the unique minimal equivalent of a GNFTP • Introducing id-based equalities is essential • Removal-based techniques lead to multiple “minima” • NP-complete, polynomial for acyclic tree patterns • Efficient in practice • Normalizer rewrites XQuery with no set equality condition or group-by set into GNFTP • extGNFTP = GNFTP + blackbox functions and blackbox predicates, which are not minimized http://www.db.ucsd.edu/people/alin/papers/next.pdf

More Related