| Andrew J. Kelly 2005-07-20, 1:23 pm |
| What do you mean by 2x less effective? Did you have plenty of free space in
the database before you issued the DBCC DBREINDEX? If not then the files
would have had to grow, probably multiple times. This can be a real
performance issue and you should always ensure you have plenty of free space
at all times. Never shrink the files after you do a reindex or you just
waste the effort in the first place. You can not recreate the indexes in
the manor you indicate and should not try. DBCC DBREINDEX is usually the
best method to deal with reindexing all the indexes on a table.
--
Andrew J. Kelly SQL MVP
"benamis" <nera@meilo.lt> wrote in message
news:u9%23Wj6TjFHA.576@TK2MSFTNGP15.phx.gbl...
> hi
>
> maybe someone has a script which recreates the indexses on db?
>
> i think the best way is to use
>
> CREATE unique INDEX
> WITH DROP_EXISTING
>
> and the procedure sp_MSforeachtable
>
> the problem is that i don't know how to "join" these 2 options as every
> table has lots of indexses...
>
> currently i use this:
>
> exec sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?')"
>
> but it is 2x less effective as "CREATE unique INDEX WITH DROP_EXISTING"
>
>
> thanx
>
> P.S. i am not too good in sql programing :)
>
|