关于SQL的执行效率
作者:互联网
在工作中看到开大的写的SQL如下:
SELECT * FROM `test`.`tbl_live_user_campaign_status` WHERE campaign_id = 1 AND live_uid = XXXX ORDER BY `test`.`tbl_live_user_campaign_status`.`id` LIMIT 1;
我觉得可以省略为:
SELECT * FROM `test`.`tbl_live_user_campaign_status` WHERE campaign_id = 1 AND live_uid = XXXX limit 1;
比较好奇为啥开发要这么写?
哪条的执行效率高呢
标签:status,campaign,效率,live,user,SQL,test,执行,id 来源: https://www.cnblogs.com/judith0719/p/16036470.html