Home Forums SQL Server 2008 T-SQL (SS2K8) help me to create useful index (while using dynamic query) RE: help me to create useful index (while using dynamic query)

  • That should be OK, but you can check using the execution plan. It might be clearer if you put the filters in the order they appear in the index - just for clarity.

    If the query doesn't use the index you could create a variable to hold DATEADD(dd, -90, GETUTCDATE()) and compare to that.