will each condition inside an $or of the $match stage be checked concurrently?

54 Views Asked by At

compound index

{
  A: 1,
  timestamp: 1,
}

and 

{
  B: 1,
  timestamp: 1,
}
db.user.aggregate([
  { $match: {
      $or: [ { A: "some_value" }, { B: "some_value" } ]
  } },
  {
    $sort: {
      timestamp: 1
    }
  },
  {
    $limit: 1000
  }
])

In the $match, will mongoDB check the two indices concurrently?

0

There are 0 best solutions below