• My current employment only uses purchased software. I find it amazing how many vendors do not create their indexes with a fill factor (other than the default). The default is zero (or 100 percent filled). If you have a data warehouse, read only table, or a table whose primary key is in ascending sequence, then that is fine (unless there are a lot of updates to the ascending sequence table). Otherwise, start with a minimum of 90% fill (or 10% free space). You will find that there will be a lot less need to reorg/rebuild indexes. Saying this in a slightly different way, there will be a lot less fragmentation during the day. Monitor your database periodically. If it still gets fragmented too quickly, lower the fill factor.

    Here is what I run to check index fragmentation for the databases on myserver. You can tweak it according to your shop's environment:

    USE master

    GO

    SELECT DB_NAME(database_id) AS 'DBName'

    ,OBJECT_SCHEMA_NAME(ips.OBJECT_ID, database_id) AS 'SchemaNm'

    ,OBJECT_NAME(ips.OBJECT_ID, database_id) AS 'TabName'

    ,OBJECT_ID AS 'ObjectID'

    ,ips.index_id AS 'IndexID'

    ,CAST (avg_fragmentation_in_percent AS decimal(4,2)) AS 'AvgFrag%'

    ,page_count AS 'PageCount'

    FROM sys.dm_db_index_physical_stats (NULL, NULL, NULL, NULL, 'Limited') ips

    WHERE page_count > 1000

    AND index_type_desc <> 'HEAP'

    AND avg_fragmentation_in_percent > 2.5

    ORDER BY DBName

    , SchemaNm

    , OBJECT_NAME(ips.OBJECT_ID, database_id)

    , IndexID, [AvgFrag%] desc;