What is better? Subqueries or inner joining ten tables?

后端 未结 5 1952
青春惊慌失措
青春惊慌失措 2021-02-12 17:49

An old system have arrived on our office for some changes and fix, but it is also suffering from performance issues. We don\'t know exactly what is the source of this slowness.<

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-12 18:05

    subquery actually runs once for every row whereas the join happens on indexes.

    Use joins for better readability and maintainability as you have already mentioned in your questions.

提交回复
热议问题