The MySQL adaptive hash index
The MySQL Adaptive Hash Index (AHI) is an optimization technique that improves the performance of B-tree lookups in relational databases, particularly when using the InnoDB storage engine. ABI works by creating a hash table in memory for frequently accessed values or value prefixes from a B-tree index, allowing faster direct lookups compared to traversing the B-tree structure. The ABI adapts its usage based on workload characteristics and can be enabled or disabled via configuration settings. In testing scenarios with large datasets and different query patterns, the ABI has shown performance improvements ranging from 16% to 20%.
Company
PlanetScale
Date published
April 24, 2024
Author(s)
Benjamin Dicken
Word count
2240
Language
English
Hacker News points
None found.