-- analyze/format=tree
explain format=json SELECT jud.id FROM all_star_judgement jud
left join account_member am on am.inserted_time = jud.inserted_time;
filtered 越小越好, if rows is 1000 and filtered is 50.00 (50%), the number of rows to be joined with the following table is 1000 × 50% = 500.
SELECT * FROM INFORMATION_SCHEMA.TABLES
WHERE Table_schema="mc-fb"
AND `TABLE_NAME`="all_star_judgement"
OR `TABLE_NAME`="account_member"
or `TABLE_NAME`='account_member_follower';
explain sql
if rows is 1000 and filtered is 50.00 (50%), the number of rows to be joined with the following table is 1000 × 50% = 500.
explain 是数据概况
json result