sp_spaceused2

  • Joe Chang

    SSC Rookie

    Points: 44

    Comments posted to this topic are about the item sp_spaceused2
    updated version here 
    http://www.qdpma.com/SQL/sp_spaceused2.html
    the join to sys.dm_db_partition_stats may work better with a HASH JOIN hint, for SQL Server version 2014,
    or it could be that the join using object_id + index_id + partition_number might be better

    sp_spaceused2 is an extension of the system procedure sp_spaceused
    default is database total and individual tables,
    type, schema, table/view, clustered index key, 
    Rows, Reserved, Data, lob, Index, Unused, Average Bytes/Row, Clustered index (Y/N), number of unique indexes, Xml, Spatial, column store, memory optimized indexes
    number of statistics, key count, compressed indexes, partitions, 
    index usage, dataspace id, lob dataspace, foreign key references, foreign keys, triggers, 
    etc.

  • PAH-440118

    Ten Centuries

    Points: 1130

    Not sure if I am missing something but please can you explain what the script does so I can understand what it is for.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply