|< < 46 > >|

MongoDB Query Optimization

Since there are no joins, join optimization is not a problem.

So query optimization is similar to the first step of SQL query optimization: Single-table optimization based on one or more indexes.

  • Index key may be multi-column.
  • MongoDB may use multiple indexes.
  • Not cost-based?!
  • Covering index optimization is supported: If projected fields are a subset of the index key fields, no need to retrieve the indexed document.

|< < 46 > >|