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


Article Topics

All Articles
Performance Tuning
Audit
Business Intelligence
Clustering
Reporting Services
Developer
General DBA
ASP.NET / ADO.NET

Write for Us

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

Database Recovery Models in SQL Server
Compare Dates
Filtered Indexes in SQL Server 2008
Importance of Database Backups and Recovery Plan

More     
 
Latest FAQ's

ALTER TABLE SWITCH statement failed because the object '%.*ls' is not ...
ALTER TABLE SWITCH statement failed because column '%.*ls' at ordinal %d ...
ALTER TABLE SWITCH statement failed because table '%.*ls' has %d columns ...
SQL Server Reporting Server (SSRS) service is failing to start ...

More     
   
Latest Software Reviews

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

More     

articles >> performance tuning >> Comparing the SQL Server 2000 Index Tuning ...

Comparing the SQL Server 2000 Index Tuning Wizard and the SQL Server 2005 Database Tuning Adviser

By : Luis Martin
Jun 29, 2005

Page 2 / 3



Once indexes were applied, the execution plan results were:


And the statistics after the implementation of the indexes were:

(170259 row(s) affected)
Table ' CMPASOCIADOS'. Scan count 1, logical reads 2162, physical reads 0, read-ahead reads 0.
Table ' TRANSAC'. Scan count 1, logical reads 1889, physical reads 0, read-ahead reads 24.
Table ' TIPOSCMP'. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 0.
Table ' TALONARIOS'. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 0.


As we can observe, the improvement is evident. We have passed from 31004 logical reads to 1889 in the TRANSAC table.

 

The Same Analysis Using the SQL Server 2005 Database Tuning Advisor (DTA)

Now, I wanted to see how the DTA would analyze the same query. First, I removed the indexes added in the previous step, then analyzed the same query and data using the DTA. In this case, the execution plan looked like this:



The statistics corresponding to the execution of the query were:

Table ' TRANSAC'. Scan count 1, logical reads 31004, physical reads 0, read-ahead reads 31008.
Table ' CMPASOCIADOS'. Scan count 1, logical reads 8482, physical reads 19, read-ahead reads 4482.
Table ' TIPOSCMP'. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 2.
Table ' TALONARIOS'. Scan count 1, logical reads 2, physical reads 2, read-ahead reads 0.
(170259 row(s) affected)


It’s possible to observe that the differences between the statistics of the query executed without optimizing are minimal, which was expected. Later, I executed the DTA and it suggested the following indexes with an expected improvement of 78%.

CREATE NONCLUSTERED INDEX [ IXC2005_TRANSAC_6_98099390__K10_K30_K81_K1_K2_K105_K3_K55 ] ON [ dbo ].[ TRANSAC ]
(
[ NROTRANSELIM ] ASC,
[ CODSUC ] ASC,
[ CODEMP ] ASC,
[ NROTRANS ] ASC,
[ DATE ] ASC,
[ NROTRANSCTRL ] ASC,
[ CODCMP ] ASC,
[ NROTRANSAUT ] ASC
)
CREATE NONCLUSTERED INDEX [ IXC2005_CMPASOCIADOS_6_437576597__K3_K1_K2_K8_K7 ] ON [ dbo ].[ CMPASOCIADOS ]
(
[ CHECKBOOK ] ASC,
[ NROTRANS ] ASC,
[ CODCMP ] ASC,
[ NUMEROEXT ] ASC,
[ PREFIJOEXT ] ASC
)


<< Prev Page     Next 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