SQL JOIN - WHERE clause vs. ON clause

前端 未结 19 1929
深忆病人
深忆病人 2020-11-21 11:56

After reading it, this is not a duplicate of Explicit vs Implicit SQL Joins. The answer may be related (or even the same) but the question is diffe

19条回答
  •  野性不改
    2020-11-21 12:33

    for better performance tables should have a special indexed column to use for JOINS .

    so if the column you condition on is not one of those indexed columns then i suspect it is better to keep it in WHERE .

    so you JOIN using the indexed columns, then after JOIN you run the condition on the none indexed column .

提交回复
热议问题