Presentation is loading. Please wait.

Presentation is loading. Please wait.

Full Disjunctions: Polynomial-Delay Iterators in Action Sara Cohen Technion Israel Yaron Kanza University of Toronto Canada Benny Kimelfeld Hebrew University.

Similar presentations


Presentation on theme: "Full Disjunctions: Polynomial-Delay Iterators in Action Sara Cohen Technion Israel Yaron Kanza University of Toronto Canada Benny Kimelfeld Hebrew University."— Presentation transcript:

1 Full Disjunctions: Polynomial-Delay Iterators in Action Sara Cohen Technion Israel Yaron Kanza University of Toronto Canada Benny Kimelfeld Hebrew University Israel Yehoshua Sagiv Hebrew University Israel Itzhak Fadida Technion Israel VLDB 2006 Seoul, Korea

2 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Computing Full Disjunctions full disjunction The full disjunction is a relational operator that maximally combines data from several relations –It extends the natural join by allowing incompleteness –It extends the binary outerjoin to many relations This paper presents algorithms and optimizations for computing full disjunctions –Theoretically, full disjunctions are more tractable than previously known –Practically, a significant improvement over the state-of- art, an iterator-like evaluation

3 VLDB 06 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06Contents Full Disjunctions − Complexity Contributions Algorithms − Algorithm NLOJ for Tree-Structured Schemes − Algorithm PDelayFD for General Schemes − Algorithm BiComNLOJ − Main Algorithm Experimental Results Conclusion

4 VLDB 06 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06Contents Full Disjunctions − Complexity Contributions Algorithms − Algorithm NLOJ for Tree-Structured Schemes − Algorithm PDelayFD for General Schemes − Algorithm BiComNLOJ − Main Algorithm Experimental Results Conclusion

5 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 The Natural Join Operator CountryClimateCityHotelStarsSite Climates Accommodations Sites CountryClimate Canadadiverse Bahamastropical UKtemperate Climates CountryCityHotelStars CanadaTorontoPlaza4 CanadaLondonRamada3 BahamasNassauHilton Accommodations CountryCitySite CanadaLondonAir Show CanadaMouth Logan UKLondonBuckingham UKLondonHyde Park Sites CanadadiverseLondonRamada3Air Show

6 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 The Natural Join Misses Information CountryClimate Canadadiverse Bahamastropical UKtemperate CountryCityHotelStars CanadaTorontoPlaza4 CanadaLondonRamada3 BahamasNassauHilton CountryCitySite CanadaLondonAir Show CanadaMouth Logan UKLondonBuckingham UKLondonHyde Park Climates Accommodations Sites CanadadiverseLondonRamada3Air Show Climates Accommodations Sites CountryClimateCityHotelStarsSite Sites Bahamas is not in Sites, so the natural join misses it

7 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 The Natural Join Misses Information CountryClimate Canadadiverse Bahamastropical UKtemperate Climates Accommodations CountryCityHotelStars CanadaTorontoPlaza4 CanadaLondonRamada3 BahamasNassauHilton CountryCitySite CanadaLondonAir Show CanadaMouth Logan UKLondonBuckingham UKLondonHyde Park CountryClimateCityHotelStarsSite Climates Accommodations Sites CanadadiverseLondonRamada3Air Show Sites Bahamas is not in Sites, so the natural join misses it Mouth Logan is not in a city, hence missed Empty space means null value

8 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 The Natural Join Misses Information CountryClimate Canadadiverse Bahamastropical UKtemperate Climates Accommodations CountryCityHotelStars CanadaTorontoPlaza4 CanadaLondonRamada3 BahamasNassauHilton A looser notion of join is needed—one that enables joining tuples from some of the tables CountryCitySite CanadaLondonAir Show CanadaMouth Logan UKLondonBuckingham UKLondonHyde Park CountryClimateCityHotelStarsSite Climates Accommodations Sites CanadadiverseLondonRamada3Air Show Sites Bahamas is not in Sites, so the natural join misses it Mouth Logan is not in a city, hence missed

