1***@qq.com
1***@qq.com
  • 发布:2024-08-28 16:35
  • 更新:2024-09-04 17:27
  • 阅读:122

阿里云数据库,才5000条数据,我使用临时联表查询creatorID=‘some id’,就已经报错提示查询超时了怎么办?

分类:uniCloud

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’

2024-08-28 16:35 负责人:无 分享
已邀请:
DCloud_uniCloud_VK

DCloud_uniCloud_VK

试试不连表,只查主表和副表是否会超时?

要回复问题请先登录注册