Table Fragmentation

  • How should I check fragmenting of the table and how can i defragment that ?

  • You can check by executing dbcc showcontig on the database and then execute dbcc dbreindex command.

    Check books online for more details.

    SQL DBA.

  • dbcc showcontig in fact shows you the table fragmentation, but dbcc indexdefrag defrags the index, not the table, so the question is.. How do I defrag a table?

    I am looking for the answer on internet but there aren´t good answers, i think the solution is recreating the table on a different filegroup.

  • Do you have clustered index on this table? If you do, you can reindex that clustered index and it will reorg the table. If you don't, create a clustered index on the table. That will reorganize the table. Then drop the clustered index.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply