| Author |
Topic |
|
Goldmember
Starting Member
9 Posts |
Posted - 2008-06-22 : 18:59:45
|
| What functions of tools do you use for managing index fragmentation?DBCC?I am working through MS Press SQL 2005 book and it mentions thesys.dm_db_index_physical_stats function? It then give an example of code which is very involved.Does anybody use this function?Thanks |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-06-22 : 19:24:14
|
| You can use it or 'dbcc showcontig' to check index fragmentation. |
 |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2008-06-23 : 01:43:09
|
| The idea is that "sys.dm_db_index_physical_stats" will replace DBCC SHOWCONTIG .Jack Vamvas--------------------Search IT jobs from multiple sources- http://www.ITjobfeed.com |
 |
|
|
Ola Hallengren
Starting Member
33 Posts |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-06-23 : 13:30:41
|
quote: Originally posted by rmiao You can use it or 'dbcc showcontig' to check index fragmentation.
From BOL:quote: Important: This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Use sys.dm_db_index_physical_stats instead.
Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
|
jeffdavid
Starting Member
8 Posts |
Posted - 2008-06-24 : 10:14:59
|
| hi, new to SQL Server. How do you determine whether to rebuild or reorganize indexes? |
 |
|
|
Ola Hallengren
Starting Member
33 Posts |
|
|
jeffdavid
Starting Member
8 Posts |
Posted - 2008-06-24 : 11:07:32
|
| thanks! |
 |
|
|
jeffdavid
Starting Member
8 Posts |
Posted - 2008-06-27 : 10:04:21
|
| Ola, Thank you so much. I read that article and it helped a lot. I was able to reorganize quite a few indexes. I reorganized the example query on that page to work for my database. However, upon running it, the results came back with some highly fragmented indexes, but null values in the name column. Is there another way to find out which indexes these are? |
 |
|
|
Ola Hallengren
Starting Member
33 Posts |
|
|
|