DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: How to know the actual size of a row

  1. #1
    Join Date
    Dec 2002
    Posts
    62

    How to know the actual size of a row

    Hi All,
    I want to know
    1. The size of a table in bytes.
    2. Size of the actual data in the table ( in bytes).
    3. If I enter 5 rows in it , how much does it increase (in bytes).

    Will anybody help me out .

    Thanks in advance.

  2. #2
    Join Date
    Apr 2002
    Location
    Shenzhen, China
    Posts
    327

    Re: How to know the actual size of a row

    Originally posted by ayushsingh

    1. The size of a table in bytes.
    2. Size of the actual data in the table ( in bytes).
    3. If I enter 5 rows in it , how much does it increase (in bytes).
    DBMS_STATS.GATHER_TAB_STATS
    Oracle Certified Master - September, 2003, the Second OCM in China
    *** LOOKING for PART TIME JOB***
    Data Warehouse & Business Intelligence Expert
    MCSE, CCNA, SCJP, SCSA from 1998

  3. #3
    Join Date
    Dec 2002
    Posts
    62
    hi Calvin,
    Thanks for a quick reply.

    Isn't it possible to get these figures via some data dictionary views (like dba_segments.bytes)

  4. #4
    Join Date
    Apr 2002
    Location
    Shenzhen, China
    Posts
    327
    Dictionary View can answer your first question.
    Oracle Certified Master - September, 2003, the Second OCM in China
    *** LOOKING for PART TIME JOB***
    Data Warehouse & Business Intelligence Expert
    MCSE, CCNA, SCJP, SCSA from 1998

  5. #5
    Join Date
    Sep 2001
    Posts
    37
    After Analyze your tables computing statistics.. you can check DBA_TABLES.

    Fields relevant for you analysis will be:
    BLOCKS
    EMPTY_CLOCKS
    NUM_ROWS
    AVG_ROW_LEN

    and your
    DB_BLOCK_SIZE

    Only do the math for your requirements...

  6. #6
    Join Date
    Feb 2003
    Location
    Mumbai, India
    Posts
    10
    Hi,
    to find the actual size of data in table,
    1) analyze the table to compute statistics
    2) retrieve these column data among others: num_rows, avg_row_len, empty_blocks
    3) > select num_rows*avg_row_len from user_tables where table_name='your table';

    Hope this will help you,

    Kiran

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