Efficiently updating materialized views
Obviously, other magic, like using the view indirectly would not work either. First of all, if you expect to support different editions of SQL Server backend, you should keep this behavior and noexpand hint in mind.Obviously optimization technique for 3rd party applications would not work either.When you create the indexed view, SQL Server “materializes” the data in the view into physical table so instead of doing complex joins, aggregates, etc, it can queries the data from that “materialized” table. Let’s take a look at that using our favorite Clients and Orders table. So let’s run the query that return the list of the clients who spends more than 900,00 for the orders together with # of orders. And this is the magic – even if you don’t reference the view in the select, SQL Server founds that it can use the view for this select.
is a database object that contains the results of a query not just query as contrast to view.If vendor does not allow you to change the indexes on the tables, you can create indexed views and SQL Server Enterprise edition will use them automatically.