>Hi,
>
>a system I have has a table called Transactions, then a view based on that called viewTransactions and then another view based on the first view called viewTopTransactions.
>
>Should I create indexes on the underlying table and that will speed up queries against the views? Or should I create indexes on the views? or should I index both table and views?
>
>The queries are like this:
>
>SELECT DISTINCT [PNRStatus] FROM [viewTransactions] ORDER BY [PNRStatus]
View from a view is rarely a good idea.
Check this blog post
http://blogs.lessthandot.com/index.php/datamgmt/dbprogramming/t-sql-wednesday-21-t/
If it's not broken, fix it until it is.
My Blog