SELECT * FROM t1 INNER JOIN t2 ON t1.id = t2.CODE
sql执行很慢,explain 发现Using join buffer (Block Nested Loop)
产生的原因有可能是:JOIN 的字段类型不一样 或者 JOIN的字段没有索引。