December 23, 2009 at 4:03 pm
Hello friends,
I want to start indexing my views to get them to run faster, but i'm a bit fuzzy about why i need to bound them to the schema and what is the best way to bound already existing views to a newly created schema.
Many Thanks!!
🙂
Remember
Without Change something sleeps inside of us that seldom awakens, the sleeper must awaken!!
December 28, 2009 at 9:33 am
You have to use the "with schemabinding" option when creating the view. This option prevents any changes to the tables that are referenced in the view. There are some other considerations to keep in mind when doing this however (loading data, Clustered index on the view etc..). If this is the only way to speed up performance, then here's an article from technet that has some pretty good information for you.
http://technet.microsoft.com/en-us/library/cc917715.aspx
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
December 28, 2009 at 10:02 am
Test carefully. Realize that there isn't any free improvement here. These are additional indexes to maintain on updates, so don't over index.
December 28, 2009 at 10:23 am
Make sure that you've reviewed the 'laundry list' of requirements for Indexed views. There are a lot of requirements for the query used in the view.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 3, 2010 at 4:29 pm
Thanks guys for all your sound advice i very much appreciated it 🙂
All the best for 2010 😎
Remember
Without Change something sleeps inside of us that seldom awakens, the sleeper must awaken!!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply