当前位置:网站首页>Mongodb index
Mongodb index
2022-07-03 14:22:00 【Rice field prospector】
Create index db.comment.createIndex({userid:1})
comment Is the name of the database , userid Is the field of the database
Look at the index db.comment.getIndexes()
Create composite index db.comment.createIndex({userid:1,nickname:-1})
Field names include userid and nickname
Remove index db.comment.dropIndex({userid:1})
Remove complex indexes db.comment.dropIndex("userid_1_nickname_-1")
Remove all of all db.comment.dropIndexes()
边栏推荐
- Programming language: the essence of type system
- Fabric. JS document
- Understand the application scenario and implementation mechanism of differential segment
- Why are grass-roots colleges and universities with "soil and poverty" called "Northeast small Tsinghua"?
- MongoDB索引
- Common plug-ins for vite project development
- Webpage connection database ~ simple implementation of addition, deletion, modification and query complete code
- JS input number and standard digit number are compared. The problem of adding 0 to 0
- 关于回溯问题中的排列问题的思考(LeetCode46题与47题)
- 别再问自己适不适合做软件测试了
猜你喜欢

7-8 overspeed judgment

Exercise 8-8 moving letters

7-9 find a small ball with a balance

JS Part III

玖逸云黑免费无加密版本源码

Similarities and differences between Allegro, OrCAD, net alias, port, off page connector and how to select them

一文了解微分段应用场景与实现机制

allegro,orcad, net alias,port,off-page connector之间的异同点和如何选取

如何查询淘宝天猫的宝贝类目

编程语言:类型系统的本质
随机推荐
Selective sorting
Exercise 9-3 plane vector addition
7-9 find a small ball with a balance
【北大青鸟昌平校区】互联网行业中,哪些岗位越老越吃香?
Solve the problem of dormitory router campus network sharing login
ShowMeBug入驻腾讯会议,开启专业级技术面试时代
Interface for querying IP home
Exercise 7-6 count capital consonants
MongoDB数据库入门的常用命令
Exercise 8-7 string sorting
PCB中常用快捷键
String substitution
6-9 statistics of single digits (15 points)
Comprehensive evaluation of good-looking, easy-to-use and powerful handwriting note taking software: notability, goodnotes, marginnote, handwriting, notes writers, collanote, collanote, prodrafts, not
Thinking about the arrangement problem in the backtracking problem (leetcode questions 46 and 47)
Leetcode (4) -- find the median of two positively ordered arrays
Redis: commandes d'action pour les données de type chaîne
Redis:字符串類型數據的操作命令
JS Part III
Sendmail无法发送邮件及发送过慢解决