Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2000 FORWISS, 1 MISTRAL Processing Relational Queries Using a Multidimensional Access Method.

Similar presentations


Presentation on theme: "© 2000 FORWISS, 1 MISTRAL Processing Relational Queries Using a Multidimensional Access Method."— Presentation transcript:

1 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 1 MISTRAL Processing Relational Queries Using a Multidimensional Access Method Volker Markl Rudolf Bayer http://mistral.in.tum.de FORWISS (Bayerisches Forschungszentrum für Wissensbasierte Systeme)

2 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 2 Staff Members MISTRAL Project Management Prof. Rudolf Bayer, Ph.D. (FORWISS Knowledge Bases Group Head) Dr. Volker Markl (MISTRAL Project Leader, Deputy Research Group Head) MISTRAL Research Assistants Dipl. Inform. Robert Fenk Dipl. Inform. Roland Pieringer Frank Ramsak, M.Sc. Dipl. Inform. Martin Zirkel MISTRAL Master Students and Interns Ralf Acker, Bulent Altan, Sonja Antunes, Michael Bauer, Sascha Catelin, Naoufel Boulila, Nils Frielinghaus, Sebastian Hick, Stefan Krause, Jörg Lanzinger, Christian Leiter, Yiwen Lue, Stephan Merkel, Nasim Nadjafi, Oliver Nickel, Daniel Ovadya, Markus Pfadenauer, Timka Piric, Sabine Rauschendorfer, Antonius Salim, Maximilian Schramm, Michael Streichsbier, Anton Tichatschek

3 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 3 http://mistral.in.tum.de Range Queries Tetris Algorithm

4 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 4 Overview 1. Concept of the UB-Tree: Z-Regions 2. Insertion 3. Range Query Algorithm 4. Tetris Algorithm 5. Kernel Integration 6. Performance Overview

5 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 5 Relations and MD Space l Decision Support Relation (similar to TPC-D) – Fact(customer, product, time, Sales) Ô defines a three dimensional cube l Point Query – All sales for one customer for one specific product on a certain day l Partial Match Query – All sales for product X l Range Query – All sales for year 1999 for a specific product group for a specific customer group

6 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 6 Design Goals l clustering tuples on disk pages while preserving spatial proximity l efficient incremental organization l logarithmic worst-case guarantees for insertion, deletion and point queries l efficient handling of range queries l good average memory utilization

7 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 7 Z-Ordering 105417162120 327619182322 98131225242928 1110151427263130 3332373649485352 3534393851505554 4140454457566160 4342474659586362 10325476 1 0 4 2 5 3 7 6 (a)(b)

8 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 8 Z-regions/UB-Trees A Z-region [  :  ] is the space covered by an interval on the Z-curve and is defined by two Z-addresses  and . UB-Tree partitioning: [0 : 3],[4 : 20], [21 : 35], [36 : 47], [48 : 63] Z-region [4 : 20] 4 20 point data creating the UB-Tree on the left for a page capacity of 2 points

9 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 9 UB-Tree Insertion 1/2/3/4

10 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 10 UB-Tree Insertion 18/19

11 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 11 Multidimensional Range Query SELECT * FROM table WHERE (A 1 BETWEEN a 1 AND b 1 ) AND (A 2 BETWEEN a 2 AND b 2 ) AND..... (A n BETWEEN a n AND b n )

12 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 12 Theoretical Comparison of the Rangequery Performance ideal case s 1 *s 2 *P multidimensional index s 1  *s 2  *P multiple B-Trees, bitmap indexes s 1 *I 1 +s 2 *I 2 +s 1 *s 2 *T composite key clustering B-Tree s 1 *P

