MySql adaptive hash index
I. Introduction
Hash is a fast query method. Generally, the time complexity of the query is O (1 ). It is often used for join operations, such as hash connections between SQL Server and Oracle.
Join (hash join ). However, common databases such as SQL Server and Oracle do not support hash indexes ). The default index type of the MySQL Heap storage engine is hash,
The InnoDB storage engine proposes another implementation method, adaptive hash index (adaptive hash index ).
The InnoDB storage engine monitors the query of table indexes. if we observe that the speed of hash index creation can be improved, we will create a hash index, which is called adaptive.
The adaptive hash index is constructed through the B + tree of the buffer pool, so it is quickly created. The InnoDB storage engine does not need to create hash indexes for the entire table.
And mode to create a hash index for some pages.
II. Example
3. Restrictions
1. it can only be used for equivalent comparison, such as =, <=>, in
2. unable to be used for sorting
3. Possible conflicts
4. Mysql is automatically managed and cannot be intervened manually.