SELECT * from (SELECT `dili_c`.*, `dili_uf`.`fchannelcode`,`dili_uf`.`fcashbalance`, `dili_uf`.`fchannelbalance`, `dili_uf`.`favailablebalance`, `dili_uf`.`fholdbalance`, (SELECT SUM(`fmoney`) AS fmoney FROM (`dili_daily_deposit_settlement`) WHERE `fuserid` = dili_c.fuserid) as totalmoeny, (SELECT SUM(`fdepositcount`) AS fdepositcount FROM (`dili_daily_deposit_settlement`) WHERE `fuserid` = dili_c.fuserid) as fdepositcount, (SELECT `fbegindate` FROM (`dili_deposit_record`) WHERE `fuserid` = dili_c.fuserid ORDER BY `fbegindate` desc LIMIT 1) as fbegindate, `dili_cgm`.`customer_group_id` FROM (`dili_customer` as dili_c) LEFT JOIN `dili_userfound` dili_uf ON `dili_c`.`fuserid` = `dili_uf`.`fuserid` LEFT JOIN `dili_customer_group_mapping` as dili_cgm ON `dili_c`.`fuserid` = `dili_cgm`.`userid` WHERE `dili_c`.`fusertype` = 0 ORDER BY `dili_c`.`fregistedtime` desc LIMIT 1,25) as a LIMIT 1,25
现在查询超过30秒以上。怎么解决呢?主表量有60几万数据
解决方案
25
25
这么刺激?
50