September 27, 2010 at 10:14 pm
Hello all,
I have a general question, and need a general answer (thus no specific code will be posted)
I basically have a view that joins 4 tables - and it has a clustered index on the view. However it will not use this index when I want it to, and when I use query hints, I get the "Warning: Index hints supplied for view 'vw_myview' will be ignored." message.
Any quick solutions to this? If not then I'll use my plan b.
September 27, 2010 at 10:18 pm
What edition of SQL Server are you using?
If you aren't using Developer, Enterprise, or a higher edition I believe that you have to add the WITH (NOEXPAND) hint to the query referencing the view to get it to use the index that you created on the view.
September 27, 2010 at 10:25 pm
Thank you that did the trick.
September 27, 2010 at 10:29 pm
Your welcome, thanks for letting me know that it helped.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply