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.
| Author |
Topic |
|
ddamico
Yak Posting Veteran
76 Posts |
Posted - 2011-09-08 : 20:43:52
|
| Good day all,I have a few questions regarding indexed view I am hoping someone can debunk or confirm.I was under the impression that in order to maintain a indexed view on a table that changes that you need to drop/create the clustered index in order to for it to be up-to-date.I was reading some post however, that lead me to believe that the index of the view is maintained during deletes and updates (not sure about inserts). They were saying the only reason for dropping the index is so that update/deletes to the final table would have less contentions having to maintain the clustered index on the view.Can someone definitively tell me if the above statement about an index view maintaining the index is true? If it is true then if the table is only having inserts done on it?I would think if you have a view defined like the following it wouldnot be a true statement. Thanks!CREATE VIEW abcSELECT Id, Val1, Val2FROM table_aWHERE Val2 = 10CREATE UNIQUE CLUSTERED INDEX IXV ON abc(Id) |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|