Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Indexes & Statistics

Author  Topic 

kmurlikrishna
Starting Member

23 Posts

Posted - 2007-01-14 : 08:23:38
1) We have SQL Server 2005 database on windows 2003 server.
2) We have CREATE INDEX & CREATE STATISTICS.
3) For indexes, we can query sysindexes. What about statistics? Are these objects since there is a CREATE & corresponding DROP.
4) Does creating indexes also create statistics & if so do we have to drop both of them. If we just drop index, will the corresponding left over statistic will have any effect.
5) How do indexes on individual PK, FK & other columns based on observation compare against indexes and statistics suggested by index tuning advisor?

nr
SQLTeam MVY

12543 Posts

Posted - 2007-01-15 : 03:59:26
4) Yes - creating the indexes will update the statistics.
5) Not sure what you mean. The tuning advisor suggests indexes that aren't already there - they may be useful or not - note the suggestion is for the queries being optimised it may be detrimental to more important things.
3) Statistics are also in sysindexes - have a look and you will see them.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

TRACEYSQL
Aged Yak Warrior

594 Posts

Posted - 2008-09-18 : 18:19:52
4...Creating indexes updates the statistics
Do you know when you run the alter reindex what % it uses

As the UPDATE STATISTICS can be with full scan and sample 50 percent
10 percent.

If you turn off auto statitics and run index rebuild for the 30% fragmentation ...

What do you think is the best method to run the UPDATE STATISTICS
with.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-09-18 : 20:52:15
DONOT run update statistics after running Rebuild index. That will degrade your performance
Go to Top of Page
   

- Advertisement -