Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Another view is using the indexes applied on a different Indexed View

$
0
0

Hello, 

I have not played around much with Indexed views. 

We are building a SSRS report that has millions of rows.The report is almost complete now and trying to improve performance.

There was an existing view, say 'A' that's sourcing one table 'X' and I created another view.. a replicate..say 'B' except made this an indexed view by adding clustered and non clustered index on this view that's sourcing the same table 'X'

What i am finding to my surprise is where i run a query on A ( does not have any index) is using the index from B.(through query plan) Could it be because it is referencing the same table 'X'

What i was trying to do was compare the query performance between two views, A and B ( indexed and non indexed)

I haven't tried comparing the source table 'X' and B.

Any thoughts suggestions.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>