Help to see how this MySQL statement is optimized

Source: Internet
Author: User
Help to see how this MySQL statement is optimized
Explain select Sql_calc_found_rows D.id,d.goodlevel,d.ismainfield,d.lirun,d.introduce,d.shen,d.city,d.mainfield, D.charges,d.type,m.indentity,m.nick as Name,m.username,d.cxt_num,v.vnum
From Tab1 as D left join TAB2 as M in D.id=m.uid left join Tab3 as V on D.id=v.uid order by D.goodlevel Desc,d.cxt_num des C,v.vnum desc LIMIT 10,10

------Solution--------------------
Do not know your business, bad change. The above mentioned index, in fact, you now this statement is not indexed also the same


From Tab1 as D left join

==========================
D is the left table, which is definitely a full-scale sweep. Do you consider whether your actual situation needs to tab1 the whole table data.
  • 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.