SQL question: Does the order of the WHERE clause make a difference?

前端 未结 6 745
谎友^
谎友^ 2020-12-16 11:56

From a performance standpoint, does the order of my SQL WHERE statements make a difference?

For instance

SELECT ... FROM ...
WHERE a > 1
AND b <         


        
6条回答
  •  佛祖请我去吃肉
    2020-12-16 12:24

    If it's from the same table, and the query is as simple as your example then, no it doesn't make a difference. As you get more complicated and link more tables, it can.

提交回复
热议问题