1 / 29

A study of Index Structures for Main Memory Database Systems. -T. Lehman, M. Carey VLDB (1986)

A study of Index Structures for Main Memory Database Systems. -T. Lehman, M. Carey VLDB (1986) Making B+ Trees Cache Conscious in Main Memory. - J.Rao , K. Ross ACM SIGMOD (2000) Main Memory Index Structures with Fixed Size Partial Keys.

lucine
Download Presentation

A study of Index Structures for Main Memory Database Systems. -T. Lehman, M. Carey VLDB (1986)

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. A study of Index Structures for Main Memory Database Systems. -T. Lehman, M. Carey VLDB (1986) Making B+ Trees Cache Conscious in Main Memory. - J.Rao, K. Ross ACM SIGMOD (2000) Main Memory Index Structures with Fixed Size Partial Keys. - P. Bohannon, P. McIlroy, R. Rastogi. ACM SIGMOD (2001) Main Memory Index Structures Presented By Ajit Padukone

  2. Main Memory Index Structures Outline • Motivation • B+Trees / B-Trees • Lehman/Carey • AVL Tree • Hashing – Chained, Extendible, Linear • T-Trees

  3. Main Memory Index Structures Outline • Rao / Ross • Cache Sensitive B+ Trees • Bohannon et. Al • Partial size key B-Trees

  4. Main Memory Index Structures Motivation Main Memory DBMS predicted in early 1980s. Feasible due to growth of memory chip densities and speed as well as decrease of prices. The entire database is stored in main memory. B-Trees / B+Trees – focused on Disk storage. Need for Index Structures to be optimized for main memory.

  5. Main Memory Index Structures Optimizations Efficient use of CPU/Memory. No disk accesses to minimize. Primary goal – minimize computation time. Could save pointers to tuples instead of data values in the data nodes.

  6. B-Trees /B+Trees (Disk) Reduces number of Random Disk Accesses Used by most DBMS. Size of Nodes are adjusted according to Block/ Segment Size of Physical memory device.(Typical sizes 512 / 2048 / 4096 / 8192 Bytes) Always balanced. Main Memory Index Structures

  7. B-Trees / B+Trees Structure Main Memory Index Structures Source: http://paprika.umw.edu/~ernie/cpsc321/10312006.html

  8. AVL Trees Binary Tree search – very fast. Updates may cause rotations to keep tree balanced. Poor Space Utilization. Main Memory Index Structures

  9. AVL Trees Main Memory Index Structures Source: A study of Index Structures for Main Memory Database Systems. T. Lehman, M. Carey VLDB (1986)

  10. B-Trees B-Tree is preferred over B+Trees as no advantage in keeping data in the leaves. Good Storage utilization. Quick Searching Fast updating. Main Memory Index Structures

  11. Main Memory Index Structures B-Trees Source: A study of Index Structures for Main Memory Database Systems. T. Lehman, M. Carey VLDB (1986)

  12. Main Memory Index Structures Hashing – Linear • Dynamic Sized Hash table. • Node splits linearly based on criteria (not just overflow) unlike Extendible Hashing. • Controlled Splitting provides advantages.

  13. Main Memory Index Structures Hashing – Linear Source: A study of Index Structures for Main Memory Database Systems. T. Lehman, M. Carey VLDB (1986)

  14. Main Memory Index Structures T-Tree • Derived from AVL Trees/B Trees. • Retains binary search nature of AVL Tree, good update and storage characteristics of B Tree. Source: A study of Index Structures for Main Memory Database Systems. T. Lehman, M. Carey VLDB (1986)

  15. Main Memory Index Structures T-Tree Terminology • Internal Nodes • Half leaf Nodes • Leaf Nodes • Greatest Lower • Bound • Least Upper Bound Source: A study of Index Structures for Main Memory Database Systems. T. Lehman, M. Carey VLDB (1986)

  16. Main Memory Index Structures T-Tree Algorithms • Search • Insert • Delete • Rebalance. – similar • to AVL Trees Source: A study of Index Structures for Main Memory Database Systems. T. Lehman, M. Carey VLDB (1986)

  17. Main Memory Index Structures T-Tree Algorithms • Search • Insert • Delete • Rebalance. – similar • to AVL Trees Source: A study of Index Structures for Main Memory Database Systems. T. Lehman, M. Carey VLDB (1986)

  18. Main Memory Index Structures Performance Comparison • Insert Source: A study of Index Structures for Main Memory Database Systems. T. Lehman, M. Carey VLDB (1986)

  19. Main Memory Index Structures Performance Comparison • Search Source: A study of Index Structures for Main Memory Database Systems. T. Lehman, M. Carey VLDB (1986)

  20. Main Memory Index Structures Performance Comparison • Mixed Queries Source: A study of Index Structures for Main Memory Database Systems. T. Lehman, M. Carey VLDB (1986)

  21. Main Memory Index Structures Performance Comparison • Mixed Queries Source: A study of Index Structures for Main Memory Database Systems. T. Lehman, M. Carey VLDB (1986)

  22. Main Memory Index Structures Cache Sensitive B+ Trees • Rao and Ross in 2000. • CPU performance far out-scales Main memory performance.T-Trees do not perform too much better. • Need to optimize for Cache-sensitivity. Fit Node to Cache-line to minimize cache misses. • B+Trees with less pointers and more data in the node. • CSB Trees have poor performance with too many node splits. So node-groups are “segmented”.

  23. Main Memory Index Structures Cache Sensitive B+ Trees Source: Making B+ Trees Cache Conscious in Main Memory.J.Rao, K. Ross ACM SIGMOD (2000)

  24. Main Memory Index Structures Performance Comparison • Segmented • CSB Trees (CSS) Source: Making B+ Trees Cache Conscious in Main Memory.J.Rao, K. Ross ACM SIGMOD (2000)

  25. Main Memory Index Structures Partial Key B-Trees • Bohannon et al. in 2001. • Improve over CSS B-Trees. • Speedup Key Comparisons by storing partial keys instead of complete keys • Ensure Node size is still sensitive to cache line. • Important Insight: Keys found are most similar to previously compared key or next compared key.

  26. Main Memory Index Structures Partial Key B-Trees • Save • first bit position where the keys differ. • Save ‘l’ bits from the above position. (configurable)

  27. Main Memory Index Structures Partial Key B-Trees • Key Comparison Technique Source :Main Memory Index Structures with Fixed Size Partial Keys. P. Bohannon, P. McIlroy, R. Rastogi. ACM SIGMOD (2001)

  28. Main Memory Index Structures Partial Key Trees Performance Source :Main Memory Index Structures with Fixed Size Partial Keys. P. Bohannon, P. McIlroy, R. Rastogi. ACM SIGMOD (2001)

  29. Main Memory Index Structures Questions?

More Related