Results 1 to 10 of 10

Thread: Table Size ;

  1. #1
    Join Date
    Nov 2005
    Posts
    19

    Unanswered: Table Size ;

    Hi all,

    How can I find the exact size in the disk occupied by a TABLE ?

    When I execute "sp_spaceused" it returns the following parameters for a table

    reserved
    data
    index_size
    unused

    Which of the parameters I should consider to calculate the exact space occupied by the table.

    Thanks in advance,

    Hari Haran Arulmozhi

  2. #2
    Join Date
    Dec 2004
    Posts
    46
    reserved is the occupied phy disk space

  3. #3
    Join Date
    Nov 2005
    Posts
    19

    Table Size;

    Ronin,

    Thanks a lot !!

    Hari Haran Arulmozhi

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    ah, but does that really answer the question? Are you looking for how much data you actually have in the table?

    That would be rowsize * # of rows
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Ah, not necessarily. What is "rowsize" when using varchar?

    Reserved: amount of space set aside for the table.
    Data: amount of space actually used to store data.
    Index: amount of space actually used to store indexes.
    Data + Index: Amount of space actually used.

    And of course, if you are using text or image fields, then all calculations go out the window.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  6. #6
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    I sit humbly corrected.

    Is it 5:00 yet?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  7. #7
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Not yet, DB2/OS390-boy.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  8. #8
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Quote Originally Posted by blindman
    Not yet, DB2/OS390-boy.

    Hey, what's with the insults?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  9. #9
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    I do believe there is an offset to add to each rowsize as well. it is delaney's book which I lent to one of the kids here.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  10. #10
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Quote Originally Posted by Brett Kaiser
    Hey, what's with the insults?
    I meant that in a nice way.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

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