当前位置:网站首页>MongoDB索引
MongoDB索引
2022-07-03 13:42:00 【稻田里展望者】
创建索引 db.comment.createIndex({userid:1})
comment是数据库的名称, userid是数据库的字段
查看索引db.comment.getIndexes()
创建复合索引 db.comment.createIndex({userid:1,nickname:-1})
字段名包括userid 和nickname
移除索引db.comment.dropIndex({userid:1})
移除复杂的索引db.comment.dropIndex("userid_1_nickname_-1")
移除所有的所有db.comment.dropIndexes()
边栏推荐
- 天图投资冲刺港股:资产管理规模249亿 投了小红书与奈雪
- Reflection -- basic usage
- JVM垃圾回收机
- Metal organic framework (MOFs) antitumor drug carrier | pcn-223 loaded with metronidazole | uio-66 loaded with ciprofloxacin hydrochloride( MIL-100( Fe) 包裹小分子阿司匹林形成[email protected](Fe)|甘草次酸修饰金属有机框架材料UiO-66-NH2(简称UiO-66-NH2-GA)
- Metal organic framework material zif-8 containing curcumin( [email protected] Nanoparticles) | nano metal organic framework carry
- 1px problem of mobile terminal
- jvm-对象生命周期
- Mysql:insert date:sql error [1292] [22001]: data truncation: incorrect date value:
- Redis:字符串类型数据的操作命令
猜你喜欢

7-7 12-24 hour system

Exercise 9-3 plane vector addition

Solution to failure or slow downloading of electron when electron uses electron builder to package

Leetcode(4)——尋找兩個正序數組的中比特數

Metal organic framework (MOFs) antitumor drug carrier | pcn-223 loaded with metronidazole | uio-66 loaded with ciprofloxacin hydrochloride(

Installation impression notes

Redis:Redis的数据结构、key的操作命令

QT learning 24 layout manager (III)

Exercise 6-6 use a function to output an integer in reverse order

7-8 overspeed judgment
随机推荐
Solve MySQL 1045 access denied for user 'root' @ 'localhost' (using password: yes)
[combinatorics] permutation and combination (examples of combinatorial number of multiple sets | three counting models | selection problem | combinatorial problem of multiple sets | nonnegative intege
Exercise 10-6 recursively find Fabonacci sequence
玖逸云黑免费无加密版本源码
Nucleic acid modified metal organic framework drug carrier | pcn-223 metal organic framework encapsulated ad adamantane | zif-8 encapsulated adriamycin (DOX)
RocksDB LRUCache
Installation impression notes
Common mixins
Doxorubicin loaded on metal organic framework MIL-88 DOX | folic acid modified uio-66-nh2 doxorubicin loaded [email
Formation of mil-100 (FE) coated small molecule aspirin [email protected] (FE) | glycyrrhetinic acid modified metal organ
Canvas utility library fabric JS user manual
[acnoi2022] guess numbers
Why don't I have a rookie medal
QT learning 23 layout manager (II)
QT learning 21 standard dialog box in QT (Part 2)
How to promote the progress of project collaboration | community essay solicitation
7-9 find a small ball with a balance
Invalid Z-index problem
Folic acid modified metal organic framework (zif-8) baicalin loaded metal organic framework composite magnetic material (AU- [email
JVM class loading