Ver*_*nko 5 c# mongodb aggregation-framework
我尝试使用 c# mongodb 驱动程序 (MongoDB.Driver.2.0.1) 执行查询,
dbCollection.Aggregate().Match(query).Sort(sort Definition).Skip(startIndex - 1).Limit(count).ToListAsync().Result
Run Code Online (Sandbox Code Playgroud)
它是错误滴: "Command aggregate failed: exception: Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting. Aborting operation. Pass allowDiskUse:true to opt in..."
当我添加一个选项 allowDiskUse = true 时,它执行成功
dbCollection.Aggregate(new Aggregated Options{AllowDiskUse=true}).Match(query).Sort(sort Definition).Skip(startIndex - 1).Limit(count).ToListAsync().Result
Run Code Online (Sandbox Code Playgroud)
但是,我想了解,它的查询在服务器上执行吗?因为当我在 robomongo(在服务器上)有限制地执行它的查询时,它不会下降,但是当我无限制地完成这个查询时,它会下降。