Left JOIN faster or Inner Join faster?

后端 未结 4 1964
不思量自难忘°
不思量自难忘° 2021-01-02 03:06

So... which one is faster (NULl value is not an issue), and are indexed.

SELECT * FROM A
  JOIN B b ON b.id = a.id
  JOIN C c ON c.id = b.id 
 WHERE A.id = \         


        
4条回答
  •  春和景丽
    2021-01-02 03:29

    LEFT JOIN shows all data from A and only shows data from B/C only if the condition is true. As for INNER JOIN, it has to do some extra checking on both tables. So, I guess that explains why LEFT JOIN is faster.

提交回复
热议问题