9 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 The Natural Join Operator CountryClimateCityHotelStarsSite Climates Accommodations Sites CountryClimate Canadadiverse Bahamastropical UKtemperate Climates CountryCityHotelStars CanadaTorontoPlaza4 CanadaLondonRamada3 BahamasNassauHilton Accommodations CountryCitySite CanadaLondonAir Show CanadaMouth Logan UKLondonBuckingham UKLondonHyde Park Sites CanadadiverseLondonRamada3Air Show A tuple of the join corresponds to a set of tuples from the source relations Join consistent Connected No Cartesian productComplete One tuple from each relation Join consistent Connected No Cartesian productComplete One tuple from each relation

10 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Join-Consistent Sets of Tuples A set T of tuples is join-consistent if every two tuples of T are join-consistent Two tuples t 1 and t 2 are join-consistent if for every common attribute A: 1. 1. t 1 [A] and t 2 [A] are non-null 2. 2. t 1 [A] = t 2 [A] CountryCityHotelStars CanadaLondonRamada CountryCitySite CanadaLondonAir Show

11 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Connected Sets of Tuples CountryClimate Canadadiverse CountryCitySite UKLondonBuckingham  The nodes are the tuples of T  An edge between every two tuples with a common attribute The join graph of a set T of tuples: A set of tuples is connected if its join graph is connected CityHotelStars TorontoPlaza4

12 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Natural Join (w/o Cartesian Product) T is join consistent 1. Each tuple of the result corresponds to a set T of tuples from the source relations T is connected No Cartesian product T is connected No Cartesian product2. T is complete One tuple from each relation T is complete One tuple from each relation3. JCC

13 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Full Disjunction (Galindo-Legaria 1994) T is join consistent 1. T is connected No Cartesian product T is connected No Cartesian product2. T is complete One tuple from each relation T is complete One tuple from each relation3. Each tuple of the result corresponds to a set T of tuples from the source relations T is maximal Not properly contained in any JCC set T is maximal Not properly contained in any JCC set3. JCC

14 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 An Example of a Full Disjunction CountryClimate Canadadiverse UKtemperate Climates CountryCityHotelStars CanadaTorontoPlaza4 CanadaLondonRamada3 Accommodations CountryCitySite CanadaLondonAir Show CanadaMouth Logan UKLondonBuckingham Sites CountryClimateCityHotelStarsSite FD ( R ) R

15 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 An Example of a Full Disjunction CountryClimate Canadadiverse UKtemperate Climates CountryCityHotelStars CanadaTorontoPlaza4 CanadaLondonRamada3 Accommodations CountryCitySite CanadaLondonAir Show CanadaMouth Logan UKLondonBuckingham Sites CountryClimateCityHotelStarsSite CanadadiverseTorontoPlaza4 FD ( R ) R

16 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 An Example of a Full Disjunction CountryClimate Canadadiverse UKtemperate Climates CountryCityHotelStars CanadaTorontoPlaza4 CanadaLondonRamada3 Accommodations CountryCitySite CanadaLondonAir Show CanadaMouth Logan UKLondonBuckingham Sites CountryClimateCityHotelStarsSite CanadadiverseTorontoPlaza4 CanadadiverseLondonRamada3Air Show FD ( R ) R

17 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 An Example of a Full Disjunction CountryClimate Canadadiverse UKtemperate Climates CountryCityHotelStars CanadaTorontoPlaza4 CanadaLondonRamada3 Accommodations CountryCitySite CanadaLondonAir Show CanadaMouth Logan UKLondonBuckingham Sites CountryClimateCityHotelStarsSite CanadadiverseTorontoPlaza4 CanadadiverseLondonRamada3Air Show Canadadiverse Mouth Logan FD ( R ) R

