Newbie Question on the use of the size of a table in a schema

Hi all,

Newbie Alert!

I tried to work on the size of a table in a schema and struggled to get the exact number. Could someone help me please with getting an exact figure.

Thanks to all who responded!

SELECT sum (blocks) * db_block_size/1024 MB of dba_extents
where owner = SCHEMA_OWNER and nom_segment = TABLE_NAME;

http://Waqas-DBA.blogspot.com

Tags: Database

Similar Questions

  • Find the size of a table with partitions; Two questions

    DB version: 11.2.0.4

    Platform: Oracle Linux 6.4

    The slot table MH_PKT_HEADR in UTMSBL schema has more than 5000 partitions.

    Because there partitions, you cannot use just view DBA_SEGMENTS to determine the size of the table.

    So, I tried to use 2 SQLs mentioned below. Query1 returned 5 GB. But Query2 has returned a value zero. Query2 is actually a note metalink mentioned below, so he cannot deceive you, I guess.

    That is the reliable accurate query: Query1 or Query2?

    No idea why Query2 returns a Null value?

    - Query1

    fixed lines 200

    Col TABLE_NAME format a18

    with

    BaseData as)

    Select the owner

    nom_segment

    segment_type

    , round (sum (bytes) / 1024/1024/1024) GB

    sum (bytes) bytes

    count (*) segment_count

    of s dba_segments

    Group by owner, nom_segment, segment_type

    )

    ,

    LOB type as data)

    Select the owner

    table_name

    nom_segment

    of dba_lobs

    )

    ,

    all_segs like)

    Select coalesce (lobs.table_name, basedata.segment_name) table_name

    basedata.*

    of basedata

    left outer join

    type LOB data

    on (basedata.segment_name = lobs.segment_name

    and basedata.owner = lobs.owner)

    )

    Select table_name

    sum (bytes) bytes

    sum (gb) GB

    of all_segs

    where table_name = 'MH_PKT_HEADR'.

    and owner = 'UTMSBL. '

    Table_name group;

    TABLE_NAME BYTES GB

    ------------------ ---------- ----------

    5869469696 5 MH_PKT_HEADR

    - Request 2

    -Source: how to calculate the size of a Table that contains outline CLOB and BLOB (Doc ID 118531.1()

    SELECT

    (SELECT SUM (S.BYTES) - the Segment of Table size

    FROM DBA_SEGMENTS S

    WHERE S.OWNER = UPPER ('UTMSBL') AND

    (S.SEGMENT_NAME = UPPER ('MH_PKT_HEADR'))) +

    (SELECT SUM (S.BYTES) - the size of the Lob Segment

    FROM DBA_SEGMENTS S, DBA_LOBS L

    WHERE S.OWNER = UPPER ('UTMSBL') AND

    (L.SEGMENT_NAME = S.SEGMENT_NAME AND L.TABLE_NAME = UPPER('MH_PKT_HEADR') AND L.OWNER = UPPER('UTMSBL'))) +

    (SELECT SUM (S.BYTES) - the size of the Lob Index

    FROM DBA_SEGMENTS S, DBA_INDEXES I

    WHERE S.OWNER = UPPER ('UTMSBL') AND

    (I.INDEX_NAME = S.SEGMENT_NAME AND I.TABLE_NAME = UPPER('MH_PKT_HEADR') AND INDEX_TYPE = 'LOB' AND I.OWNER = UPPER('UTMSBL')))

    "TOTAL TABLE SIZE.

    FROM DUAL;

    TOTAL TABLE SIZE

    ----------------

    SELECT

    (SELECT nvl (SUM (S.BYTES), 0)-dimensions of the Segment Table)

    FROM DBA_SEGMENTS S

    WHERE S.OWNER = UPPER ('UTMSBL') AND

    (S.SEGMENT_NAME = UPPER ('MH_PKT_HEADR'))) +

    (SELECT nvl (SUM (S.BYTES), 0)-Segment Lob size)

    FROM DBA_SEGMENTS S, DBA_LOBS L

    WHERE S.OWNER = UPPER ('UTMSBL') AND

    (L.SEGMENT_NAME = S.SEGMENT_NAME AND L.TABLE_NAME = UPPER('MH_PKT_HEADR') AND L.OWNER = UPPER('UTMSBL'))) +

    (SELECT nvl (SUM (S.BYTES), 0)-size of the Lob Index)

    FROM DBA_SEGMENTS S, DBA_INDEXES I

    WHERE S.OWNER = UPPER ('UTMSBL') AND

    (I.INDEX_NAME = S.SEGMENT_NAME AND I.TABLE_NAME = UPPER('MH_PKT_HEADR') AND INDEX_TYPE = 'LOB' AND I.OWNER = UPPER('UTMSBL')))

    "TOTAL TABLE SIZE.

    FROM DUAL;

    David Fitzjarrell

  • Set the size of fixed table

    Hello. I am developing a VI to a FPGA target and I'm trying to make sure who is using the VI can specify the size of an array of input when they instantiate (such as by the presence of an entry to the VI who said "maximum table size" or something). So far, it seems that the only way to do something like this is to go into the VI himself and manually set the size of table for each entry in the table for the VI (open the VI, do a right-click on each input array, select 'Set the size Dimension', choose 'fixed', set number of items). I would like to have a point where I can set the size of all tables at once (as in my case, they are all the same size) and let the person using the VI set it to the right size for which application they use it for (to be clear, let's say I have two uses for this VI and in one case (, I have a table of entry of size 100 and other use of size 1000, I would like to be able to put these in some way rather than do it through the dialog box). Thank you.

    It's a little more work, but it could be a case of good use for a memory block on the FPGA.  Make it bigger you wait, you need, and then store the actual number of items somewhere.  This will allow you to vary the amount of data without consuming large amounts of FPGA resources on an oversized table.

  • How will I know "the size of a table special VS size of RAM"

    Hi all

    How will I know "the size of a table special VS size of RAM"?

    I should know because I want to understand what join method to use.

    Please correct me if my attempt to catch the truth is crazy.

    Thanks in advance.

    You can get the size of a table of DBA_SEGMENTS.  I'm sure you can get the amount of RAM of other tables of data dictionary as well if you can define precisely what memory segment you are interested in (e.g. CMS?)  PGA?  The amount of physical RAM on the box?  The size of the buffer cache?  The amount of virtual memory available?)

    That being said, comparing the two is not as significant.  You, as a developer, are generally not in the business of choosing a join method.  It's the job of the optimizer.  And the optimizer takes into account a range of data that you have not begun to ask about yet.  The size of the table is not even particularly relevant for calculations - the optimizer the amount of data operations are back, the relative size of the data on each side of the join, the availability of indexes, etc. are all much more important than the raw size of the table (but the raw size of the array is a factor in the assessment of the amount of data that is returned).

    Justin

  • GetLength errors on CLOB. Retrieves the size of a table with CLOB columns

    Hello

    I try to find the size of a CLOB to a table column and get the error

    PLS-00306: wrong number or types of arguments in the call to "GETLENGTH.

    When you try to use dbms_lob.getlength. Here is the code


    declare
    number num.
    Start
    for rec in (select xmlupload from FILE_TABLE where file_table_id = 33635) loop
    NUM: = dbms_lob.getLength (rec.xmlupload);
    end loop;
    dbms_output.put_line (num);
    end;

    Database version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi


    I'm actually trying to find the size of a table with CLOB columns, is there an easy way to do this Besides using getlength and without having to contact the Administrators (they are outsourced)?

    It works fine on my computer, the version is also 10g.

    SQL> declare
      2  num number;
      3  begin
      4  for rec in (select cntnt from ims_toms_msge where rownum<3) loop
      5  num := dbms_lob.getLength(rec.cntnt);
      6  dbms_output.put_line(num);
      7  end loop;
      8
      9  end;
     10  /
    3837
    3837
    
    PL/SQL procedure successfully completed.
    

    You should check if xmlupload is the CLOB data type.
    In addition, if you just want to get the CLOB size, you can use LENGTH() as well, you will get the same result;

    SQL>  select length(cntnt), dbms_lob.getLength(cntnt) from ims_toms_msge where rownum<2;
    
    LENGTH(CNTNT) DBMS_LOB.GETLENGTH(CNTNT)
    ------------- -------------------------
             3837                      3837
    

    Published by: PhoenixBai on September 24, 2009 13:40

  • Reduce the size of a table.

    Hello group,

    To reduce the size of a table, that I was asked to remove about 2 million lines, however queriying dba_segments after having removed the lines, the value of the BYTES column to the same value stay.

    Why?, how ask Oracle to reduce the table itself.

    Thank you very much.

    user12003066 wrote:
    Hello group,

    To reduce the size of a table, that I was asked to remove about 2 million lines, however queriying dba_segments after having removed the lines, the value of the BYTES column to the same value stay.

    Why?, how ask Oracle to reduce the table itself.

    What happens when you run this?

    exec dbms_stats.gather_table_stats ('schema', 'your_table_name');

    Aman...

  • need help to determine the size of all tables in a table space

    Hello

    I want to know the size of individual Tables belonging to a particular Tablespace (ULTGNP), ordered by the size in MB. I have to analyze the tables before I have a discovery of the size. I tried this script, could someone please go through the script and correct it, if necessary errors.

    Select owner, segment_name, tablespace_name, sum ((bytes/1024/1024)) bytes
    of sys.dba_extents
    where owner in 'ULTGNP' and segment_type = 'TABLE '.
    Group by tablespace_name, owner, nom_segment
    order by owner, nom_tablespace, nom_segment bytes


    Thank you
    SELECT
    SUBSTR(s.segment_name,1,20) TABLE_NAME,
    SUBSTR(s.tablespace_name,1,20) TABLESPACE_NAME,
    ROUND(DECODE(s.extents, 1, s.initial_extent,
    (s.initial_extent + (s.extents-1) * s.next_extent))/1024000,2) ALLOCATED_MB,
    ROUND((t.num_rows * t.avg_row_len / 1024000),2) REQUIRED_MB
    FROM
    dba_segments s,
    dba_tables t
    WHERE
    s.owner = t.owner AND
    s.segment_name = t.table_name
    and SUBSTR(s.tablespace_name,1,20)='TABLESPACE_NAME',
    SUBSTR(s.segment_name,1,20) )='Your_table'
    
    ORDER BY s.segment_name;
    

    Published by: Adigozalov Qurban on January 25, 2011 11:08

  • Question about the size of the swf

    Hi all, I had a small question. I have some old .swf files that I made a long time ago, but I do not have the .flas. I have trouble finding the size (height and width) of these files. I want to use the swfobject to embed, is there a way to find out just how big, or is it possible to use swfobject without declaring a size?

    Thanks for any advice.

    If you double-click the SWF file to open it, it should open in the Flash Player to its actual size.  SO, you should be able to get a screenshot of it and then determine the size of the crop of this screenshot.

  • Question of the size of the screen whilest games

    I have a lot of computer games from big fish. On my last laptop had no problem with the size of the screen, but since the download on Toshiba laptop a lot of games opens full-width. I managed to overcome this problem, no idea how I did it simply play, but I had to restore the laptop to an earlier point and the display is returned to the 'normal '.

    Can someone help me solve this problem? I tried Control Panel > appearance and personalization > resolution of the screen, but this does not help.

    Thank you lizziep13

    Maybe you should first tell us what model of laptop that you use and which OS is preinstalled on your computer.

    Have you noticed the same problem with all games or only some of them?

  • Question about the size of the drops shadow

    Hi all!

    I created a style that contains only a custom shadow. I frequently use this style of illustrations that I am creating a book.

    However, since the update to 2014 CC, I had a problem with the style. The size of the shadow is different on each illustration that I apply it. I initially created the style to have a px size 7, but now, when it is applied, the size is sometimes 22 px, sometimes 30 px, sometimes 5 px.

    Can someone tell me what is happening and how I can get the size drops shadow remains constant whenever I apply it?

    Thanks in advance!

    In my opinion, than if you create a predefined layer style Adobe store the resolution of the document that you were editing when you created the preset in the preset this Photoshop which allows the effect of style to the resolution of the document to which you apply the style layer presets.

    Layer style setting as you are in absolute terms in pixels.  That means the size of the shadow would would vary on document with different resolutions, notice in the layers of the menu it is layer > layer Style > effects of scale... and dialog (s) in the size of the Image there is a scale Styles box or a balance setting Styles...

    If it works differently in version CC 15 is then was CC version 14, they can be a new bug.

    If you want a shadow of 7px regardless of the resolution of documents that you can be able to save an action that add a PX 7 shadow using the layer Style dialog box does not use a predefined style.

    I created a Drop Shadow preset on a 300 DPI Document distance 2 px size 7px.  Then, I recorded an action the applied than preset and then applies the same settings using the style layer instead of the preset dialog box.  There is a big difference on the way in which the two steps were recorded.

    When I walk through the action on a 300 DPI paper shadows looks the same.  On a 72 dpi document that the shadow of a Preset seems small as 300 DPI document however the step which was recorded with the shadow layer Layer Style dialog box looking for him much more leap has been reduced to match the resolution of 72 dpi for documents.

    So it look like if you use a style of layer preset in style palette, the effect will be to change the resolution DPI of documents.  Notice in the action there is a layer Style scale 100% in step recorded using dialogue layer style.   Where the pre-defined DS is applied some how by Photoshop and Photoshop will scale the effect...

  • Question about the size of the redo log buffer

    Hello

    I am a student in Oracle and the book I use says that having a bigger than the buffer log by default, the size is a bad idea.

    It sets out the reasons for this are:

    >
    The problem is that when a statement COMMIT is issued, part of the batch validation means to write the contents of the buffer log for redo log to disk files. This entry occurs in real time, and if it is in progress, the session that issued the VALIDATION will be suspended.
    >

    I understand that if the redo log buffer is too large, memory is lost and in some cases could result in disk i/o.

    What I'm not clear on is, the book makes it sound as if a log buffer would cause additional or IO work. I would have thought that the amount of work or IO would be substantially the same (if not identical) because writing the buffer log for redo log files is based on the postings show and not the size of the buffer itself (or its satiety).

    Description of the book is misleading, or did I miss something important to have a larger than necessary log buffer?

    Thank you for your help,

    John.

    Published by: 440bx - 11 GR 2 on August 1st, 2010 09:05 - edited for formatting of the citation

    A commit evacuates everything that in the buffer redolog for redo log files.
    A redo log buffer contains the modified data.
    But this is not just commit who empty the redolog buffer to restore the log files.
    LGWR active every time that:
    (1) a validation occurs
    (2) when the redo log is 1/3 full
    (3) every 3 seconds
    It is not always necessary that this redolog file will contain validated data.
    If there is no commit after 3 seconds, redologfile would be bound to contain uncommitted data.

    Best,
    Wissem

  • Question about the size of the screen on Satellite M

    The size of my screen is not expanded by clicking on full size, he won't go to full size, but when I run again she returned to the most small can anyone help what should be a simple problem (ps a new pc user)

    Hi John

    Sorry, but I don't know what you're saying. What you mean with full size and when you click on exactly? You are talking about specific applications or what?

    Please explain exactly what you mean under the size of the screen.

  • A question about the size of Swap for Oracle 11.2

    Hello everyone

    I want to install Oracle Rac 11.2 on 2 Server with 22 GB of RAM each.

    Reading Exchange according to the requirements of the Infrastructure of grid for Linux, I found this:

    Between 1 and 2 GB-> 1.5 times the size of RAM
    Between 2 GB and 16 GB-> equal to the size of RAM
    More than 16 GB--> 16 GB

    The requirements of database for Linux 86_64 of reading:
    Between 4 and 8 GB-> 2 times the size of RAM
    Between 8 and 32 GB-> 1.5 times the size of RAM
    Over 32 GB--> 32 GB


    Then, with 22 GB, follow the requirements grid: 16 GB and database requirements: 33 GB

    Should what size I get?

    Thank you very much

    This is how I read it.

    Best regards

    mseberg

  • Programmatically set the size of a table control (not the number of col and lines)

    Hi all

    I am trying to create a little VI, in which the user selects the number of columns and rows in a table, and after clicking on a button 'OK', the table control is displayed in the control panel (to be filled in by the user). To do this, I use the nodes property to the number of columns and lines. I have no problem with that.

    However, I want to "limit" the size of the control table (control of himself, not the dimensions of the table) and make use of vertical and horizontal table, the scroll bars. I want to avoid it is that passes type 100 user and 100 lines and appears a huge table control.

    I could tho this by using an array instead of an array, via the node property "size", but I would use an insead table a table.

    Thank you very much

    Daniel

    With a table control, you cannot set the display size to be anything other than a multiple of a complete cell.

    If you are limited to a number of lines and columns.  If you want to resize with more control you also need to resize the control within the Bay, accessible via the property 'picture Element '.

    Another option (but seems huge exaggerated) is to place your table in a secondary and set the size of the secondary to the size you need and enable scrollbars for her.  It is not an option that I would choose but if it helps...

    Have it, your description of your user interface sounds not very intuitive.  How the user knows at any time exactly what cell they access if they have to scroll backwards?

  • How to determine the size of a table partition

    Hello

    Can anyone share please sql code that can be used to list the size of a partition table? I would appreciate it a lot.

    Thank you

    Scott

    Version Oracle 11.2.0.1

    Select
    Sum(bytes/1024/1024)
    Of
    dba_segments
    where
    nom_segment = "MYTABLE";

    Select
    owner,
    nom_segment,
    nom_partition,
    segment_type,
    bytes / 1024/1024 "MB".
    Of
    dba_segments
    where
    nom_segment in ('SEG1', 'SEG2","SEG3");

    Select
    owner,
    nom_segment,
    nom_partition, segment_type, bytes/1024/1024 "MB"
    Of
    dba_segments
    where
    segment_type = "PARTITION TABLE";

Maybe you are looking for

  • to disable Skype caller ID entered by mistake

    Please where can I get the error code?

  • Can I put more old iPhoto to use OSX 10.11?

    Hello. I use OS x 10.7.5 on an iMac in early 2008. I wonder about the upgrade to 10.11. I want to continue to use iPhoto rather than photos, which I believe is possible with iPhoto 9.6.1. However, I have an old version of iPhoto (8.1.2) and there see

  • call scam care 247 computer. Are they able to access my computer.

    I just got a call from a company called 247 computer care, pretending to be Microsoft. My son plays games so I thought that he downloaded something questionable, so did not get suspicious right away. They have me push the button start and r which sho

  • Wmp to wav conversion: is it possible to do and keep the text?

    I spent a few days by typing the titles of songs on the OMP file and when I went to convert WAV or burn them, the titles did not transfer over. I don't want to retype it.  Is there a simple way to convert the wpm to wav (which he was originally) and

  • More local Essentials storage improved vmotion

    anyone could do this?in run run 2 withs 5.1 U1 essentials esxi hosts.the hosts are a dl360 g7 and a dl360p gen8 servers.I created a CVS and made the processor at the same level as the g7 countries.but when I try to migrate a virtual machine on the we