Creating Indexed Views for Improving performance

Posted on : 28-06-2011 | By : Devi Prasad | In : Indexed Views

Share:

0


Creating Indexed Views for Improving performance.

Indexed views are created in two steps

  • Creating View
  • Creating Indexes on the view

The syntax for creating the indexed view is different from that for creating a normal view.

Advantages Of Indexed Views:

  • To Improve the performance of select queries
  • Avoid Complex joins at run time and make the joined data readyly available
  • Index data on columns on multiple tables
  • The data from multiple tables is denormalized and helps in fastening the queries that fetch data
  • Joins that are frequently used can be converted into indexed views and thus reducing the query resopnse time of multiple queries
  • Advantage of having Higher Disk Space can be converted into having high query performance using Indexed views

Disadvantages Of Indexed Views:

  • Slows down the performance of the insert,update,delete statements on the tables used in indexed views
  • Increases the disc space used by the database as the views are created with physical data

Refer to the following link for complete list of Pros and Cons of Indexed Views:advantages and disadvantages of indexed views

Hence the decision of creating indexed views can be taken based on the following

  • Availability of disc space
  • Amount of performance improvement needed
  • Number of update,delete,insert quereies fired on the tables used in the indexed views

Please refer to the following MSDN Link to have further details about creating Indexed Views:
MSDN Link




References : Devi Prasad (sqlserverlearner.com)

Need Help On SQL Server?

Cannot Find Solution to your problem (or) If you are looking for some help on SQL Server. Dont worry Click Here to Post your question and solve your issue.


Do you like my blog?

If you liked reading this blog, please help spread the word by sharing this blog with your friends.




Write a comment