sys.dm_db_index_physical_stats
contains column avg_page_space_used_in_percent
.
How does this fit in with the fill factor of an index?
For example:
I have index idx_HeaderInfo
I create the index with a fill factor of 80%
.
If I then immediately look at avg_page_space_used_in_percent do I see:
100
80
I ask because I need a way of rebuilding or reorganising based on internal fragmentation rather than external and I don't want to create logic to rebuild/reorg if a avg_page_space_used_in_percent < 75 if the fill factor in the first place is 70 for instance.
avg_fragmentation_in_percent
why are you using other column details% of page (8K)
, not% of (8K * fill factor / 100)
. Did you try it? Seems like a simple test.