System dmv to return table/index size

  • Anyone know of a system DMV that will provide the table size and index size of a given table based on either the table name or objectID. ?

    I did look but around but couldn't find anything that just spit out the entire table size. I ended up going into ssms and right clicking on the table properties.

  • Forget it. I found it. sp_spaceused 'tablename'

    Mods you may delete this post if you wish.

  • sys.partitions or sys.dm_db_partition_stats.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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