Introduction to Indexed Views in SQL Server


Usually, when a view is created in the SQL Server database, it is just a virtual table (not stored on disk) that might fetch results from one or more underlying physical tables (stored on disk). Views are mainly created to maintain security on the tables, perform pre-aggregated calculations or limit the query to specific columns in the tables. Often at times, there can be complex logic that might be executed multiple times. SQL views also provide an encapsulation layer for such complex logic without the end-user having to know about it.

Views read data from the underlying tables and/or