Is it better to use INNER JOIN or EXISTS to find belonging to several in m2m relation?

前端 未结 4 1479
清歌不尽
清歌不尽 2021-02-18 15:03

Given m2m relation: items-categories I have three tables:

  • items,
  • categories and
  • ite
4条回答
  •  生来不讨喜
    2021-02-18 15:37

    OPTION A

    JOIN has an advantage over EXIST , because it will more efficiently use the indices, especially in case of large tables

提交回复
热议问题