索引
Mysql:
优点:提高查询效率
缺点:降低跟新效率
索引类型:Fulltext 、Hash、Btree、Rtree
查询表索引:
show index from 表
创建索引:
CREATE INDEX indexName ON table_name (column_name)
修改表结构(添加索引):
ALTER table tableName ADD INDEX indexName(columnName)
注意:主键为唯一索引
SqlServer:
分区聚合索引和非聚合索引
Mysql:
优点:提高查询效率
缺点:降低跟新效率
索引类型:Fulltext 、Hash、Btree、Rtree
查询表索引:
show index from 表
创建索引:
CREATE INDEX indexName ON table_name (column_name)
修改表结构(添加索引):
ALTER table tableName ADD INDEX indexName(columnName)
注意:主键为唯一索引
SqlServer:
分区聚合索引和非聚合索引