Sunday, February 12, 2012

Clustered Index on Indexed View from ADO.NET

I have a clustered index on an indexed view in sql server 2000. When I do a simple select in query anaylser from this view I can see from the execution plan in profiler that the clustered index was used to return the data, hence improving performance of the underlying select(this is why I am using the indexed view). However, if I run the query from an asp.net page using the sql provider I can see the call in profiler but the clustered index is not used, hence reducing the performance of the call considerably.
If anyone has experienced this please let me know.
CheersViews are query rewrites just persisted so the query optimizer usually ignore the execution plan. Try the link below to see if you can make changes to your create a View statement to improve performance. Hope this helps.
http://www.sqlteam.com/item.asp?ItemID=1015

No comments:

Post a Comment