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 2000 Forums
 SQL Server Administration (2000)
 Identify which index is rebuilt

Author  Topic 

Hippi
Yak Posting Veteran

63 Posts

Posted - 2005-06-29 : 19:46:38
Hey folks,

I need to write a T-SQL script to check which indexes are rebuilt.
Do you guys know if that kind of infomation is stored anywhere?

Thanks,
HP.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-06-29 : 19:58:14
I am not sure that this information is stored anywhere, but why does it matter? DBCC SHOWCONTIG will show you if they need to be rebuilt.

Tara
Go to Top of Page

paulrandal
Yak with Vast SQL Skills

899 Posts

Posted - 2005-06-29 : 20:01:29
quote:
Originally posted by tduggan

I am not sure that this information is stored anywhere, but why does it matter? DBCC SHOWCONTIG will show you if they need to be rebuilt.

Tara



Slight correction - use the output from DBCC SHOWCONTIG _and_ knowledge of whether removing the fragmentation will have any affect on query performance - e.g. singleton lookups are not affected by fragmentation. Checkout the following whitepaper for a bunch of info on fragmentation:

http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx

Thanks

Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-06-29 : 20:04:38
I used to refer to that article. It is well worth reading the entire thing. Due to it, we no longer reindex as often as we were.

Tara
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-06-30 : 01:09:00
quote:

http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx


Paul, that link does not work and giving "The page cannot be found error"

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

AndyB13
Aged Yak Warrior

583 Posts

Posted - 2005-06-30 : 01:49:05
madhivanan
It works OK for me, so it maybe your browser/settings (I'm using IE6 SP2)

Andy

Beauty is in the eyes of the beerholder
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-06-30 : 02:48:34
I am using IE6 SP1
Have I to update to SP2?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

AndyB13
Aged Yak Warrior

583 Posts

Posted - 2005-06-30 : 03:29:28
I wouldnt of thought so, but it might be worth a try

Andy

Beauty is in the eyes of the beerholder
Go to Top of Page
   

- Advertisement -