当前位置:网站首页>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()
边栏推荐
- Exercise 8-7 string sorting
- Exercise 6-1 classify and count the number of characters
- JS get DPI, PX to cm, cm to PX
- JS first summary
- 6-9 statistics of single digits (15 points)
- Learn to punch in today
- Similarities and differences between Allegro, OrCAD, net alias, port, off page connector and how to select them
- Configure stylelint
- Jiuyi cloud black free encryption free version source code
- Exercise 7-6 count capital consonants
猜你喜欢

JS Part 2

Exercise 9-3 plane vector addition

JS input number and standard digit number are compared. The problem of adding 0 to 0

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

编程语言:类型系统的本质

关于回溯问题中的排列问题的思考(LeetCode46题与47题)

7-18 finding the single root of polynomial by dichotomy

x86汇编语言-从实模式到保护模式 笔记

Understanding of closures

concat和concat_ws()区别及group_concat()和repeat()函数的使用
随机推荐
Reflection -- basic usage
Similarities and differences between Allegro, OrCAD, net alias, port, off page connector and how to select them
Exercise 8-7 string sorting
Sendmail can't send mail and it's too slow to send. Solve it
556. 下一个更大元素 III
Canvas utility library fabric JS user manual
7-15 calculation of PI
7-18 finding the single root of polynomial by dichotomy
Exercise 8-2 calculate the sum and difference of two numbers
JS first summary
Exercise 10-8 recursive implementation of sequential output of integers
PCB中常用快捷键
etcd集群权限管理和账号密码使用
如何查询淘宝天猫的宝贝类目
MongoDB索引
牛客网:过河卒
泰凌冲刺科创板:拟募资13亿 国家大基金与小米长江是股东
Exercise 9-1 time conversion
Configure stylelint
String reverse order