Re: index tuning

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Mark Allison (marka_at_no.tinned.meat.mvps.org)
Date: 07/14/04


Date: Wed, 14 Jul 2004 08:59:04 +0100

dimitris,

The index tuning wizard should be used as a guide, not as a tool for
creating your indexes. I would run a trace on this table over a typical
working day, and find the top 10 most intensive queries against this
table based on IO and CPU, and possibly duration.

Find out what the SARGs are for these queries and make sure you are
indexed for these SARGs. To do this check the WHERE clauses of the
queries. The clustered index should be placed on a narrow column and
chosen very carefully. Try to place it on a FK column, or a column where
range queries are performed, or one where there are frequent ORDER BY
clauses.

Test your new queries in a test environment, don't do this in
production. Benchmark your results so you can compare what works against
what doesn't.

--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
dimitris wrote:
> Hi,
> 
> I have a very large table that holds all the ledger transactions. Its the
> number 1 table that gets hit when posting invoices, etc, etc. It started
> with 5 indexes that the developers did. I have been running traces that are
> fed to the index tuning wizzard and now over the last 3 months it has
> generated about 20 new indexes, one is clustered. No significant performance
> is noticed, rather the opposite. What do I do now? Please help,
> Regards,
> 
> 


Relevant Pages

  • I asked about DBI tracing a while ago
    ... A while ago I asked a question about how do I trace what SQL queries ... (please do not mention setting trace on on DBI, it does not do what I ... to speed it up 3 times by using better SQL and calling SQL less often. ... sub prepare { ...
    (comp.lang.perl.misc)
  • Optimizer index considerations.
    ... I have conducted an index tuning session for a small set of medium sized ... consolidate the results in the end, I analyzed the queries and created about ... I extracted all the indexes that were used from the plans and found out that ... I conducted a benchmark of the new index set and to my great surprise, ...
    (microsoft.public.sqlserver.programming)
  • Performance problem
    ... I used the sql profiler to trace the slow queries. ... all queries executes fast enough(10 ...
    (microsoft.public.sqlserver.programming)
  • Re: SQL Profiler
    ... what is the minimum time to run ... the sql profiler to caputure all queries in the trace ... I disagree w/the degradation of performance during the trace ... queries in the trace, once you select stop it queues up the remaining ...
    (microsoft.public.sqlserver.dts)
  • Re: Performance problem
    ... restart computer but someone could explain why this happens all of ... If you know the problem is with some specific queries, ... If they are Oracle ... processes you should be able to trace them back to specific sessions ...
    (comp.unix.aix)