|
DBReindex is used to reindex the entire sql server database. It will flush out the indexes and create new index in the leaf level. Thats why its considered as very effective in improving the performance of our database. The syntax is,
dbreindex(tablename,indexname, fillfactor)
In the older version of sql server, there is an another option called "sorteddatareorg" which is mainly used to enhance the speed of index creation. But, its dropped in the future versions of sql server. Ex: dbcc dbreindex(tblname,'',0,sorteddatareorg)
After executing the above command, some dba's used to execute sp_recompile option.
sp_recompile tblname
But, practically speaking we dont want this statement after dbreindex command. Because, if the index or statistics got affected. Obviously sp_recompile option will get fired.
|
|
Comments
Post a Comment