/ let res=await db.collection("my-code").where(uid=='665017df816a3f647e107b2a'
).limit(1000).get("_id");
console.log(res); /
![2***@qq.com](http://img-cdn-tc.dcloud.net.cn/uploads/avatar/001/48/97/21_avatar_mid.jpg?v=1723612395)
- 发布:2024-08-14 12:15
- 更新:2024-08-14 15:16
- 阅读:163
产品分类: uniCloud/App
示例代码:
操作步骤:
let res=await db.collection("my-code").where(`uid=='665017df816a3f647e107b2a'`).limit(1000).get("_id"); console.log(res);
let res=await db.collection("my-code").where(`uid=='665017df816a3f647e107b2a'`).limit(1000).get("_id"); console.log(res);
预期结果:
正常返回数据
正常返回数据
实际结果:
https://uniapp.dcloud.net.cn/uniCloud/db-performance
Error: Error in $cursor stage :: caused by :: operation exceeded time limit,集台”
操作超时,请参照此文档进行优化:
at chunk-vendors.js:30597:20
https://uniapp.dcloud.net.cn/uniCloud/db-performance
Error: Error in $cursor stage :: caused by :: operation exceeded time limit,集台”
操作超时,请参照此文档进行优化:
at chunk-vendors.js:30597:20
bug描述:
数据库有一百多万条 导致 集合操作超时怎么办
![](http://img-cdn-tc.dcloud.net.cn/uploads/questions/20240814/6185593139657f19a28cec0e11d5346b.png)
![](http://img-cdn-tc.dcloud.net.cn/uploads/questions/20240814/22a8e73156c212026b9d2c0d24ac16f0.png)
![](http://img-cdn-tc.dcloud.net.cn/uploads/questions/20240814/a7bee116cd170fefe227c0198b4b7867.png)