mysql 多表左聯如何去重
現在執行的SQL陳述句如下:
select sys_user.id,sys_user.nickname,sys_user.headimgurl,sys_user.parentid,sys_user_referrals.parentid as referrals_id,sys_user_referrals.top_parentid,sys_user_account.logintype,sys_user_account.loginname,sys_user_tag.sys_dictionary_id as dictionary_id,sys_shibboleth.name as shibbolet,sys_user_role.sys_role_id as role_id,sys_user_grade.sys_grade_id as grade_id,sys_user_certifying.name as cert_name,sys_user_certifying.idcard as cert_idcard,sys_user_certifying.cardimgurl as cert_cardimgurl,sys_user_certifying.inserttime as cert_inserttime from sys_user LEFT JOIN sys_user_referrals on id = sys_user_id left join sys_user_certifying on id = sys_user_certifying.sys_user_id LEFT JOIN sys_user_account on id = sys_user_account.sys_user_id left join sys_shibboleth on id = sys_shibboleth.sys_user_id left join sys_user_tag on id = sys_user_tag.sys_user_id left join sys_user_role on id = sys_user_role.sys_user_id left join sys_user_grade on id = sys_user_grade.sys_user_id where sys_user.parentid = 1000000000 limit 0,30
執行后顯示如下:

請各位大神,幫我改一下SQL陳述句及優化,主表資料量100W條左右
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/58486.html
標籤:MySQL
