Saturday, February 25, 2012

dbcc dbreindex and tables with no clustered index

i have tables in my data base with no clustered indexes just some non
clustered ones. is there any benefit to running dbcc dbreindex on
these tables?
DBCC DBREINDEX will not do anything for your heap (data pages in a table without a clustered index).
It can defrag your non-clustered indexes, though. See
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx for elaboration.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Derek" <gepetto_2000@.yahoo.com> wrote in message
news:1178199551.534111.4840@.h2g2000hsg.googlegroup s.com...
> i have tables in my data base with no clustered indexes just some non
> clustered ones. is there any benefit to running dbcc dbreindex on
> these tables?
>
|||Derek wrote:
> i have tables in my data base with no clustered indexes just some non
> clustered ones. is there any benefit to running dbcc dbreindex on
> these tables?
If any of your nonclustered indexes covers 100 disk pages or more, and
it is highly fragmented, and you have some SELECTS that require a full
or partial index scans, then yes, it could be beneficial. Otherwise you
probably won't see any difference.
Please note that a nonclustered index usually occupies only a few
percent when compared to the table size. So you would have to have a
really big table, or a very wide nonclustered index to notice any
effect.
HTH,
Gert-Jan

No comments:

Post a Comment