我只能给出一个优化的思路,如下:一、看下面的语句是否能走索引,如果不能那就没办法优化了: {代码...} 二、上面第一步是查 b 表,在这个基础上反过来查 a 表: {代码...} 三、如果第二步也能得到优化,那么就可以再回过头来关联 b 表: {代码...} 如果第三步能够得到优化,那么查出来的就是未汇总的明细数据,你只要...
sh-4.4# mysql -uroot -p -P3307Enter password: Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 3801Server version: 8.0.29 MySQL Community Server - GPL