Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Materialized View

Author  Topic 

kawadeprasad
Starting Member

13 Posts

Posted - 2012-06-05 : 02:20:19
Hi Guru's
Can I create a materialized view on a view? If so then will occupy any storage space? how?

_ Prasad

vinu.vijayan
Posting Yak Master

227 Posts

Posted - 2012-06-05 : 02:33:44
quote:
Originally posted by kawadeprasad

Hi Guru's
Can I create a materialized view on a view? If so then will occupy any storage space? how?

_ Prasad



I hope you mean "Indexed Views" when you say "Materialized Views".

The following links will tell you all about Indexed Views in SQl Server:

1. Materialized Views in Sql Server:

http://www.akadia.com/services/sqlsrv_matviews.html

2. All about Indexed Views(read the constraints part)

http://www.databasejournal.com/features/mssql/article.php/3867651/SQL-Server-Indexed-Views.htm

Hope the links help.

N 28° 33' 11.93148"
E 77° 14' 33.66384"
Go to Top of Page

kawadeprasad
Starting Member

13 Posts

Posted - 2012-06-05 : 03:43:48
Thanks. It was helpful. Though I do have a question.
Materialized view may store results in some schema object unlike simple views. Now if create a materialized view (which stores results) unlike simple views (which does not store result but only generates result view); then in this case weather results will get stored in schema object.
As per my understanding it should be though I would like to confirm.

Go to Top of Page

vinu.vijayan
Posting Yak Master

227 Posts

Posted - 2012-06-05 : 05:35:55
Yes, the result set of the Indexed view is physically stored in the database.
The clustered index is stored in SQL Server and updated like any other clustered index.

N 28° 33' 11.93148"
E 77° 14' 33.66384"
Go to Top of Page
   

- Advertisement -