PlanetScale

The MySQL adaptive hash index

Apr 24, 2024Ben Dicken
The MySQL adaptive hash index
SummaryAI, from the source post

This post details the MySQL Adaptive Hash Index (AHI), an in-memory optimization that accelerates B-tree index lookups by creating hash tables for frequently accessed index values. It explains the underlying B-tree structure, the InnoDB buffer pool, and how AHI acts as a layer between MySQL execution and the buffer pool. The post demonstrates AHI's performance benefits through a benchmark, showing a ~16% speedup in query execution time by enabling the `innodb_adaptive_hash_index` option. It also highlights that AHI's effectiveness is dependent on a sufficiently large buffer pool and adaptive usage by MySQL.

More from the Database Benchmarking Best Practices trail