In each segment, different column values belongingtothesamerecord are identified by SK
1.7 Join Indices
Used to reconstruct a table from its projections.For example:Procection2 -> Projcection1
join_index
1.8 RS and WS
1.8.1 encoding schemes
Self-order, few distinct values(or with most of the same values)
代码语言:javascript
复制
1,1,1,1,3,3,3,3,3,3,3,5,5,5
(v, f, n) -> v:the column where first appears, f: the position in the column, n: the number of times v appears
(1, 1, 4), (3, 5, 7),(5, 12, 3)
Foreign-order, few distinct values(or with most of the same values)
代码语言:javascript
复制
0,0,1,1,2,1,0,2,1
(v, b) -> v: value, b: bitset for this value
(0, 110000100), (1, 001101001), and (2,000010010)
Self-order, many distinct values
代码语言:javascript
复制
1,4,7,7,8,12
(1,3,3,0,1,4)
The idea for this scheme is to represent every value in the column as a delta from the previous value in the column
Foreign-order, few distinct values
leave it unencoded
1.8.2 WS
The difference being columns are not encoded since it is assumed that WS is trivial in size as compared to RS.
Sid and SK identify the same tuple in RS and WS.
Every column represented as (v, sk) and a B-tree is built for sk.
Sort key s represented as (s, sk)
1.9 Storage Management
storage allocator:It will dynamically adjust the partition of the Segment, or apply for the Segment.The corresponding WS and the Join Indexes related to the RS also need to be adjusted accordingly.