Error: Error in $cursor stage :: caused by :: operation exceeded time limit,集合xz_order_shopping操作超时,请参照此文档进行优化:https://uniapp.dcloud.net.cn/uniCloud/db-performance
at _construct (construct.js:4)
at new Wrapper (wrapNativeSuper.js:17)
at te._createSuperInternal (index.js:1)
at new te (index.js:1)
at index.js:2(env: Windows,mp,1.06.2405020; lib: 3.4.1)
await db
.collection(
(() => {
let step = db_xos;
console.log({
db_xos_where
});
if (db_xos_where) step = step.where(db_xos_where);
step.field('_id, snapshot, orderID, storeID, createDate, deliveryData, estimate').orderBy('createDate desc').limit(20);
return step.getTemp();
})(),
db_xo
.where(db_xo_where)
.field('_id, paid, refundData, actualPaidFee, orderID, createDate')
.getTemp()
)
.foreignKey('xz_order_shopping.orderID')
.where('size(orderID) > 0')
.get()
主表查询条件很简单就是:creatorID=‘some id’
1 个回复
DCloud_uniCloud_VK
试试不连表,只查主表和副表是否会超时?