23
6/21/01 1 How range queries work The UB-Tree ' 1999 FORWISS FORWISS FORWISS ' 1999 FORWISS FORWISS FORWISS 2 rangeQuery(Tuple ql, Tuple qh) { Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1) { cur = getRegionSeparator(cur); page = getPage(cur); outputMatchingTuples(page, ql, qh); if ( cur >= end ) break; cur = getNextUbvalue(cur, start, end); } } B-Tree ubvalues UB-Tree Code The range query algorithm for UB-Trees ubvalues

FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

1

How range queries work

The UB-Tree

© 1999 FORWISS

FORWISSFORWISS

© 1999 FORWISS

FORWISSFORWISS

2

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

Page 2: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

2

© 1999 FORWISS

FORWISSFORWISSFORWISS

3

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

© 1999 FORWISS

FORWISSFORWISS

4

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

Page 3: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

3

© 1999 FORWISS

FORWISSFORWISS

5

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

© 1999 FORWISS

FORWISS

6

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

Page 4: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

4

© 1999 FORWISS 7

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

© 1999 FORWISS 8

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

Page 5: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

5

© 1999 FORWISS 9

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

© 1999 FORWISS 10

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

Page 6: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

6

© 1999 FORWISS

FORWISS

11

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

© 1999 FORWISS 12

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

Page 7: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

7

© 1999 FORWISS 13

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

© 1999 FORWISS 14

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

Page 8: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

8

© 1999 FORWISS 15

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

© 1999 FORWISS 16

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

Page 9: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

9

© 1999 FORWISS 17

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

© 1999 FORWISS

FORWISSFORWISS

18

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

Page 10: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

10

© 1999 FORWISS

FORWISSFORWISS

19

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

© 1999 FORWISS

FORWISSFORWISS

20

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

Page 11: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

11

© 1999 FORWISS

FORWISSFORWISS

21

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

© 1999 FORWISS

FORWISSFORWISS

22

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

Page 12: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

12

© 1999 FORWISS

FORWISSFORWISS

23

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

© 1999 FORWISS

FORWISSFORWISS

24

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

Page 13: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

13

© 1999 FORWISS

FORWISSFORWISS

25

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

© 1999 FORWISS

FORWISSFORWISS

26

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

Page 14: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

14

© 1999 FORWISS

FORWISSFORWISS

27

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

© 1999 FORWISS

FORWISSFORWISS

28

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

Page 15: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

15

© 1999 FORWISS

FORWISSFORWISS

29

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

© 1999 FORWISS

FORWISSFORWISS

30

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

Page 16: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

16

© 1999 FORWISS

FORWISSFORWISS

31

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

© 1999 FORWISS

FORWISSFORWISS

32

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

Page 17: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

17

© 1999 FORWISS

FORWISSFORWISS

33

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

© 1999 FORWISS

FORWISSFORWISS

34

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

Page 18: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

18

© 1999 FORWISS

FORWISSFORWISS

35

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

© 1999 FORWISS

FORWISSFORWISS

36

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

Page 19: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

19

© 1999 FORWISS

FORWISSFORWISS

37

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

© 1999 FORWISS

FORWISSFORWISS

38

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

ubvalues

Page 20: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

20

© 1999 FORWISS

FORWISSFORWISS

39

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

© 1999 FORWISS

FORWISSFORWISS

40

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

Page 21: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

21

© 1999 FORWISS

FORWISSFORWISS

41

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

© 1999 FORWISS

FORWISSFORWISS

42

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

Page 22: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

22

© 1999 FORWISS

FORWISSFORWISS

43

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

© 1999 FORWISS

FORWISSFORWISS

44

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees

Page 23: FORWISS The UB-Tree · 6/21/01 4 ' 1999 FORWISS 7 rangeQuery(Tuple ql, Tuple qh) Ubvalue start = UBKEY(ql); Ubvalue cur = start; Ubvalue end = UBKEY(qh); Page page = {}; while (1)

6/21/01

23

© 1999 FORWISS

FORWISSFORWISS

45

rangeQuery(Tuple ql, Tuple qh) {

Ubvalue start = UBKEY(ql);Ubvalue cur = start;Ubvalue end = UBKEY(qh);Page page = {};

while (1) {

cur = getRegionSeparator(cur);page = getPage(cur);outputMatchingTuples(page, ql, qh); if ( cur >= end ) break;cur = getNextUbvalue(cur, start, end);

}}

B-Tree

ubvalues

UB-TreeCode

The range query algorithm for UB-Trees