How to lay out B-Tree data on disk?

https://web.archive.org/web/20161221112438/http://www.toadworld.com/platforms/oracle/w/wiki/11001.oracle-b-tree-index-from-the-concept-to-internals Notes: Databases do not directly implement indexes based on B-tree but on a variant called B+ tree. Which according to wikipedia: A B+ tree can be viewed as a B-tree in which each node contains only keys (not key-value pairs), and to which an additional level is added at the bottom with linked leaves. … Read more

Advantage of BTREE?

First off, depending on the Storage Engine used, you may just not have a choice (InnoDB for example is exclusively using BTREE for its index). Also, BTREE is the default index type for most storage engines. Now… There are cases, when using alternative index types may result in improved performance. There are (relatively rare case) … Read more

B trees vs binary trees

Algorithmic complexity is the same, since O(logb n) = O(c log n) = O(log n) but the constant factors, which are hidden in big-O notation, could vary noticeably, depending on implementation and hardware. B-trees were designed for platter hard disks, which have a large access time (moving the head into position) after which an entire … Read more

When to choose RB tree, B-Tree or AVL tree?

Take this with a pinch of salt: B-tree when you’re managing more than thousands of items and you’re paging them from a disk or some slow storage medium. RB tree when you’re doing fairly frequent inserts, deletes and retrievals on the tree. AVL tree when your inserts and deletes are infrequent relative to your retrievals.

tech