MySql adaptive hash index

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.