1 / 25

Optimizing Multidimensional Index Trees for Main Memory Access

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. Outline. 1. Abstraction 2. Introduction 3. Motivation 4. MBR Compression 5. CR-tree 6. Analysis 7. Conclusion.

Télécharger la présentation

Optimizing Multidimensional Index Trees for Main Memory Access

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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 • 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, Nnode access-> # of node access Tindex search= c · Nnode access· (Ckey compare+ Ccache miss+ CTLB miss/ c) Index search time mostly depends on c · Nnode ccess

  11. Motivation (Cont’d) 3. Problem Formulation (reduce index search time) How to minimize c · Nnode access- ?? • Change node size c · Nnode 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. Entry of R4 Entry of R1 Entry of R5 Entry of R2 Entry of R3 MBR of R3 MBR of R0 R5 R4 CR-tree Operations-Search Node of R0 level Node of R3 level {(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. R5 R4 R6 CR-tree Operations-Insertion Node of R3 level Entry of R4 Entry of R5 Entry of R6 MBR of R3 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

More Related