I will add a link.
The query plan is selected based on the statistics in the table and the indices used (taking into account the operations that need to be performed). Regardless of whether the selected query execution plan depends on it, whether it depends on many factors, but the answer to your question is that MS SQL will produce the same plan independently (it will consider the best order for all three conditions and find same result at the end).
However, it should be noted that the planners are not perfect and that they only evaluate the cost, so in some cases (if you know how limited your query planner settings are), you can rewrite the conditions of your request to help the planner see a better way.
This (if possible) should be done only for queries that, as it turns out, are crucial, and also note that such an optimization can slow down when changing data statistics.
In addition, in most cases, there are better ways (changing indexes) to optimize queries, and this should be left to the query planner.
One of the main points of the RDBMS was not to indicate how to extract the data (the declarative nature of the queries) - and in most cases today, query planners will find a good plan for you.
Unreason
source share