Mysql asks wherea. id = B. id and joinona. id = B. id in terms of efficiency

Source: Internet
Author: User
For mysql help, may I ask wherea. id = B. id and joinona. id = B. the difference between the efficiency of IDS is as follows: query the Product Table and brand table of ecshop & nbsp;. what is the difference between their query efficiency? & Nbsp; another problem is & nbsp; left & nbsp; for mysql help, the difference in efficiency between where a. id = B. id and join on a. id = B. id
The following is a query of the ecshop product table and brand table. what is the difference in query efficiency?
Another problem is the efficiency of left join and join.
Thank you !!

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`
 

Share with mysql: More

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.