. 1 2 . 3 . 4 . 5 . 6 . 7 . 8 . 9 10 . 11 12 is 13 is 14 15 16 . 17 large column -sql -DDL LASS = "Line"> 18 is . 19 20 is 21 is 22 is 23 is 24 25 26 is 27 28 29
|
# Ordinary index (index another name Normal), # unique index (UNIQUE), # full-text indexing (FULLTEXT), # space index (SPATIAL)
unique key email (email (10) ) # length using an index alter table table add index index name (field name) # add a normal index alter table table name drop index index name # delete index show index from the index table # View
create table a1( name char(5), email char(15), key name(name), unique key email(email) );
# Multicolumn index Create Table A3 ( name char (. 5), In Email char (15), Key name (name), UNIQUE Key name_email (name, In Email) ); EXPLAIN SELECT * from A3 the WHERE name = "Zhang"; # Analysis SQL the ALTER the Table a1 the Add uNIQUE (name); # add a unique index alter table a1 add index index_name (email ) # add a normal index alter table a1 drop index index_name # delete indexes show index from a1 G # View index
|