Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

What's the value of avg_page_space_used_in_percent when checking heap fragmentation?

$
0
0

Hi All,

I see that the avg_page_space_used (returned from sys.dm_db_index_physical_stats) value for one of my heap tables is high (99.4924), but I don't quite understand the meaning of this value for a heap.  If every row of a heap is inserted into any page where the engine can find ample space, what's the use of knowing the page space used percentage for those pages? 

The query result seems to be telling me that, of the pages where at least one of my heap rows has been inserted, there is very little wasted space. 

What good is knowing the page usage percent if my table is a heap and the rows are scattered all willy-nilly?  If I have only one row of my heap table in a page, what use is it to know the percentage of that page space being used?  How is that value even remotely useful?  Seems like the column shouldn't even get returned when I'm checking for fragmentation on a heap.

Thanks for your help!

-Eric


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>