• Just for the record, I'd note that the RS SQL Statement had the index hint, while the MS SQL Statement did not.

    sp_executesql generates a query plan "more likely to be reused". (http://msdn.microsoft.com/en-us/library/ms175170.aspx). It's possible, that based on your tests, the state of your statistics and and your stored procedure cache, you were simply stuck with different query plans.

    I'd look at the query plans for these statements separately. One technical point, is that in RS, your parameters were datetime while the MS parameters are string (hard coded).

    Also, in general I'd like to understand what you're trying to get at with the "DATEADD" criteria in your where statement. I'm not sure if the optimizer would pick up the index properly (assuming XSALESDATETIME is part of the special index.) I think you're doing a date range, but I'm not sure.