Solved

_WA_SYS statistics created - should you index on these as well

Posted on 2006-10-26
2
1,554 Views
Last Modified: 2008-01-09
We have a number of WA_SYS statistics created (auto on) against tables. Is it wise to create indexes for these fields listed in the WA_SYS if you dont have them setup already. This is a DSS environment.

Thnaks

Paul
0
Comment
Question by:Paul_Blackler
2 Comments
 
LVL 21

Assisted Solution

by:Kevin3NF
Kevin3NF earned 200 total points
ID: 17814211
I wouldn't blindly go create an index just because the system did it.  I would rather do some investigating and (SQL) profiling to see where my perf can be improved and create indexes there if necessary.
0
 
LVL 10

Accepted Solution

by:
AaronAbend earned 300 total points
ID: 17814602
Be careful - statistics are used by the optimizer to choose the path for the query - they are not actually used to execute the query itself.  

A lot of small, low cardinality columns will be scanned by the optimizer and stats will be created. You do not want indexes on these columns because their low cardinality (low number of values) means an index will not help much (imagine a table of states that also includes the country but there is only one value for country - indexing country does not help your query performance).

Check the strategies and base your indexes on what the strategies are doing. If you see time consuming tablescans, definitely create indexes to prevent that from happening.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question