Left JOIN faster or Inner Join faster?

后端 未结 4 1975
不思量自难忘°
不思量自难忘° 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:27

    The INNER JOIN has to do an extra check to remove any records from A that don't have matching records in B and C. Depending on the number of records initially returned from A it COULD have an impact.

提交回复
热议问题