Indexed Views
SQL Server 2000 can create indexes on views. This functionality is implemented by extensions in the CREATE VIEW and CREATE INDEX statements. If a view is not indexed, it doesn't use any storage space. Whenever you use the view in a Transact-SQL statement, SQL Server merges the view definition with the statement to produce a single execution plan and it directly accesses the underlying tables on which the view is defined.
After a view is indexed, its index needsstorage space, as any standard index.
The process of creating an indexed view is as follows:
Create the view with SCHEMABINDING, which prevents modifications on the definition of referenced objects.
Create a clustered index on the view to physically save the view results in ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access