MongoDB 8 · Indexes and performance
Create an index
Create an ascending index on one field.
db.users.createIndex({ email: 1 })
Official MongoDB 8 documentation
MongoDB 8 · Indexes and performance
Create an ascending index on one field.
db.users.createIndex({ email: 1 })
Official MongoDB 8 documentation
Was this page helpful?