Finding Avg Row Length size

Hi All,
How we can find Avg row length size of a table, without inserting data into a table. This is required to basically estimate table size (roughly). We might need to this for at least 100+ tables.
regards,
vara

The average row length depends on the data you are inserting into the table.
You can easily compute an approximation of the max row length from Oracle’s data dictionary:
select
  table_name ,
  sum(data_length)
from
  user_tab_columns
group by
  table_nameLet’s say we have a table with a number(10) and a varchar2(1000) column. For a data set where the varchar2 column contains at least 900 characters we would get average row size of 900+. For the same table, but with another data set where the varchar2 column has fewer than 50 characters, we would get average row size of less than 100.
Iordan Iotzov
http://iiotzov.wordpress.com/

Similar Messages

  • Finding table row length using javascript in oa framework

    hi all,
    Can anybody suggest some idea to find out the table row length in js... but i had read the values by
    document.getElementByid('N3:checval:'+i).value etc etc.
    so can suggest me how to get the table row length in js or where can i find some examples on tables with javascript events associated with that.
    this is urgent..

    hi,
    Let me know ur target and what js function u have written for it. If you need to ask... getting no.of rows in js.... u can write in js :
    table=document.getElementById(<table id>);
    alert("rows>>"+table.rows.length);
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to find accurate number of Rows, and size of all the tables of a Schema

    HI,
    How to find the accurate number of Rows, and size of all the tables of a Schema ????
    Thanks.

    SELECT t.table_name AS "Table Name",
    t.num_rows AS "Rows",
    t.avg_row_len AS "Avg Row Len",
    Trunc((t.blocks * p.value)/1024) AS "Size KB",
    t.last_analyzed AS "Last Analyzed"
    FROM dba_tables t,
    v$parameter p
    WHERE t.owner = Decode(Upper('&1'), 'ALL', t.owner, Upper('&1'))
    AND p.name = 'db_block_size'
    ORDER by 4 desc nulls last;
    ## Gather schema stats
    begin
    dbms_stats.gather_schema_stats(ownname=>'SYSLOG');
    end;
    ## Gather a particular table stats of a schema
    begin
    DBMS_STATS.gather_table_stats(ownname=>'syslog',tabname=>'logs');
    end;
    http://www.oradev.com/create_statistics.jsp
    Hope this will work.
    Regards
    Asif Kabir
    -- Mark the answer as correct/helpful

  • How to find Tuple(row) size in a Data Block

    hi,
    I want to find out the size of 1 row and total size of a table in a data block in Oracle 11g. For Example I've a Employee table with 300 rows. I want to find out how much space these rows are occupying in a data block (8192 default) and also the size of 1 individual row.
    I'll appreciate the valuable suggestions.
    Thanks alot.
    Regards,
    Kamran

    Hi,
    Welcome to the forum!
    See [Calculating Oracle average row length|http://www.dba-oracle.com/t_average_row_length.htm], I hope it helps
    Regards,

  • Average Row length in a table

    Hi All,
    I am new to oracle and I have to find the average row length for all tables in a schema.
    Could anyone please help me.
    What is the difference between data length and row length.
    Thanks in advance
    Anu
    Message was edited by:
    user448373

    look at dba_tables

  • Retrieve table row length

    The 'Add' button lets the user dynamically add/remove of table rows.
    I tried passing the value using hidden field but failed. How can I pass the table # of rows back to the servlet, and I also have problems getting the value from the new row created by the script. Please enlighten ASAP!
          <script language="JavaScript" type="text/javascript">
            function addRowToTable()
            var tbl = document.getElementById('albumDetailsTbl');
            var lastRow = tbl.rows.length;
            var iteration = lastRow;
            var row = tbl.insertRow(lastRow);
            // SN cell
            var cellLeft = row.insertCell(0);
            var textNode = document.createTextNode(iteration);
            cellLeft.appendChild(textNode);
            // Song Title cell
            var songTitle = row.insertCell(1);
            var el = document.createElement('input');
            el.setAttribute('type', 'text');
            el.setAttribute('name', 'songTitle_' + iteration);
            el.setAttribute('id', 'songTitle_' + iteration);
            el.setAttribute('width', '150');
            songTitle.appendChild(el);
            // Composer cell
            var composer = row.insertCell(2);
            var el = document.createElement('input');
            el.setAttribute('type', 'text');
            el.setAttribute('name', 'composer_' + iteration);
            el.setAttribute('id', 'composer_' + iteration);
            el.setAttribute('width', '150');
            composer.appendChild(el);
            // Lyricist cell
            var lyricist = row.insertCell(3);
            var el = document.createElement('input');
            el.setAttribute('type', 'text');
            el.setAttribute('name', 'lyricist_' + iteration);
            el.setAttribute('id', 'lyricist_' + iteration);
            el.setAttribute('width', '150');
            lyricist.appendChild(el);
            // Artist cell
            var artist = row.insertCell(4);
            var el = document.createElement('input');
            el.setAttribute('type', 'text');
            el.setAttribute('name', 'artist_' + iteration);
            el.setAttribute('id', 'artist_' + iteration);
            el.setAttribute('width', '150');
            artist.appendChild(el);
          </script>
        <form name="CreateAlbum_frm" method="post" action="/albumServlet">
          <input type="button" value="Add" onclick="addRowToTable();" />
            <table width="68%" border="1" align="center" cellpadding="1" cellspacing="1" id="albumDetailsTbl">
              <tr>
                <td width="29"><div align="center" class="style4 style2"><strong>SN</strong></div></td>
                <td width="150"><div align="center" class="style5 style2"><strong>Song Title </strong></div></td>
                <td width="150"><div align="center" class="style5 style2"><strong>Composer</strong></div></td>
                <td width="150"><div align="center" class="style5 style2"><strong>Lyricist</strong></div></td>
                <td width="150"><div align="center" class="style2 style5"><strong>Artist</strong></div></td>
              </tr>
              <tr>
                <td width="29"><div align="center">01</div></td>
                <td><input name="songTitle_0" type="text" id="songTitle_0"></td>
                <td><input name="composer_0" type="text" id="composer_0"></td>
                <td><input name="lyricist_0" type="text" id="lyricist_0"></td>
                <td><input name="artist_0" type="text" id="artist_0"></td>
              </tr>
            </table>
            <p align="center"></p>
            <table width="664"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="189"><div align="center"></div></td>
                <td width="41">�</td>
                <td width="106"><input type="reset" name="Reset" value="Clear All"></td>
                <td width="13"><div align="center"></div></td>
                <td width="158"><div align="center"><input name="createSave_jBut" type="submit" id="createSave_jBut" value="Create Album & Save"></div></td>
                <td width="157">�</td>
              </tr>
            </table>
          <p><input name="rowCount" type="hidden" value= albumDetailsTbl.rows.length /></p>
          </form>

    in my experience, you have to write a hack that goes something like this:
    declare int to hold number of rows
    do db search
    move cursor to last row (i forget the function call name, but you can find it)
    call getRow() or something to get the row number the cursor is on
    then you call findFirst or getFirst or sometihng to go back to start

  • How to I find out the photos SIZE in inches. It will give the the resolution

    How to I find out the photos SIZE in inches. It will give the the resolution of the image and the file size.

    In iPhoto, images don't have a size in inches until you use them. Until then it is just the pixel size. If you know the pixel size and resolution you calculate it this way:
    If the image size is 5184 x 3486 (like my Canon T3i, you divide the size in pixels by the resolution in pixels per inch to get the actual length, so for some common resolutions:
    Res Width Height
    --         5184     3486
    300      17.3      22.6  
    220       23.6     15.8
    72          72       48.4
    So, as you can see, iPhoto is probably correct in ignoring file size for most recent digital cameras. There is plenty of resolution for almost any size you want to print.

  • Need help to find the "leading point size"

    Hi,
    I need help to find the "leading point size".
    Any para style leading is more than 2 points of my font size, I need the alert message "Its more than 2 points for your font size". For instance my para font size is 10 here my leading should be 12 points rather than its 14 points, I need the alert message.
    Is this possible by script?
    by
    hasvi

    Hi Hasvi,
    Try this.
    var doc = app.activeDocument;
    var texts = doc.stories.everyItem().textStyleRanges.everyItem().getElements();
    var pstyle = "Following paragraph styles have more leadings:\r\r";
    for(var i=0;i<texts.length;i++)
        var ps = texts[i].pointSize;
        if(texts[i].leading > ps + 2)
            pstyle += texts[i].appliedParagraphStyle.name;
    alert(pstyle)
    If it is correct than mark the answer as correct and don't mark your question as correct answer.
    Regards,
    Chinna

  • Max Row Length

    I have a 9.2 instance and I was wondering if there was a max row length in my tables.

    Do you happen to have a small-ish test case the reproduces the problem? I can pretty much guarantee you that the database itself doesn't limit the size of the row, but I'm hard-pressed to imagine a cause for this sort of problem in the application stack.
    For sanity, you might try applying the latest patchsets to your client and server to see whether that magically fixes something.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Avg row len is always 6 bytes ?

    Hi ,
    I created a test table with ID as number(2), inserted bunch of rows (single digits), analyzed table and looked at avg_row_len, it shows 6 bytes. I repeated the same experiment with id as number(6), it made no difference.
    Doesn't the field size change the avg row len ?. Why does it need 6 bytes to store 2 digits?
    Thanks
    Vissu

    Doesn't the field size change the avg row len ?. Why does it need 6 bytes to store 2 digits?RTFM [url http://oraclesvca2.oracle.com/docs/cd/B10501_01/server.920/a96524/c13datyp.htm#784]Internal Numeric Format, [url http://oraclesvca2.oracle.com/docs/cd/B10501_01/server.920/a96540/functions167a.htm#80073]VSIZE, [url http://oraclesvca2.oracle.com/docs/cd/B10501_01/server.920/a96540/functions38a.htm#77280]DUMP, [url http://oraclesvca2.oracle.com/docs/cd/B10501_01/server.920/a96524/c11schem.htm#2747]Row Format and Size

  • How can I find out the screen size of the users moniter using the Acrobat SDK?

    How can I find out the screen size of the users moniter using the Acrobat SDK? I need to know how much sreen real estate that is available on the users moniter. Is there some call that I can make from the SDK to discover the maximun X and Y coordinates?
    Thanks,
    Gregory

    Currently, I am testing on multiple moniters and it is defaulting to the moniter designated as the #1 moniter. For our purposes, this is acceptable. Once the two documents have loaded, the user can move and re-size at will.
    Gregory

  • How can i find out the file size of a Keynote on an iPad please?

    How can i find out the file size of a Keynote on an iPad please?

    I think a rule of thumb is what you're looking for.
    Full bandwidth CD audio (AIFF): about 10 MB/min
    Apple Lossless: about 5 MB/min
    MP3 @ 256k: about 2 MB/min
    MP3 @ 128k: about 1 MB/min
    Of course the MP3 file size is exactly linear with bit rate.
    As for sound quality:
    Apple Lossless is, as the name says, lossless.
    MP3 @128k: fine for listening in the car or the kitchen etc. If you have an audiophile sound system, this will remind you why you spent all that money.
    MP3 @256K: barely distinguishable from CD on very good equipment.
    MP3 @320K: probably not distinguishable from CD.
    I presume that since you're talking about importing classical CDs these are ones you own. Remember you can always do it again if you need higher fidelity or if better technology comes out. I import most CDs at 128k, since most of my MP3 listening is in the car, or walking, or as background. And I can always play the CD if I want to sit and listen.
    The logic for purchased music is totally different -- you probably won't get to upgrade that without buying it some different way. So buying 128k MP3s (or AACs) is something you'll probably regret later. Buying 256k MP3s is a lot less problematic.

  • How to find middle row in a table ?

    Hi Friends,
    Is it possible to find middle row in a table by SQL Query.
    KarTiK.

    Solution: sort the rows in order to create an ordered
    sequence and then there will be a "middle row".Well, not quite.
    If there are an odd number of rows then, yes, there will be a middle row in an ordered sequence, however if there is an even number of rows then the middle is between two rows... or... you could take it as the two rows either side of the middle....
    SQL> select * from emp order by empno;
         EMPNO ENAME      JOB              MGR HIREDATE                   SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17/12/1980 00:00:00        800                    20
          7499 ALLEN      SALESMAN        7698 20/02/1981 00:00:00       1600        300         30
          7521 WARD       SALESMAN        7698 22/02/1981 00:00:00       1250        500         30
          7566 JONES      MANAGER         7839 02/04/1981 00:00:00       2975                    20
          7654 MARTIN     SALESMAN        7698 28/09/1981 00:00:00       1250       1400         30
          7698 BLAKE      MANAGER         7839 01/05/1981 00:00:00       2850                    30
          7782 CLARK      MANAGER         7839 09/06/1981 00:00:00       2450                    10
          7788 SCOTT      ANALYST         7566 19/04/1987 00:00:00       3000                    20
          7839 KING       PRESIDENT            17/11/1981 00:00:00       5000                    10
          7844 TURNER     SALESMAN        7698 08/09/1981 00:00:00       1500          0         30
          7876 ADAMS      CLERK           7788 23/05/1987 00:00:00       1100                    20
          7900 JAMES      CLERK           7698 03/12/1981 00:00:00        950                    30
          7902 FORD       ANALYST         7566 03/12/1981 00:00:00       3000                    20
          7934 MILLER     CLERK           7782 23/01/1982 00:00:00       1300                    10
    14 rows selected.
    SQL> select e.empno, e.ename, e.job, e.mgr, e.hiredate, e.sal, e.comm, e.deptno
      2  from (select emp.*, row_number() over (order by empno) as rn from emp) e
      3      ,(select round(count(*)/2) as middle, round(((count(*)+1)/2)) as middle2 from emp) m
      4  where e.rn in (m.middle, m.middle2)
      5  /
         EMPNO ENAME      JOB              MGR HIREDATE                   SAL       COMM     DEPTNO
          7782 CLARK      MANAGER         7839 09/06/1981 00:00:00       2450                    10
          7788 SCOTT      ANALYST         7566 19/04/1987 00:00:00       3000                    20
    SQL> insert into emp values (1111, 'WILLIS', 'CLERK', 7902, sysdate, 900, null, 20);
    1 row created.
    SQL> select * from emp order by empno;
         EMPNO ENAME      JOB              MGR HIREDATE                   SAL       COMM     DEPTNO
          1111 WILLIS     CLERK           7902 18/01/2008 12:18:14        900                    20
          7369 SMITH      CLERK           7902 17/12/1980 00:00:00        800                    20
          7499 ALLEN      SALESMAN        7698 20/02/1981 00:00:00       1600        300         30
          7521 WARD       SALESMAN        7698 22/02/1981 00:00:00       1250        500         30
          7566 JONES      MANAGER         7839 02/04/1981 00:00:00       2975                    20
          7654 MARTIN     SALESMAN        7698 28/09/1981 00:00:00       1250       1400         30
          7698 BLAKE      MANAGER         7839 01/05/1981 00:00:00       2850                    30
          7782 CLARK      MANAGER         7839 09/06/1981 00:00:00       2450                    10
          7788 SCOTT      ANALYST         7566 19/04/1987 00:00:00       3000                    20
          7839 KING       PRESIDENT            17/11/1981 00:00:00       5000                    10
          7844 TURNER     SALESMAN        7698 08/09/1981 00:00:00       1500          0         30
          7876 ADAMS      CLERK           7788 23/05/1987 00:00:00       1100                    20
          7900 JAMES      CLERK           7698 03/12/1981 00:00:00        950                    30
          7902 FORD       ANALYST         7566 03/12/1981 00:00:00       3000                    20
          7934 MILLER     CLERK           7782 23/01/1982 00:00:00       1300                    10
    15 rows selected.
    SQL> select e.empno, e.ename, e.job, e.mgr, e.hiredate, e.sal, e.comm, e.deptno
      2  from (select emp.*, row_number() over (order by empno) as rn from emp) e
      3      ,(select round(count(*)/2) as middle, round(((count(*)+1)/2)) as middle2 from emp) m
      4  where e.rn in (m.middle, m.middle2)
      5  /
         EMPNO ENAME      JOB              MGR HIREDATE                   SAL       COMM     DEPTNO
          7782 CLARK      MANAGER         7839 09/06/1981 00:00:00       2450                    10
    SQL>

  • How to find out the image size?

    How to find out the image size values(Width and height) in illustrator CS3 using any script. I tried but i got only the document height and width. I need to find out the image BoundingBox value of width and height. Kindly advice me.

    Try this.
    tell application "Adobe Illustrator"
    set heightImage to get height of raster item 1 of current layer of current document
    set widthImage to get width of raster item 1 of current layer of current document
    display dialog (heightImage & " X " & widthImage) as string
    end tell
    JaiMS

  • How to find out the length of a LONG column?

    How can I find out the length of a LONG column, I should write a stored procedure which will return me the length of a LONG column passed as an argument to it!
    any ideas or suggestions? please respond, i need this urgently, or you can mail me at [email protected]
    thanks,
    srini

    Actually a LONG variable in PL/SQL maxes out at 32K, so this would not be accruate. If you are running Oracle 8+, you could do a conversion to LOB which will give you an accurate length. Note, this example needs a table created to hold the converted lob value, you can't do it directly in pl/sql:
    create table lobhold
    (templob clob);
    declare
    mylength number;
    begin
    execute immediate 'insert into lobhold select to_lob(text) from equipment_notes where equipment_id=1448';
    select dbms_lob.getlength(templob) into mylength
    from templob;
    dbms_output.put_line(mylength);
    execute immediate 'truncate table lobhold';
    end;

Maybe you are looking for

  • Received an IPAD from a deceased relative

    Greetings, Recently, I had a relative pass away and subsequently obtained her IPAD. In my attempts to restore the device in order to use as my own, my relatives information continues to show up for example, Imessages, Icloud, Itunes sign in, etc. How

  • License keys are not saved

    Hi there, i´ve got a problem. In some applications (billings, some plugins in Photoshop) are the licence keys not saved. I have to enter them again and again when starting them. It would be great if someone could help. Thanks

  • Kern Protection Failure HELP!

    Please help, I had a power failure while using my Mac (battery life was low, got error message saying I was on reserve power and before I could do anything my computer shut down), now I cannot open Safari at all, below is the error message I get when

  • Impossible to buy and download Mountain Lion OSX 10.8 / HELP !!! Please!!

    Hey everyone,   I've just had 1 problem today with not understanding  that Mac Osx Lion isn't the same that Mac Osx Mountain Lion.   My  question got solved finaly.  The thing is. I'm under OSX Lion 10.7.5 but  I need the version Osx Mountain Lion 10

  • PLEASE HELP: How to establish a link via ftp to sapserv?

    Hi All We have having serious problems with one of our producton servers and sap have asked me to ftp som files to 'sapserv3'. However I don't know how to establish a link via ftp to sapserv!! Can some one help me get this set up? Thanks in advance P