Hi I have created a VIEW and with in the view i have bunch of select queries with multiple table joins.So when i run the view it took me 45 seconds to get 100000 rows,even when i added a clustered index on the view , it took same time and also the execution plan showed it was not using the Index at all.
My manger told me to add WITH (NOEXPAND)
SELECT * from View WITH (NOEXPAND)
--it took me 2 seconds to get 100000 rows
...
My manger told me to add WITH (NOEXPAND)
SELECT * from View WITH (NOEXPAND)
--it took me 2 seconds to get 100000 rows
...
No comments:
Post a Comment