• If you have different plans then either:

    * The queries are not logically equivalent

    * The different form resulted in the optimiser searching a different area of the plan space and finding a different optimal plan. Since that's dependent on the optimiser's estimates, heuristics and search algorithms this will not be consistent.

    As for 'different performance', you ran multiple tests, ignored runs that incurred the overhead of compiling and data caching, analysed the results and came up with a statistically significant change?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass