Which SQL query is faster? Filter on Join criteria or Where clause?

前端 未结 9 987
伪装坚强ぢ
伪装坚强ぢ 2020-11-27 03:36

Compare these 2 queries. Is it faster to put the filter on the join criteria or in the WHERE clause. I have always felt that it is faster on the join criteria b

9条回答
  •  难免孤独
    2020-11-27 04:01

    I guess that the first, because it makes a more specific filter over the data. But you should see the execution plan, as with any optimization, because it can be very different deppending on size of data, server hardware, etc.

提交回复
热议问题