Mysql index -- (mysql 2)

Source: Internet
Author: User

Mysql index -- (mysql 2) index type: basic index primary key foreign keyunique indexnon-unique professional index: -- B-tree balanced number index, different from binary tree. the height of a binary tree may be very high. The balance tree may not be very high. Generally, Layer 3 and Layer 4. B + tree B-tree is the logical name, and B + tree is the technical implementation. some storage will be stored on the disk when the memory is insufficient. (innodb, MyISAM, Memery, etc.) r-tree spatial index (MyISAM) full text index. (MyISAM) hash index (Memery) Objective: To reduce I/O, query speed is provided, and dml speed is affected. optional: proportion of returned rows to the entire record index type: prefix index, composite index, function index flexibility (implemented by adding columns and triggers), full-text index composite index: oracle has the index skip algorithm to enable indexes that are not Bootstrap columns to be used. mysql must use composite indexes in the defined order. full-text index: Mainly used to query words .... where match (column) aginst ('characters' in mode ). there are 3 medium-mode boolean (operator expressions supported), natural language, and extended natural language. select title from books where mathc (title) against ('Prince ') select title, author from books where match (title) against ('green + Anne' in boolean mode ); -- in natural language mode/with query expansion -- View execution plan explain select * from t where year (d)> 1994 \ G select_type: subquery (use subquery), dependent subquery (associated subquery), derived (subquery as from, embedded view), simple (simple query) union (using union) to view the index of a table: show index from [tb_name] \ G

Related Article

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.