mysql in() 子查詢 優化

mysql in() 子查詢 優化mysql in 若是裏面是一個子查詢是不會使用索引的sql 好比  select  *  from user where id in( select id form user)優化 優化orm select * from user u1 left join (select id from user) u2 on u1.id = u2.id索引 這樣就能使用索引了
相關文章
相關標籤/搜索