MongoDB card reviewmedium

What are compound indexes in MongoDB?

Compound indexes contain multiple fields in a single index. They improve performance for queries that filter or sort using multiple fields. The order of fields in compound indexes affects how MongoDB uses them.

JB

Jeevan Bhargav

Audited by Creator

This answer is calibrated for technical interviews. Verify benchmarks in local sandboxes before deploying.