mongo 创建索引

三种方式: 方式一:使用可视化工具Robo 3T 创建 右键 选择add index  添加索引 如下图:   方式二: 脚本创建: db.test.createindex({"phone":1})   方式三: 使用代码创建: db.collection.indexs().create({})   //两个字段关联 ,创建唯一索引 _, err = mongoCli.Client.Collect
相关文章
相关标签/搜索