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