13 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 13 rangeQuery(Tuple ql, Tuple qh ) { Zaddress start = Z( ql ); Zaddress cur = start ; Zaddress end = Z( qh ); Page page = {}; while (1) { cur = getRegionSeparator( cur ); page = getPage( cur ); outputMatchingTuples( page, ql, qh ); if ( cur >= end ) break; cur = getNextZAddress( cur, start, end ); } B * -Tree linear Z-space UB-Tree

14 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 14 rangeQuery(Tuple ql, Tuple qh ) { Zaddress start = Z( ql ); Zaddress cur = start ; Zaddress end = Z( qh ); Page page = {}; while (1) { cur = getRegionSeparator( cur ); page = getPage( cur ); outputMatchingTuples( page, ql, qh ); if ( cur >= end ) break; cur = getNextZAddress( cur, start, end ); } B * -Tree linear Z-space UB-Tree

15 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 15 rangeQuery(Tuple ql, Tuple qh ) { Zaddress start = Z( ql ); Zaddress cur = start ; Zaddress end = Z( qh ); Page page = {}; while (1) { cur = getRegionSeparator( cur ); page = getPage( cur ); outputMatchingTuples( page, ql, qh ); if ( cur >= end ) break; cur = getNextZAddress( cur, start, end ); } B * -Tree linear Z-space UB-Tree

16 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 16 rangeQuery(Tuple ql, Tuple qh ) { Zaddress start = Z( ql ); Zaddress cur = start ; Zaddress end = Z( qh ); Page page = {}; while (1) { cur = getRegionSeparator( cur ); page = getPage( cur ); outputMatchingTuples( page, ql, qh ); if ( cur >= end ) break; cur = getNextZAddress( cur, start, end ); } B * -Tree linear Z-space UB-Tree

17 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 17 rangeQuery(Tuple ql, Tuple qh ) { Zaddress start = Z( ql ); Zaddress cur = start ; Zaddress end = Z( qh ); Page page = {}; while (1) { cur = getRegionSeparator( cur ); page = getPage( cur ); outputMatchingTuples( page, ql, qh ); if ( cur >= end ) break; cur = getNextZAddress( cur, start, end ); } B * -Tree linear Z-space UB-Tree

18 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 18 rangeQuery(Tuple ql, Tuple qh ) { Zaddress start = Z( ql ); Zaddress cur = start ; Zaddress end = Z( qh ); Page page = {}; while (1) { cur = getRegionSeparator( cur ); page = getPage( cur ); outputMatchingTuples( page, ql, qh ); if ( cur >= end ) break; cur = getNextZAddress( cur, start, end ); } B * -Tree linear Z-space UB-Tree

19 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 19 rangeQuery(Tuple ql, Tuple qh ) { Zaddress start = Z( ql ); Zaddress cur = start ; Zaddress end = Z( qh ); Page page = {}; while (1) { cur = getRegionSeparator( cur ); page = getPage( cur ); outputMatchingTuples( page, ql, qh ); if ( cur >= end ) break; cur = getNextZAddress( cur, start, end ); } B * -Tree linear Z-space UB-Tree

20 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 20 rangeQuery(Tuple ql, Tuple qh ) { Zaddress start = Z( ql ); Zaddress cur = start ; Zaddress end = Z( qh ); Page page = {}; while (1) { cur = getRegionSeparator( cur ); page = getPage( cur ); outputMatchingTuples( page, ql, qh ); if ( cur >= end ) break; cur = getNextZAddress( cur, start, end ); } B * -Tree linear Z-space UB-Tree

21 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 21 rangeQuery(Tuple ql, Tuple qh ) { Zaddress start = Z( ql ); Zaddress cur = start ; Zaddress end = Z( qh ); Page page = {}; while (1) { cur = getRegionSeparator( cur ); page = getPage( cur ); outputMatchingTuples( page, ql, qh ); if ( cur >= end ) break; cur = getNextZAddress( cur, start, end ); } B * -Tree linear Z-space UB-Tree

22 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 22 rangeQuery(Tuple ql, Tuple qh ) { Zaddress start = Z( ql ); Zaddress cur = start ; Zaddress end = Z( qh ); Page page = {}; while (1) { cur = getRegionSeparator( cur ); page = getPage( cur ); outputMatchingTuples( page, ql, qh ); if ( cur >= end ) break; cur = getNextZAddress( cur, start, end ); } B * -Tree linear Z-space UB-Tree

23 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 23 rangeQuery(Tuple ql, Tuple qh ) { Zaddress start = Z( ql ); Zaddress cur = start ; Zaddress end = Z( qh ); Page page = {}; while (1) { cur = getRegionSeparator( cur ); page = getPage( cur ); outputMatchingTuples( page, ql, qh ); if ( cur >= end ) break; cur = getNextZAddress( cur, start, end ); } B * -Tree linear Z-space UB-Tree

24 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 24 rangeQuery(Tuple ql, Tuple qh ) { Zaddress start = Z( ql ); Zaddress cur = start ; Zaddress end = Z( qh ); Page page = {}; while (1) { cur = getRegionSeparator( cur ); page = getPage( cur ); outputMatchingTuples( page, ql, qh ); if ( cur >= end ) break; cur = getNextZAddress( cur, start, end ); } B * -Tree linear Z-space UB-Tree

25 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 25 rangeQuery(Tuple ql, Tuple qh ) { Zaddress start = Z( ql ); Zaddress cur = start ; Zaddress end = Z( qh ); Page page = {}; while (1) { cur = getRegionSeparator( cur ); page = getPage( cur ); outputMatchingTuples( page, ql, qh ); if ( cur >= end ) break; cur = getNextZAddress( cur, start, end ); } B * -Tree linear Z-space UB-Tree

26 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 26 rangeQuery(Tuple ql, Tuple qh ) { Zaddress start = Z( ql ); Zaddress cur = start ; Zaddress end = Z( qh ); Page page = {}; while (1) { cur = getRegionSeparator( cur ); page = getPage( cur ); outputMatchingTuples( page, ql, qh ); if ( cur >= end ) break; cur = getNextZAddress( cur, start, end ); } B * -Tree linear Z-space UB-Tree

27 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 27 rangeQuery(Tuple ql, Tuple qh ) { Zaddress start = Z( ql ); Zaddress cur = start ; Zaddress end = Z( qh ); Page page = {}; while (1) { cur = getRegionSeparator( cur ); page = getPage( cur ); outputMatchingTuples( page, ql, qh ); if ( cur >= end ) break; cur = getNextZAddress( cur, start, end ); } B * -Tree linear Z-space UB-Tree

28 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 28 rangeQuery(Tuple ql, Tuple qh ) { Zaddress start = Z( ql ); Zaddress cur = start ; Zaddress end = Z( qh ); Page page = {}; while (1) { cur = getRegionSeparator( cur ); page = getPage( cur ); outputMatchingTuples( page, ql, qh ); if ( cur >= end ) break; cur = getNextZAddress( cur, start, end ); } B * -Tree linear Z-space UB-Tree

29 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 29 rangeQuery(Tuple ql, Tuple qh ) { Zaddress start = Z( ql ); Zaddress cur = start ; Zaddress end = Z( qh ); Page page = {}; while (1) { cur = getRegionSeparator( cur ); page = getPage( cur ); outputMatchingTuples( page, ql, qh ); if ( cur >= end ) break; cur = getNextZAddress( cur, start, end ); } B * -Tree linear Z-space UB-Tree

30 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 30 rangeQuery(Tuple ql, Tuple qh ) { Zaddress start = Z( ql ); Zaddress cur = start ; Zaddress end = Z( qh ); Page page = {}; while (1) { cur = getRegionSeparator( cur ); page = getPage( cur ); outputMatchingTuples( page, ql, qh ); if ( cur >= end ) break; cur = getNextZAddress( cur, start, end ); } B * -Tree linear Z-space UB-Tree

31 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 31 Range Queries and Data Distributions

32 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 32 Growing Databases 1000 tuples 50 000 tuples

33 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 33 Summary UB-Trees ü 50% storage utilization, dynamic updates ü Efficient Z-address calculation (bit-interleaving) ü Logarithmic performance for the basic operations ü Efficient range query algorithm (bit-operations) ü Prototype UB/API above RDBMS (Oracle 8, Informix, DB2 UDB, TransBase, MS SQL 7.0) using ESQL/C ? Patent application

34 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 34 Standard Query Pattern SELECT * FROM table WHERE (A 1 BETWEEN a 1 AND b 1 ) AND (A 2 BETWEEN a 2 AND b 2 ) AND..... (A n BETWEEN a n AND b n ) ORDER BY A i, A j, A k,... (GROUP BY A i, A j, A k,...)

35 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 35 Z-Order/Tetris Order 10325476 1 0 4 2 5 3 7 6 A 2 A 1 0 63 10325476 1 0 4 2 5 3 7 6 A 2 A 1 0 T j (x) = x j ∘ Z(x 1,...,x j-1,x j+1,...,x d ) 1 0 4 2 5 3 7 6 10325476 A 2 A 1

36 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 36 The Tetris Algorithm sort direction

37 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 37 Summary Tetris l Combines sort process and evaluation of multi- attribute restrictions in one processing step l I/O-time linear w.r. to result set size l temporary storage sublinear w.r. to result set size l Sorting no longer a “blocking operation” ? Patent application

38 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 38 Integration Issues l Starting point with TransBase: – clustering B*-Tree – appropriate data type for Z-values: variable bit strings l Modifications to B*-Tree in TransBase: – support for computed keys: »Z-values are only stored in the index, not together with the tuples »tuples are stored in Z-order – generalization of splitting algorithm: »computed page separators for improved space partitioning

39 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 39 l Minor extensions: l Major extensions: l New modules: l NO changes for: – DML – Multi-user support, i.e., locking, logging facilities  handled by underlying B*- Tree

40 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 40 Summary Integration l Integration of the UB-Tree has been achieved within one year l TransBase HyperCube is shipping since Systems 1999 and was awarded the 2001 IT-Prize by EUROCASE and the European Commission l UB-Trees speed up relational DBMS for multidimensional applications like Geo-DB and data warehouse up to two orders of magnitude l Speedup is even more dramatic for CD-ROM databases (archives)

41 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 41 Application Fields of the UB-Tree l Data Warehouses – Measurements with SAP BW Data »UB-Tree/API for Oracle »UB-Tree on top of Oracle outperforms conventional B-Tree and Bitmap indexes in Oracle! – Measurements with the GfK Data Warehouse »UB-Tree in TransBase HyperCube »significant performance increases (Factor of 10) l Geographic Databases l „Multidimensional Problems“ – Archiving Systems, Lifecycle-Management, Data Mining, OLAP, OLTP, etc.

42 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 42 The UB-Tree

43 © 2000 FORWISS, http://mistral.in.tum.de/results/presentations/ppt/ubtree.ppt 43 Further Information Tetris HI MISTRAL UB-Tree Te mp tris http://mistral.in.tum.de mistral@in.tum.de


Download ppt "© 2000 FORWISS, 1 MISTRAL Processing Relational Queries Using a Multidimensional Access Method."

Similar presentations


Ads by Google