Design and use of MySQL index

Source: Internet
Author: User
Tags mysql index

I. Overview of the Index

The tables for the MyISAM and InnoDB storage engines are created by default as Btree indexes. MySQL currently does not support function indexing (supported by version 5.7), but it supports prefix indexing, which is the index of the first n characters of an indexed field. The length of the prefix index is related to the storage engine, and for MyISAM storage engine tables, the index prefix length can be up to 1000 bytes long , while for the InnoDB Storage engine table, the index prefix length is 767 bytes maximum. Note that the prefix limit should be measured in bytes, whereas the prefix length in the CREATE TABLE statement is interpreted as the number of characters . Be sure to consider when specifying a prefix length for a column that uses multibyte character sets.

MySQL also supports the full-text (fulltext) index, which can be used for full-text search. Indexes are always made for an entire column, and local (prefix) indexes are not supported.

Full-Text index more information:

Http://www.cnblogs.com/tommy-huang/p/4483684.html

http://blog.csdn.net/bbirdsky/article/details/45368897

Design and use of MySQL index

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.