查看Mysql8优化过的sql语句

虽然5.7中已经提示过EXTENDED会过时,但是还是可以正常使用的

到了8.0中,已经没有EXTENDED了,可以直接使用EXPLAIN解析sql语句,然后用show warnings输出结果

EXPLAIN
select s.* from Student s
where s.id in (  
    select s_id   
    from sc 
    where sc.c_id = 40 and sc.score = 100 );

show warnings;

 

posted @ 2022-05-27 08:37  Bin_x  阅读(244)  评论(0)    收藏  举报