| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| Can anyone tell me what the best practice is to reindexing a SQL-Server 2005 database that has an extensive number of deletions to it. Thank you, Al -- Pentru Noi Doar UTA Conteaza! FORZA UTA! And a very very distant second is a Ferrari! |
|
#2
|
| make it with maitanace plan use Rebuild Index Task if U want to script it use View Tsql "Al" wrote: > Can anyone tell me what the best practice is to reindexing a SQL-Server 2005 > database that has an extensive number of deletions to it. > > Thank you, > > Al > -- > Pentru Noi Doar UTA Conteaza! > FORZA UTA! > And a very very distant second is a Ferrari! |
|
#3
|
| Al: Technically, you don't re-index an entire database, you drop and re-create, rebuild, or reorganize indexes on individual tables. But you probably already knew that. Books On Line has a good sample script that will query the Dynamic Management View "sys.dm_db_index_physical_stats" and look for and rebuild or reorganixe indexes that are needing attention. Over 30% fragmentation and an index should be rebuild. ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/d294dd8e-82d5-4628-aa2d-e57702230613.htm HTH -- Todd C [If this response was helpful, please indicate by clicking the appropriate answer at the bottom] "Al" wrote: > Can anyone tell me what the best practice is to reindexing a SQL-Server 2005 > database that has an extensive number of deletions to it. > > Thank you, > > Al > -- > Pentru Noi Doar UTA Conteaza! > FORZA UTA! > And a very very distant second is a Ferrari! |
|
#4
|
| I have a stored procedure that works a little differently than the script in Books Online. Please use it if you like. http://blog.ola.hallengren.com/blog/...1/3440068.html Ola Hallengren http://ola.hallengren.com "Todd C" wrote: > Al: > Technically, you don't re-index an entire database, you drop and re-create, > rebuild, or reorganize indexes on individual tables. But you probably already > knew that. > > Books On Line has a good sample script that will query the Dynamic > Management View "sys.dm_db_index_physical_stats" and look for and rebuild or > reorganixe indexes that are needing attention. > > Over 30% fragmentation and an index should be rebuild. > > > ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/d294dd8e-82d5-4628-aa2d-e57702230613.htm > > HTH > -- > Todd C > > [If this response was helpful, please indicate by clicking the appropriate > answer at the bottom] > > > "Al" wrote: > > > Can anyone tell me what the best practice is to reindexing a SQL-Server 2005 > > database that has an extensive number of deletions to it. > > > > Thank you, > > > > Al > > -- > > Pentru Noi Doar UTA Conteaza! > > FORZA UTA! > > And a very very distant second is a Ferrari! |
![]() |
| Thread Tools | |
| Display Modes | |