Node+mysql performs multi-table join check ndoe.js out of memory

clipboard.png

The sql statement executed by
  1. is
// 
// 
let getOrder=(userId,orderType)=>{
  let _sql=`select remark,goodsNumber,orderlist.goodsSize,goods.goodsName, goods.goodsImgArr from orderlist ,goods where userId="${userId}" and orderType="${orderType} and  goods.goodsId =  orderlist.goodsId ";`
  return query(_sql,[]);
}

2.query method

/*query */
let query=(sql,values)=>{
    return new Promise((resolve,reject)=>{
        pool.getConnection((err,connection)=>{
            if(err){
                  reject(err);
              }else{
              
                  connection.query(sql,values,(err,rows)=>{
                       //  
                    connection.release();  
                       if(err){
                           reject(err);
                       }else{
                           resolve(rows);
                       }


                  });
             };
        });
    });
}
Mar.12,2021

is there too much data? you can try paging instead of taking it all out at once

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e458fc-442cf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e458fc-442cf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?