18 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 An Example of a Full Disjunction CountryClimate Canadadiverse UKtemperate Climates CountryCityHotelStars CanadaTorontoPlaza4 CanadaLondonRamada3 Accommodations CountryCitySite CanadaLondonAir Show CanadaMouth Logan UKLondonBuckingham Sites CountryClimateCityHotelStarsSite CanadadiverseTorontoPlaza4 CanadadiverseLondonRamada3Air Show Canadadiverse Mouth Logan UKtemperate London Buckingham FD ( R ) R

19 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 An Example of a Full Disjunction CountryClimate Canadadiverse UKtemperate Climates CountryCityHotelStars CanadaTorontoPlaza4 CanadaLondonRamada3 Accommodations CountryCitySite CanadaLondonAir Show CanadaMouth Logan UKLondonBuckingham Sites CountryClimateCityHotelStarsSite CanadadiverseTorontoPlaza4 CanadadiverseLondonRamada3Air Show Canadadiverse Mouth Logan UKtemperate London Buckingham FD ( R ) R

20 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Padding Joined Tuple Sets with Nulls CountryCitySite CanadaMouth Logan CountryClimate Canadadiverse Canadadiverse Mouth Logan CountryClimateCityHotelStarsSite

21 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 The Outerjoin Operator The outerjoin of two relations R 1 and R 2 R 1 R 2 The natural join R 1 R 2 and, in addition, all dangling tuples padded with nulls

22 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Example of an Outerjoin CountryClimate Canadadiverse Bahamastropical UKtemperate Climates CountryCityHotelStars CanadaTorontoPlaza4 FranceParisAtala4 BahamasNassauHilton Accommodations CountryClimateCityHotelStars CanadadiverseTorontoPlaza4 BahamastropicalNassauHilton UKtemperate FranceParisAtala4 Climates Accommodations

23 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Combining Relations using Outerjoins The outerjoin operator is not associative For more than two relations, the result depends on the order in which the outerjoin is applied In general, outerjoins cannot maximally combine relations (no matter what order is used) Outerjoin is not suitable for combining more than two relations!

24 VLDB 06 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06Contents Full Disjunctions − Complexity Contributions Algorithms − Algorithm NLOJ for Tree-Structured Schemes − Algorithm PDelayFD for General Schemes − Algorithm BiComNLOJ − Main Algorithm Experimental Results Conclusion

25 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Efficiency of Evaluation The full-disjunction operator (as well as other operators like the Cartesian product or the natural join) can generate an exponential (in the input size) number of tuples Polynomial running time is not a suitable yardstick The usual notion: Polynomial time in the combined size of the input and the output

26 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 History of Algorithms for Full Disjunctions SourceTimeDatabases RU96 O(n+F2)O(n+F2)  -acyclic KS03 O(n5N2F2)O(n5N2F2) general CS05 O (n 3  N  F 2 ) “ incremental polynomial” general n:N:F:n:N:F: number of relations number of tuples in the DB number of tuples in the FD This paper: linear dependence on F F is typically very large Can be exponential in the size of the database

27 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Polynomial Delay One way to obtain an evaluation with a running time linear in the output is to devise an algorithm that acts as an iterator with an efficient next() operator, that is, An enumeration algorithm that runs with polynomial delay An enumeration algorithm runs with polynomial delay if the time between every two successive answers is polynomial in the size of the input time

28 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Other Benefits of Polynomial Delay Incremental evaluation  First tuples are generated quickly Full disjunctions are large, yet the user need not wait for the whole result to be generated  Suitable for Web applications, where users expect to get the first few pages quickly In addition, the user can decide anytime that enough information has been shown Enable parallel query processing  While one processor generates the FD tuples, other processors apply further processing

29 VLDB 06 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06Contents Full Disjunctions − ComplexityContributions Algorithms − Algorithm NLOJ for Tree-Structured Schemes − Algorithm PDelayFD for General Schemes − Algorithm BiComNLOJ − Main Algorithm Experimental Results Conclusion

