Re: AND expression evaluation

  • Does the order of AND expressions (i.e., table1.attribute = 'value', etc.) in WHERE statements affect performance? Or is SQL server "smart enough" to rearrange the order as it parses the statement?

  • It's smart enough. You can test this by displaying the execution plan, then moving a couple of AND statements around in your WHERE clause and seeing if anything changes.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply