ceiling(sum(pg_alloc)*1.00/ext_size*100.00/count(*)) as '表空间使用比率'
from ExtentInfo
group by fileid,obj_id,index_id,partition_id,ext_size
order by partition_id,obj_id,index_id,fileid
--删除临时表
drop table #ExtentInfo
END
GO