Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005
    Posts
    30

    Question Unanswered: how to get realistic table size

    Hi, I would like to know how is the acutal table size , is there any command i can use to check for it? (I use oncheck -pc dbname:tablename, but not sure).


    Another question : if i create a table with 10 fields, include all kinds of data type. But actually a lot of records which are inserted with null value for most of fields, does these null value also take place in harddisk?
    Last edited by meiwen; 06-09-06 at 11:10. Reason: more accurate

  2. #2
    Join Date
    May 2004
    Location
    New York
    Posts
    248
    Extent Sizes

    -- NOTE: if you page size is 4096 change the "* 2 { Your systems page " to 4
    -- if you growth factor is greater the 20% per year make the nessary
    -- changes.

    database sysmaster;

    select dbsname,
    tabname,
    count(*) num_of_extents,
    sum (pe_size ) pages_used,
    round (sum (pe_size )
    * 4 { Your systems page size in KB }
    * 1.2 { Add 20% Growth factor })
    ext_size, { First Extent Size in KB }
    round (sum (pe_size )
    * 4 { Your systems page size in KB }
    * .2 { Estimated 20% Yearly Growth })
    next_size { Next Extent Size in KB }
    from systabnames, sysptnext
    where partnum = pe_partnum
    group by 1, 2
    order by 3 desc, 4 desc;

Posting Permissions

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