30 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Main Contributions 1. polynomial delay 1. First algorithm for computing full disjunctions with polynomial delay 2. linear 2. First algorithm for computing full disjunctions in time linear in the output 3. optimization 3. A general optimization technique for computing full disjunctions Division into biconnected components Substantial improvement over the state-of-art is proved theoretically and experimentally

31 VLDB 06 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06Contents Full Disjunctions − Complexity ContributionsAlgorithms − Algorithm NLOJ for Tree-Structured Schemes − Algorithm PDelayFD for General Schemes − Algorithm BiComNLOJ − Main Algorithm Experimental Results Conclusion

32 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Our Algorithms NLOJ Algorithm NLOJ Tree Schemes NLOJ Algorithm NLOJ Tree Schemes PDelayFD Algorithm PDelayFD General Schemes PDelayFD Algorithm PDelayFD General Schemes Biconnected Components Division into Biconnected Components Optimization Biconnected Components Division into Biconnected Components OptimizationCombine BiComNLOJ Algorithm BiComNLOJ Main Algorithm − General Schemes BiComNLOJ Algorithm BiComNLOJ Main Algorithm − General Schemes

33 VLDB 06 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06Contents Full Disjunctions − Complexity Contributions Algorithms − Algorithm NLOJ for Tree-Structured Schemes − Algorithm PDelayFD for General Schemes − Algorithm BiComNLOJ − Main Algorithm Experimental Results Conclusion

34 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Tree Schemes R1R1 R2R2 R3R3 R4R4 R5R5 R6R6 R7R7 Scheme graphs w/o cycles In the scheme graph, the relation schemes are the nodes and there is an edge between every two schemes with one or more common attributes

35 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Left-Deep Sequence of Outerjoins R R : a set of relations with a tree scheme R 1,…, R n : R 1,…, R n : a connected-prefix order of R Algorithm NLOJ (Nested Loop OuterJoin) 1. 1. Compute a connected-prefix order of R 2. 2. Apply outerjoins in a left-deep order FD ( R ) = ( … ((R 1 R 2 ) R 3 ) … ) R n Proposition:

36 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Connected-Prefix Order of Relations A connected-prefix order of relations: Each prefix forms a (connected) subtree R1R1 R2R2 R3R3 R4R4 R5R5 R6R6 R7R7 R1R1 R3R3 R2R2 R7R7 R4R4 R5R5 R6R6

37 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Achieving Polynomial Delay Algorithm NLOJ (Nested Loop OuterJoin) 1. 1. Compute a connected-prefix order of R 2. 2. Apply outerjoins in a left-deep order R1R1 R2R2 R3R3 R n-1 RnRn … Already exponential size! Problem: Problem: exp. delay Solution: Solution: use iterators

38 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06IteratorsAlgorithm Operate on top of an enumeration algorithm Implement next() by controlling the execution To obtain polynomial delay, we use iterators Iterator next()

39 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Using Iterators for Outerjoins Iterator 1 Iterator n Iterator 2 Iterator n-1 R1R1 R2R2 R3R3 R n-1 RnRn …

40 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Outerjoins are not Always Applicable It is not always possible to formulate a full disjunction as a left-deep sequence of outerjoins Rajaraman and Ullman: Rajaraman and Ullman [PODS 96]: Some full disjunctions cannot be formulated as expressions of outerjoins (i.e., with arbitrary placement of parentheses)

41 VLDB 06 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06Contents Full Disjunctions − Complexity Contributions Algorithms − Algorithm NLOJ for Tree-Structured Schemes − Algorithm PDelayFD forGeneralSchemes − Algorithm PDelayFD for General Schemes − Algorithm BiComNLOJ − Main Algorithm Experimental Results Conclusion

42 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 About the Algorithm Unlike NLOJ, the next algorithm, PDelayFD, is applicable to all schemes (and not just trees) Algorithm PDelayFD has a polynomial delay, but the delay is larger than that of NLOJ Nevertheless, PDelayFD by itself is a significant improvement over the state-of-art

43 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Shifting a Maximal JCC Tuple Set T t-shifting T: t t t t-shift of T 1. 1. Add t to T 2. 2. Extract max. JCC subset containing t 3. 3. Extend to a maximal JCC set T

