Home Forums SQL Server 2008 SQL Server 2008 - General facing a diffrent problem alltogether - working on indexed views and facing a tough time getting the query optimizer to pick the resultset from Indexed view... :) RE: facing a diffrent problem alltogether - working on indexed views and facing a tough time getting the query optimizer to pick the resultset from Indexed view... :)

  • First, the query posted isn't an indexed view (has parameters in the query).

    Sorry, just caught that those were commented out. The rest of this still stands.

    Second, without table and index definitions, the actual execution plan of the query, all we can do is guess at what may be wrong.

    Please read the second article I link to below in my signature block regarding performance problems. Gail Shaw wrote a very informative article about what you need to post and how to post it to get the best answers possible to solve performance problems.

    Also, you really should look at dropping all those NOLOCK hints in your queries unless you like the possibility of getting erroneous answers.