sql server - WHERE clause better execute before IN and JOIN or after -


I read this article:

The article is written at the end and by joining it Think first.

As if we have a master table that has been reprinted 10 million times and with a detailed table (with reference to Master Table (FK)) with 50 million records. We have a question that only 100 records of the expansion in the table according to PK in the master table.

In this situation and where else should be circulated? I mean we have 500 million records after joining, and then where does it apply? Or first, where to apply and then join and consider if the second answer is true, is there a disadvantage with its top article?

thanks

it does not matter

logical The processing order is always honored: regardless of the actual processing order

Join inner and where the conditions are effectively associated and cumulative (hence the ANSI-89 "join in" syntax), the actual order is Does not matter

Take away the physical order significance with the addition of more complex questions Completely: By applying the WHERE to an external table, the argument completely changes

Again, it does not matter how long the adapter makes it internally, because the query semantics have logical processing Order is maintained accordingly.

And the key word "adapter" here: it's exactly what he says

Comments