Site sponsored by: Idera Try Idera’s new SQL admin toolset
SQL Server Performance

  • Home
  • Articles
  • Forums
  • Tips
  • Quiz
  • FAQ's
  • Blogs
  • Software
  • Books
  • About Us
RSS Feeds
Sign in | Join


Tip Topics

All Tips
ADO.NET / ASP.NET
Administration
Analysis/OLAP Services
Application Development
Configuration
Components
ETL
Hardware
High Availability
Hints
Index
Misc
Operating Systems
Performance Tuning
Replication
T-SQL
Views

Write for Us

Share you SQL Server knowledge with others and raise your profile in the community More...
Latest Articles

Resource Governor in SQL Server 2008
Tweaks in SQL Server Reporting Services
Configure Filestream in SQL Server 2008
Capture DDL Changes using Change Data Capture with SQL Server 2008 ...

More     
 
Latest FAQ's

SQL Server Reporting Server (SSRS) service is failing to start ...
Cannot Start SQL Server Service
Users are able to connect to report manager but not able ...
Errors when SQL Server Snapshot Replication is Running

More     
   
Latest Software Reviews

Spotlight on ApexSQL Doc 2008
ApexSQL Enforce
Embarcadero Change Manager
SQL Server DBA Dashboard

More     

tips >> views >> SQL Server 2000/2005 Indexed View Performance Tuning ...

SQL Server 2000/2005 Indexed View Performance Tuning and Optimization Tips

By : Brad McGehee
Apr 04, 2007

Page 2 / 2


Many times, as DBAs, we are expected to performance tune poorly performing third-party applications. Unfortunately, there is often not too much we can do, other than tweaking indexes, because we are unable to modify the application's design or code like we would have to in order to boost performance.

If you are running SQL Server 2000/2005 Enterprise Edition, you have another tool in your toolkit to help boost the performance of a third-party application, and that is indexed views. While a third-party application can't use an indexed view directly (code would have to be changed to use a newly created indexed view directly), the query optimizer can.

For example, if you find a poorly performing query that is run by the application, you can create an indexed view that could be used to speed the query. (This assumes that an indexed query is appropriate for the query). Even though the application does not know about the indexed view, the query optimizer does, and it can evaluate it to see if it will perform better than running the query normally. And if the query optimizer does choose to use the indexed view, the query's performance is boosted.

While this is a great concept, it can take a lot of work, and you will need to experiment to see if the query optimizer uses the query you create. Because if it doesn't, then you need to remove the indexed query, as it will be wasted overhead if it is not used. [2000, 2005] Updated 3-15-2005

*****

Ideally, indexed views should be created at the same time clustered and non-clustered indexes are created for a table. The reason for this is that it is easy, if you don't plan well, to create indexed views and clustered and non-clustered indexes that overlap and are redundant. Redundant data increases overhead and hurts I/O performance, so this is to be avoided. If you can't create both at the same time, just keep in the back of your mind that whenever you tweak indexed views or indexes on a table, that you need to reevaluate all of the indexes on the table at this time in order to prevent redundant indexes from occurring. [2000, 2005] Updated 3-15-2005

*****

Use the SQL Server Index Wizard or Database Engine Tuning Advisor and an appropriate Profiler trace file to help identify potential indexed views. When the Wizard or Advisor runs, it automatically looks for potential indexed views and recommends any that if finds. But don't rely on this tool as the only way to identify indexed views, as it is unable to identify all possible candidates. [2000, 2005] Updated 3-15-2005


<< Prev Page         








Home | Peformance Articles | Audit Articles | Business Intelligence Articles | Clustering Articles | Developer Articles | Reporting Services Articles | DBA Articles | ASP.NET / ADO.NET Articles | DBA FAQ's | Developer Peformance FAQ's | DBA Peformance FAQ's | Developer FAQ's | Clustering FAQ's | Error Messages | Audit Tool Reviews | Backup Tool Reviews | Coding Tool Reviews | Compare Tool Reviews | Documentation Tool Reviews | Design Tool Reviews | Monitoring Tool Reviews | Log Tool Reviews | Reporting Tool Reviews | Clustering Tool Reviews | Security Tool Reviews | Change Management Tool Reviews | Remote Access Tool Reviews | Book Reviews | Security Tool Reviews | QDPMA Performance Tuning | ADO.NET / ASP.NET | Administration | Analysis/OLAP Services | Application Development | Configuration | Components | ETL | Hardware | High Availability | Hints | Index | Misc | Operating Systems | Performance Tuning | Replication | T-SQL | Views


              © 1999-2008 by T10 Media. All rights reserved