44 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Validate that the t-shift is not already in Q or C Algorithm PDelayFD 1. 1. Generate a max. JCC set T 0 2. 2. Insert T 0 into Q Repeat until Q is empty: 1. 1. Move some T from Q to C 2. 2. Print the join of T, padded with nulls 3. 3. Insert into Q a t-shift of T for all tuples t in the database Output: … PDelayFD ( R ) computes FD ( R ) with polynomial delayTheorem: C Q

45 VLDB 06 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06Contents Full Disjunctions − Complexity Contributions Algorithms − Algorithm NLOJ for Tree-Structured Schemes − Algorithm PDelayFD for General Schemes − Algorithm BiComNLOJ − Main Algorithm Experimental Results Conclusion

46 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 NLOJ vs. PDelayFD R3R3 R5R5 R2R2 R9R9 R8R8 R7R7 R 10 R4R4 R6R6 R1R1 NLOJNLOJPDelayFDPDelayFD R3R3 R5R5 R2R2 R9R9 R8R8 R7R7 R4R4 R6R6 R1R1 R3R3 R5R5 R2R2 R9R9 R8R8 R7R7 R4R4 R6R6 R1R1 ? divide and conquer Our approach: divide and conquer  Shorter delays  Less space  Simpler to impl.

47 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Biconnected Components R1R1 R2R2 R3R3 R4R4 R7R7 R1R1 R2R2 R4R4 R7R7 R8R8 R9R9 R5R5 R6R6 R3R3 R5R5 R6R6 R8R8 Biconnected component: A maximal subset B of relations, s.t. the scheme graph has two (or more) disjoint paths between every two relations of B

