Re-indexing SQL Server Best practice

This is a discussion on Re-indexing SQL Server Best practice within the sqlserver-datawarehouse forums in Data Warehousing category; 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!...

Go Back   Database Forum > Data Warehousing > sqlserver-datawarehouse

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-22-2008, 04:07 PM
Default Re-indexing SQL Server Best practice

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!
Reply With Quote
  #2  
Old 07-23-2008, 07:03 AM
Default RE: Re-indexing SQL Server Best practice

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!

Reply With Quote
  #3  
Old 07-23-2008, 02:14 PM
Default RE: Re-indexing SQL Server Best practice

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!

Reply With Quote
  #4  
Old 07-25-2008, 12:40 PM
Default RE: Re-indexing SQL Server Best practice

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!

Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 02:33 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.