O'Reilly logo

Microsoft® SQL Server™ 2000 Programming by Example by Carlos Eduardo Rojas, Fernando G. Guerrero

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

  1. Create the view with SCHEMABINDING, which prevents modifications on the definition of referenced objects.

  2. Create a clustered index on the view to physically save the view results in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required