Presentation is loading. Please wait.

Presentation is loading. Please wait.

Optimizing Multidimensional Index Trees for Main Memory Access Author: Kihong Kim, Sang K. Cha, Keunjoo Kwon Members: Iris Zhang, Grace Yung, Kara Kwon,

Similar presentations


Presentation on theme: "Optimizing Multidimensional Index Trees for Main Memory Access Author: Kihong Kim, Sang K. Cha, Keunjoo Kwon Members: Iris Zhang, Grace Yung, Kara Kwon,"— Presentation transcript:

1 Optimizing Multidimensional Index Trees for Main Memory Access Author: Kihong Kim, Sang K. Cha, Keunjoo Kwon Members: Iris Zhang, Grace Yung, Kara Kwon, Jessica Wong

2 Outline 1. Abstraction 2. Introduction 3. Motivation 4. MBR Compression 5. CR-tree 6. Analysis 7. Conclusion

3 Abstraction CR-tree –Cash Conscious version of the R-tree Compress MBR key –Remove reading and trailing less significant bits CR-tree becomes wider and smaller –Faster searching, less memory consuming than ordinary R-tree

4 Introduction DB tables and indexes in Main Memory How to search faster in R-tree ??? – MBR key compression

5 Motivation 1.Memory Hierarchy -> Reduce Cache miss !!!

6 Motivation (Cont’d) 2. Basic Idea - Compression scheme

7 Motivation (Cont’d) 2. Basic Idea (Cont’d) Quantize into 16 levels or 4 bits by cutting off trailing insignificant bits the Result MBR -> QRMBR CR- tree use QRMBR as index key

8 Motivation (Cont’d) 2. Basic Idea (Cont’d) Power of Quantize Original coordinates (43166,27102),(43178,27190) After Quantize =>(8,11),(14,15) 8bytes of entry size become 2bytes =>each node can pack 4 times more entry!!!

9 Motivation (Cont’d) 2. Basic Idea (Cont’d) -Structure of CR-tree node

10 Motivation (Cont’d) 3. Problem Formulation (reduce index search time) c->node size, N node access -> # of node access T index search = c · N node access · (C key compare + C cache miss + C TLB miss / c) Index search time mostly depends on c · N node ccess

11 Motivation (Cont’d) 3. Problem Formulation (reduce index search time) How to minimize c · N node access - ?? Change node size c · N node access - become minimal Packing more entries into a fixed-size node Clustering index entries

12 MBR Compression Two Desirable properties of MBR Compression Overlap Check without Decompression Simplicity

13 RMBR ( Relative Representation of MBR) -Represent the coordinates of an MBR relatively to the left corner of its parents MBR -Cut off leading non-discriminating bits -Can save only 32 bits per MBR

14 QRMBR (Quantized Relative Representation of MBR) Cannot obtain a sufficient compression ratio form the RMBR Cut off trailing insignificant bits form an RMBR There’s overhead but it’s paid off by the significant savings in cache misses

15 QRMBR (Cont’d) Correctness If two MBRs overlap, the resulting QRMBR must overlap also Two non-overlapping MBRs may overlap

16 CR-tree Operations-Search Query rectangle need to change to QRMBR using MBR of each node as the reference MBR Compare Query QRMBR and object QRMBR whether they overlap

17 CR-tree Operations-Search MBR of R3 Entry of R4 Entry of R5 MBR of R0 Entry of R1 Entry of R2 Entry of R3 Node of R0 level Node of R3 level R4 R5 {(43166,27102),(43178,27112)}

18 CR-tree Operations-Insertion Choosing child node that needs the least enlargement to enclose the object MBR In Internal node, Object MBR is first transformed into the QRMBR using the reference MBR Enlargement calculated between a pair of QRMBR In leaf node, node MBR is first adjusted such that it encloses the object MBR Index entry for the object is created in the node QRMBR in the node are recalculated because their reference MBR has changed

19 CR-tree Operations-Insertion R4 R5 R6 MBR of R3 Entry of R4 Entry of R6 Node of R3 level Entry of R5 1.Change!!!2. Insert !!! 3. Recalculate QRMBR

20 CR-tree Operations- Insertion(Cont’d) Algorithm SplitNode.. Algorithm AdjustTree. Ascend from a leaf node L up to the root, adjusting MBRs of nodes and propagating node splits as necessary. When a node MBR has been adjusted, recalculate the QRMBRs in the node.

21 CR-tree Operations-Deletion Algorithm Delete. Remove index record E from a CR-tree Algorithm Condense Tree. -Eliminate the node if it has too few entries and relocate its entries. -Adjust all MBRs, making them smaller if possible. -Recalculate the QRMBR in the node.

22 CR-tree Operations-Bulkload Similar with other R-tree variants

23 Conclusion How to optimize cache behavior of indexes in main memory DB environment? QRMBR – Pack more entries in the node CR-tree based on QRMBR increases the fanout of the R-tree and decreases the index size for cache behavior 2.5 times search faster and 60% less memory use than R-tree

24 References Jun Rao, Kenneth A. Ross: Making B+-Trees Cache Conscious in Main Memory, ACM SIGMOD 2000 Shimin Chen, Phillip B. Gibbons, Todd C. Mowry, Gary Valentin: Fractal Prefetching B+trees: Optimizing Both Cache and Disk Performance. ACM SIGMOD 2002 Kihong Kim, Sang K. Cha, Keunjoo Kwon: Optimizing Multidimensional Index Trees for Main Memory Access. ACM SIGMOD 2001

25 Q&A


Download ppt "Optimizing Multidimensional Index Trees for Main Memory Access Author: Kihong Kim, Sang K. Cha, Keunjoo Kwon Members: Iris Zhang, Grace Yung, Kara Kwon,"

Similar presentations


Ads by Google