February 21, 2007 at 12:51 am
Hi,
I've placed a materialized view over a table that was used within another view. The scenario:
The selectivity of fields used to filter records from that table was not so good that an index could be applied, so the execution plan was scanning the whole clustered index (primary keyed, thus whole table). So i created a materialized view over the table with the where clause used in the other view. NOW...
When i use the exact select statement of the old view (commenting the ALTER VIEW, and just executing the select statement) it utilizes the newly created materialized view.
THE PROBLEM! Now when i select over the old view ... it is still scanning the clustered index, even though i have used sp_recompile & sp_refreshview, but in vein.
Anybody suggesting over this will be highly respected!
Rehan
- Rattu
February 21, 2007 at 2:26 am
Problem solved ... thanks to myself ..!!
- Rattu
February 21, 2007 at 4:54 am
Great. Sometimes, just sitting and reflecting the problem helps
Can you share the pittfall ?
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply