The MySQL adaptive hash index
Apr 24, 2024Ben Dicken

Summary
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.