只能对简单的单表或2个表 join 做分析,对于复杂SQL冗余或复杂的基本上分析不了
igoscar opened this issue · 1 comments
[root@localhost ~]# sqladvisor -u mpup -p mpup -P 3306 -h 127.0.0.1 -d mpup -q "select log_id,user_name,log_type,log_createtime,log_level,log_formatter from (select log_id,user_name,log_type,log_createtime,log_level,log_formatter from (select log_id,user_name,log_type,log_createtime,log_level,log_formatter from LOG order by log_createtime desc,log_id asc ) orderedLog ) logs limit 0, 10;" -v 1
2017-11-09 17:29:17 5726 [Note] 第1步: 对SQL解析优化之后得到的SQL:select log_id
AS log_id
,user_name
AS user_name
,log_type
AS log_type
,log_createtime
AS log_createtime
,log_level
AS log_level
,log_formatter
AS log_formatter
from (select log_id
AS log_id
,user_name
AS user_name
,log_type
AS log_type
,log_createtime
AS log_createtime
,log_level
AS log_level
,log_formatter
AS log_formatter
from (select log_id
AS log_id
,user_name
AS user_name
,log_type
AS log_type
,log_createtime
AS log_createtime
,log_level
AS log_level
,log_formatter
AS log_formatter
from mpup
.LOG
order by log_createtime
desc,log_id
) orderedLog
) logs
limit 0,10
2017-11-09 17:29:17 5726 [Note] 第2步:表* 是临时表,不进行处理
2017-11-09 17:29:17 5726 [Note] 第3步:表* 是临时表,不进行处理
2017-11-09 17:29:17 5726 [Note] 第4步: SQLAdvisor结束!