mongo 創建索引

三種方式: 方式一:使用可視化工具Robo 3T 創建 右鍵 選擇add index  添加索引 如下圖:   方式二: 腳本創建: db.test.createindex({"phone":1})   方式三: 使用代碼創建: db.collection.indexs().create({})   //兩個字段關聯 ,創建唯一索引 _, err = mongoCli.Client.Collect
相關文章
相關標籤/搜索