How can calculate a table actual size ?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: How can calculate a table actual size ?

  1. #1
    Join Date
    Jul 2000
    Posts
    6
    Hi all,
    I want to find the way to fix out this problem as title .
    if you have got the good idea and solution please kindly
    help me .
    thanx
    dannier

  2. #2
    Join Date
    Jun 2000
    Posts
    104
    get the values of num_rows and avg_row_size from dba_tables,after computing statistics of the table,
    size=num_rows*avg_row_size+some space for headers

  3. #3
    Join Date
    Jul 2000
    Posts
    6
    Hi drishti,
    Thanks a lot .
    dannier

  4. #4
    Join Date
    Aug 2000
    Location
    York - England
    Posts
    33
    May I just add if you have computed statistics on the table and your optimiser mode is rule your performance could be completey foobar'd

    If the Optimiser mode is rule then ANALYZE TABLE TABLE_NAME DELETE STATISTICS

    If the optimiser mode is choose you may need to analyze some or all of the other tables
    I hope this helps
    Allan
    :p :p :p

  5. #5
    Join Date
    Nov 2000
    Posts
    79
    After Analyzing the table, calulate the no of blocks and multiply by block size.

    SELECT COUNT(DISTINCT(SUBSTR(ROWID,1,8)||SUBSTR(ROWID,15,4))) BLKS FROM TABLE_NAME ;

    size = BLKS * BLOCK_SIZE


  6. #6
    Join Date
    Nov 2000
    Posts
    79
    Another Method

    After Analyzing the table, calulate the no of blocks and multiply by block size.

    SELECT COUNT(DISTINCT(SUBSTR(ROWID,1,8)||SUBSTR(ROWID,15,4))) BLKS FROM TABLE_NAME ;

    size = BLKS * BLOCK_SIZE


  7. #7
    Join Date
    Jul 2000
    Posts
    6
    Hi gtm,
    Thanx a lot .
    dannier

Posting Permissions

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


Click Here to Expand Forum to Full Width