mysql求助 请问where a.id=b.id 和join on a.id=b.id 在效率上的区别
下面是ecshop 的商品表和品牌表的查询,请问它们的查询效率有什么区别呢?
还有一个问题是 left join 和join的效率哪个高一点呢。
谢谢 !!
SELECT a.`goods_id` , a.`goods_name` , b.brand_name
FROM `ecs_goods` AS a
LEFT JOIN ecs_brand AS b ON a.`brand_id` = b.`brand_id`
SELECT a.`goods_id` , a.`goods_name` , b.brand_name
FROM `ecs_goods` AS a, ecs_brand AS b
WHERE a.`brand_id` = b.`brand_id`