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
 General SQL Server Forums
 New to SQL Server Programming
 index rebuild index defragmentation

Author  Topic 

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2008-07-18 : 03:10:40
Dear All,
I'm very happy with the index rebuild script (isp_alterindex procedure)given by our SQL Goddess TARA.
now i've one doubt in my mind that...
as my environment is 24x7 and it is an emergency environment, and per day approxmately 60,000 rows are inserting into that database,
which way can i use the procedure....defragmentation? or rebuild?

which makes the taks to be done without downtime?

Arnav
Even you learn 1%, Learn it with 100% confidence.

sachinsamuel
Constraint Violating Yak Guru

383 Posts

Posted - 2008-07-18 : 05:51:44
You can go for online defragmentation. I think Tara has already posted scripts for the same. Its a smart defragmentaion script, and depending upon the fragmentaion level it defragments.

Don't sit back because of failure. It will come back to check if you still available. -- Binu
Go to Top of Page

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2008-07-18 : 06:07:48
what exactly the difference between defragmenatation and online defragmentation....

Arnav
Even you learn 1%, Learn it with 100% confidence.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-18 : 08:06:44
Online reindexing is new featur in SQL 2005. It creates a snapshot of existing table and uses lots of row versioning. Thats why it uses lots of TempDb space and takes long time as well but it is online as compared to other one.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-07-18 : 12:39:13
60,000 rows per day into a database is not as active as you might think. Try having an environment with millions inserted each day. We do REBUILD nightly using my script. If you are using Enterprise edition, then my script automatically does online reindex where possible.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-07-19 : 13:21:55
Online indexing has restrictions, doesn't work on every table every index.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-07-19 : 14:38:15
And my script handles those situations.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -