forwiss the ub-tree · 6/21/01 4 ' 1999 forwiss 7 rangequery(tuple ql, tuple qh) ubvalue start...
TRANSCRIPT
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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