build a script to reindex all my tables
Tks
DavePDaveP (dvs_bis@.sbcglobal.net) writes:
Quote:
Originally Posted by
where can i find a example on how to
build a script to reindex all my tables
http://www.google.se/search?hl=sv&q...=S%C3%B6k&meta=
You could also look in Books Online for the definition of sysindexes and sysobjects if you are on SQL 2000 or sys.objects and sys.indexes if you
are on SQL 2005.
One thing to be careful with is that if fragmentation is below 30%, there is
not so much to gain with reindexing, so adding some intelligence to handle
this may be worth it. I don't have any example at hand, but the hits on
Google may give you something.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||thank you much erland
"Erland Sommarskog" <esquel@.sommarskog.sewrote in message
news:Xns99AAF398D854AYazorman@.127.0.0.1...
Quote:
Originally Posted by
DaveP (dvs_bis@.sbcglobal.net) writes:
>
Quote:
Originally Posted by
>where can i find a example on how to
>build a script to reindex all my tables
>
http://www.google.se/search?hl=sv&q...=S%C3%B6k&meta=
>
You could also look in Books Online for the definition of sysindexes and
sysobjects if you are on SQL 2000 or sys.objects and sys.indexes if you
are on SQL 2005.
>
One thing to be careful with is that if fragmentation is below 30%, there
is
not so much to gain with reindexing, so adding some intelligence to handle
this may be worth it. I don't have any example at hand, but the hits on
Google may give you something.
>
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
No comments:
Post a Comment