Details
-
Task
-
Status: Stalled (View Workflow)
-
Critical
-
Resolution: Unresolved
-
None
Description
AHI is probably a subject to removal. It's clear that managing a hash table costs some performance but it's not clear where it could be beneficial.
One example of harm was found in https://jira.mariadb.org/browse/MDEV-16796 where TRUNCATE was slowed down.
axel please find cases where AHI improves server speed. Then we can measure whether it's needed at all or not.
Attachments
Issue Links
- relates to
-
MDEV-12121 Introduce build option WITH_INNODB_AHI to disable innodb_adaptive_hash_index
-
- Closed
-
-
MDEV-20487 Set innodb_adaptive_hash_index=OFF by default
-
- Closed
-
-
MDEV-16796 TRUNCATE TABLE slowdown with innodb_file_per_table=ON
-
- Closed
-
The adaptive hash index is disabled for temporary tables in MariaDB Server 10.2+.
Starting with MariaDB Server 10.2, the btr_search_latch has been partitioned into btr_search_latches[] of innodb_adaptive_hash_index_parts (btr_ahi_parts) elements, default 8, ranging from 1 to 512. The adaptive hash index itself is still global; only the latch has been partitioned by essentially index_id (which is still global; in MySQL 5.7, on my suggestion, some previsions were implemented to allow each tablespace to have their own domain of index_id):
UNIV_INLINE
rw_lock_t*
{
ut_ad(index != NULL);
}
So, all requests for a particular index will always use the same btr_search_latches[] element.