对分片集合的分散和聚集查询中的$限制

问题描述 投票:0回答:0
user.aggregate([
  {
    $match: {
      age: { $gt: 18 },
      city: { $in: ["chicago", "paris"] }
    }
  },
  {
    $sort: {
      last_logged_in: -1
    }
  },
  {
    $limit: 10000
  }
])

如果

user
集合被划分为10个分片,每个分片会返回
10,000
个文档,总共
100,000
吗?

mongodb mongodb-query nosql aggregation-framework mongodb-indexes
© www.soinside.com 2019 - 2024. All rights reserved.