Compound Indexes
Index several fields in order.
Example
db.orders.createIndex({ status: 1, createdAt: -1 })Exercise
Two fields.
createIndex({ a: 1, : -1 })
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.