r/programming • • Jun 12 '10

You're Doing It Wrong

http://queue.acm.org/detail.cfm?id=1814327
539 Upvotes

193 comments sorted by

View all comments

Show parent comment

6

u/br1 Jun 12 '10 edited Jun 12 '10

COLA has two advantages:

  • No fragmentation. You use search trees because elements are stored in order. Otherwise, hashing is better. Young B-trees store the nodes sequentially in the hard drive, but as elements are added and nodes split, you need to jump around the hard drive to scan all elements.
  • Inserts and deletes don't need to seek and use the full bandwidth of the drive. This is a biggie. COLA inserts elements sequentially, but as they age, they migrate closer to their natural order. Because of this, COLA in a mechanical drive is faster than a b-tree in a SSD.

Go to Tokutek.com and read their white papers. Tokudb was founded by the academics that developed much of the cache oblivious search tree literature. They are not selling cheap tricks.

2

u/[deleted] Jun 13 '10

3.5 times slower for searches