Home / Companies / PlanetScale / Blog / Post Details
Content Deep Dive

B-trees and database indexes

Blog post from PlanetScale

Post Details
Company
Date Published
Author
Benjamin Dicken
Word Count
3,031
Language
English
Hacker News Points
351
Summary

This article discusses B-trees and their use in database management systems (DBMSs). It explains how B-trees work, why databases use them for indexes, and the impact of primary key choice on index performance. The article also introduces a variant of B-trees called B+trees, which are commonly used in MySQL indexes. It highlights the benefits of using sequential keys as opposed to random or UUID keys for better query performance. Additionally, it touches upon the buffer pool feature in InnoDB that helps improve query performance by caching frequently accessed pages in memory.