What’s new in MongoDB 7.0 Management Service?

Improved Performance in Aggregations

The newly implemented slot-based query execution engine improves performance for a wider range of find and aggregation queries. MongoDB can use the slot-based query execution engine for a subset of queries provided certain conditions are met. In most cases, the slot-based execution engine provides improved performance and lower CPU and memory costs compared to the classic query engine.

Compound Wildcard Indexes

You can now create compound wildcard indexes. A compound wildcard index has one wildcard term and one or more additional index terms. Use compound wildcard indexes to support queries on known patterns and to limit the total number of indexes in a collection.

Consider a collection like this:

{
     tenantId: <Number>,
     tenantRegion: <Number>,
     customFields: {
                     addr: <String>,
                     name: <String>,
                     blockId: <Number>,
                     ...
     }
    dateOpened: <Date>
 }

If we have query patterns where we always need to query by the tenantId but also any of the fields in customFields, this will lead to an index for every combination, but now we can create a compounded wildcard index that will cover any combination.

db.runCommand(
   {
       createIndexes: "salesData",
       indexes: [
          {
             key: {
                tenantId: 1,
                "customFields.$**": 1
             },
             name: "tenant_customFields"
          }
       ]
   }
)

Large Change Stream Events

If you have change stream events larger than 16 MB, you can use the new $changeStreamSplitLargeEvent stage to split the events into smaller fragments.

The following new metrics report information about large change stream events:

New Aggregation Operators

$median

Returns an approximation of the median, the 50th percentile, as a scalar value. It can be used in the $group or $setWindowFields stage or as an aggregation expression in $project

 {
     $median: {
        input: <number>,
        method: <string>
     }
  }

$percentile

Returns an array of scalar values that correspond to specified percentile values. It can be used in the $group or $setWindowFields stage or as an aggregation expression in $project

{
     $percentile: {
        input: <expression>,
        p: [ <expression1>, <expression2>, ... ],
        method: <string>
     }
  }

Atlas Search Index Management

You can now manage Atlas Search indexes with mongosh methods and database commands.

### mongosh Methods

Database Commands

Delete support in Time Series

Starting in MongoDB 5.1, you can perform limited delete operations on time series collections. MongoDB 7.0 removes most limitations from operations the restriction remaining is that you cannot use these commands with multi-document transactions:

Contact us to schedule your consultation.

Delbridge is a privately held global company with offices in Canada, the USA, Costa Rica, and Romania.

Delbridge Solutions specializes in providing Corporate Performance Management, Sales Performance Management, and Data & Software Engineering.

888.866.6176

 info@delbridge.solutions

Join the Delbridge Community!