Results 1 to 2 of 2

Thread: Largest tables

  1. #1
    Join Date
    Feb 2003
    Location
    Brisbane, Australia
    Posts
    110

    Unanswered: Largest tables

    Hi,

    Is there an easier way to determine which tables in a db are the largest other than running sp_spaceused for each table? Interested mainly in physical size.

    Thanks

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Run DBCC UPDATEUSAGE to bring your statistics up to date, then you can use:
    PHP Code:
    SELECT so.nameSum(si.reserved)
       
    FROM dbo.sysobjects AS so
       JOIN dbo
    .sysindexes AS si
          ON 
    (si.id so.id)
       
    ORDER BY 2 desc
    for a good estimate.

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •