$wallet[$k]['count'] = //Db::query(" select sum(`balance`) as balance from `{$prefix}balance` where `uid` in ({$sql}) and `wallet_type_id` = {$v['id']} ");
Db::name('balance')->where('wallet_type_id',$v['id'])->whereIn('uid',$sql)->sum('balance');
}
用原生查询 1416ms就处理完了
用tp的是132612ms 这差距也太大了吧
最佳答案