48 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Left-Deep Sequence of Outerjoins R R : a set of relations Theorem: Optimized Algorithm: 1. 1. Compute the biconnected components of R 2. 2. Compute the full disjunction of each component 3. 3. Apply outerjoins in a suitable order There exists an (efficiently computable) order B 1,…, B k of the biconnected components of R, s.t. FD ( R ) = ( … (( FD ( B 1 ) FD ( B 2 )) … ) FD ( B k ) There exists an (efficiently computable) order B 1,…, B k of the biconnected components of R, s.t. FD ( R ) = ( … (( FD ( B 1 ) FD ( B 2 )) … ) FD ( B k )

49 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 BiComNLOJ : a Naïve Attempt 1. 1. Divide R into biconnected components → B 1,… B k in a suitable order 1. 1. Divide R into biconnected components → B 1,… B k in a suitable order 2. 2. Compute FD ( B 1 ),…, FD ( B k ) PDelayFD − using PDelayFD 2. 2. Compute FD ( B 1 ),…, FD ( B k ) PDelayFD − using PDelayFD 3. NLOJ 3. U sing NLOJ, compute ( … (( FD ( B 1 ) FD ( B 2 )) … ) FD ( B k ) 3. NLOJ 3. U sing NLOJ, compute ( … (( FD ( B 1 ) FD ( B 2 )) … ) FD ( B k ) Each FD ( B i ) can be exponential in the input Non-polynomial delay! IteratorIterator Iterator Solution:

50 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 After generating a tuple t of FD ( B 1 ), we need to generate all tuples of FD ( B 2 ) that can join t Non-polynomial delay if all of FD ( B 2 ) is computed for finding these tuples! Solution:Solution: PDelayFD can be modified so that it generates only those tuples of FD ( B 2 ) that can join t Retaining Polynomial Delay: 1 st Problem For simplification, assume only two components R2R2 R3R3 R1R1 R4R4 R6R6 R7R7 R5R5 R8R8 B1B1 B2B2 Details in the proceedings…

51 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 The last step is to generate all tuples of FD ( B 2 ) that cannot be joined with tuples of FD ( B 1 ) However, this task is by itself NP-hard! Solution: When generating all tuples of FD ( B 2 ) that can be joined with some tuple of FD ( B 1 ), we collect enough information for generating the remaining tuples of FD ( B 2 ) Retaining Polynomial Delay: 2 nd Problem For simplification, assume only two components Details in the proceedings… R2R2 R3R3 R1R1 R4R4 R6R6 R7R7 R5R5 R8R8 B1B1 B2B2

52 VLDB 06 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06Contents Full Disjunctions − Complexity Contributions Algorithms − Algorithm NLOJ for Tree-Structured Schemes − Algorithm PDelayFD for General Schemes − Algorithm BiComNLOJ − Main Algorithm Experimental Results Conclusion

53 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Experimental Setting Algorithms: PDelayFD, BiComNLOJ (main) IncrementalFD (CS05, state-of-art) PosgreSQL PosgreSQL (open source) HW: HW: Pentium4, 1.6GHZ, 512MB RAM Implementation R3R3 R1R1 R5R5 R2R2 R4R4 R6R6 R9R9 R8R8 R7R7 R 10 Scheme S 1 R3R3 R1R1 R7R7 R5R5 R8R8 R2R2 R4R4 R6R6 R 10 R9R9 Scheme S 2 R2R2 R5R5 R1R1 R4R4 R9R9 R 10 R8R8 R7R7 R6R6 R3R3 Scheme S 3 Synthetic data (randomly generated) Fixed schemes

54 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Number of Tuples in each Relation Average Delay (msec) State-of-Art vs. Main Algorithm IncrementalFD (state of art, CS05)BiComNJOJ our main algorithm BiComNLOJ BiComNLOJ is a substantial improvement over the state-of-art 1 Scheme 1 2 Scheme 2 3 Scheme 3

55 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Number of Tuples in each Relation Average Delay (msec) Division into Biconnected Components Division reduces delays (amount depends on the scheme) Division reduces delays (amount depends on the scheme) PDelayFD (no division to b.c.c.)BiComNJOJ our main algorithm 1 Scheme 1 2 Scheme 2 3 Scheme 3

56 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Behavior of Delay IncrementalFD (state of art, CS05)BiComNJOJ our main algorithm Tuple Number Delay (msec) Measure the delay before each generated tuple While IncrementalFD has a slowdown, the delay of BiComNLOJ remains almost constant

57 VLDB 06 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06Contents Full Disjunctions − Complexity Contributions Algorithms − Algorithm NLOJ for Tree-Structured Schemes − Algorithm PDelayFD for General Schemes − Algorithm BiComNLOJ − Main Algorithm Experimental ResultsConclusion

58 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06Summary Full Disjunction: An associative extension of the outerjoin operator to an arbitrary number of relations 3 Algorithms for computing FD: NLOJ Nested-Loop Outerjoin Tree-Structured SchemesNLOJ Nested-Loop Outerjoin Tree-Structured Schemes PDelayFD Polynomial-Delay Full Disjunction General SchemesPDelayFD Polynomial-Delay Full Disjunction General Schemes BiComNLOJ Combine first 2, deploy div. into biconnected components General SchemesBiComNLOJ Combine first 2, deploy div. into biconnected components General Schemes

59 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06Contributions improvement of evaluation time Substantial improvement of evaluation time over the state-of-art  Proved theoretically and experimentally polynomial delaylinear Full disjunctions can be computed with polynomial delay and in time linear in the output size Optimization Optimization techniques for computing FDs PostgreSQL Implementation within PostgreSQL (ongoing…) SQL optimizer Incorporating our algorithms into an SQL optimizer  E.g., some operators can be pushed through the FD  Not discussed here, appears in the proceedings…

60 VLDB 06 Full Disjunctions: Polynomial-Delay Iterators in Action VLDB 06 Thank you. Questions?


Download ppt "Full Disjunctions: Polynomial-Delay Iterators in Action Sara Cohen Technion Israel Yaron Kanza University of Toronto Canada Benny Kimelfeld Hebrew University."

Similar presentations


Ads by Google