Fragmentation of the table to find Oracle 8.1.6.3.0

Hi all

I just want to find the fragmentation of the table for a table named LOG I used under query to find this...
SQL> select table_name,round((blocks*8),2)||'kb' "size"
from dba_tables
where table_name = 'LOG' and owner='AMRWF1';  2    3

TABLE_NAME                     size
------------------------------ ------------------------------------------
LOG                            6301408kb

SQL> select table_name,round((num_rows*avg_row_len/1024),2)||'kb' "size"
from dba_tables
where table_name = 'LOG' and owner='AMRWF1';  2    3

TABLE_NAME                     size
------------------------------ ------------------------------------------
LOG                            1468846.2kb
And tablespace infromation is lower.
SQL> select bytes/1024/1024,TABLESPACE_NAME,EXTENTS,MAX_EXTENTS from dba_segments where owner='AMRWF1' and segment_name='LOG';

BYTES/1024/1024 TABLESPACE_NAME                   EXTENTS MAX_EXTENTS
--------------- ------------------------------ ---------- -----------
     6154.16406 WFMKTLEAST                          12214  2147483645


SQL> sho parameter block

NAME                                 TYPE    VALUE
------------------------------------ ------- ------------------------------
db_block_buffers                     integer 100000
db_block_checking                    boolean FALSE
db_block_checksum                    boolean FALSE
db_block_lru_latches                 integer 3
db_block_max_dirty_target            integer 100000
db_block_size                        integer 8192
db_file_multiblock_read_count        integer 8
hash_multiblock_io_count             integer 0
sort_multiblock_read_count           integer 2
Thanks to mention if I put aside an appropriate method to find the fragmentation of the table and this table is severely fragmented or not?

-Yasser

Published by: YasserRACDBA on May 12, 2009 19:17

I don't know how the histogram got there - in fact, did you check that there is a histogram. Do not forget that I pointed out that your version is so old that people will easily make mistakes on its operation.

Select * from user_tab_histograms where table_name =... and column_name =...;
A histogram will give you over 2 lines.

The query uses the wrong index because the DENSITY on ID is too high; and the density is probably too high because it was settled as part of the process of creation of the histogram. So my assumption is that if you get rid of the histogram the index on ID will be used.

Note: you can test the impact of the indices of switching by implementing indicators that Sean Kim noted, so you wouldn't need to drop thei histogram.

A short note on OTN will not really you help. Items to check on
www.centrexcc.com (Wolfgang Breitling)
Pick up anything by Christian Antognin http://antognini.ch/blog/ - and buy his book (Troubleshooting Oracle Performance)
Get a copy of my book (cost based Oracle Fundamentals)

Concerning
Jonathan Lewis
http://jonathanlewis.WordPress.com
http://www.jlcomp.demon.co.UK

"All experts it is a equal and opposite expert."
Clarke

Tags: Database

Similar Questions

  • Truncate, but still have the fragmentation of the table?

    Hello

    We have just solved a performance problem, I guess that is because of the fragmentation of the table, but do not know how the fragmentation happened because the table is always truncated and recharged.

    I thought that TRUNCATE would always reset the HWM and fragmentation would not happen. Y at - there other possibilities?

    The work has always been less than 30 minutes. Recently, nothing is changed to any procedure, tables etc. - unconfirmed with maintenance DB s/n. Then the job runs up to 11 hours. By re-creating the table, the task runs from 11: 00 to 25mins. Note the work and the tables are years old.

    What could be the reason behind this please, ideas

    Thank you

    Amy

    Thank you all for your contributions.

    After a few days of investigations/tests with DBA, it is identified as not a problem of fragmentation of table.

    One of the additional queries has cost too much, the time elapsed for the sub query was 0.39 sec but saw 157 k lines, swipes the entire process super slow - window 8-11 hours.

    Did not understand why that truncate the table S and recreate the table S do somehow temporarily performance within 30 minutes well.

    Now, after the adjustment, it's up to 13 min, the cost is low 500 to 14. Not perfect for 157K load, much better than before - still space to rewrite the procedure.

  • fragmentation of the table

    Hi all

    Oracle 8i (8.1.7)

    Solaris

    Name of the table: activity

    size: 22GB

    Actual data: 10 GB

    Wasted space: about 12 GB

    having 7 index

    Here is my intention to remove the waste space what is the best method?

    plan do sql > alter table activity colsec;   This is the good method or what I need to do something...?

    If I allow the movement of the line, what will be the impact?

    Thank you

    Mike.

    plan to release unused space in the table using activity below methods... I mean what method will be the best to do online (hours not... his production company,...), and including a quick and the better... Please advise.

    Method 1:

    SQL > alter table activity merge;

    Method 2:

    SQL > alter table activity release unused space.

    SQL > alter index acivity_idx_1 free unused space.

    Thank you

    Mike.

    This will depend on the ability of the system... I hope it using your legacy software/hardware... ... better sure .not to .test it on the test machine.

    Merge and methods 'remove unused space allocation"will serve to free up space on the db when you those who shot, but they are his own.

    Please refer below link...

    Oracle8i Database Search Results: 'alter table' (version 8.1.7)

  • How to check the table reused in oracle 10g space?

    Hello..

    Of my system, I see table size keep growing event the deletion request is running. Because of this, I would like to check either the allowed oracle to reuse space table or not? If not then how can I enable it?


    Please help me...


    Thank you
    Balleur

    You can use dbms_space.space_usage to check for free space.

    Reuse of the space will depend on whether you use MSSM or SAMS, PCT_FREE, PCT_USED and the way in which new data is inserted?

    You can reduce or move the table and rebuild the index to reclaim space.

  • Name of the table to find the workbook columns

    Hello

    I'm working on an implementation project legacy 11.5.10 and discoverer 4 version R12 system. I'm looking in the discoverer workbooks and I need the name of the table to determine the COLUMNS in a workbook.
    Any help is appreciated.

    Billa

    Hello

    Unfortunately, this information is not available in the EUL. The workbooks are stored in the EUL4_DOCUMENTS table in a column of type LONG. It uses a binary format and means that you can not query the structure of the workbook.

    Rod West

  • How can she find the table deleted on oracle 9i and 10g?

    It's the screenplay...


    user has deleted a table on its schema...
    Oracle 10g DB
    flashback not active so not possible to file a flashback


    but a way to recover from on 10g recyclebin? because it is not sysdba table... . If so what would you say on 9i... If Yes, then there will be no limit on the trash as space pressure?



    Hollywood 2:

    We have two redo online journal with 2 members group of each...
    My currnet online redolog group currupted (including members)... we need this group of currnet data so we will not need to use the command clear log
    How do I get it back?


    We need to go to any block-level Recovery?

    Thank you
    Deborah

    Published by: user13014926 on January 18, 2011 06:55

    Please mark items as correct/good... Thank you

    Kind regards

    -wiZ

  • Comparison of the tables to find items that differ - JS?

    I think I have my all wrong logic.

    I'm trying to compare two tables, with the result that I get a new array with the elements in the first, which do not appear in the second.

    Array1 - a, b, c and d, e

    table 2 - a, b, c

    new table must contain d, e

    THIS IS WHAT I'M TRYING...

    -Function to get graphics-

    function getGraphicsFunc()

    {

    -tests of graphics in library-

    MyLib = app.libraries.item var (0);

    the list of graphics in the library

    var libGraphicList = mylib.assets.everyItem () .name;

    Alert (libGraphicList);        <-- IT WORKS very WELL

    -Get a list of all the charts for CID on Pulse_OPI-

    var graphicFolder = the folder (basegraphpath + lastdigits + "/");

    var theGraphics = graphicFolder.getFiles ();

    var allGraphics = [];

    a content ID match files

    for (i = 0; i < theGraphics.length; i ++)

    {

    Assuming 8 sequence of numbers is a static number.

    You can also use grep to match 8-digit >

    If (theFiles [i]. Name.match(/^\d{8}/);

    If (theGraphics [i].name.indexOf (adCID) == 0)

    {

    allGraphics.push (theGraphics [i] .name);

    }

    }

    Alert (allGraphics);        <-- This WORKS FINE - the following comparison is the problem...

    Compare graphic tables to see which are NOT in the library

    var missingGraphics = [];

    for (j = 0; j < allGraphics.length; j ++)

    {

    if (toString (libGraphicList).indexOf(allGraphics[j]) is-1)

    {

    missingGraphics.push (allGraphics [j]);

    }

    }

    Alert (missingGraphics);        <-- THIS ALWAYS PRODUCES THE SAME "MISSING GRAPHICS" EVEN IF THEY ARE IN the INDL

    var graphicsFound = (missingGraphics.length)

    Alert ("On" + graphicsFound + "graphics found and imported into the library")

    }

    Many thanks in advance and Merry Christmas everyone...

    Which if statement says:

    If (String (libGraphicList). IndexOf(allGraphics[j]) is-1)

    or toString is a function you wrote, but not included?

    I would have probably used:

    If (libGraphicList.Join("|"). indexOf(allGraphics[j]) is-1)

    I thought of doing it this way. It is probably that the calculation of the loop by the string before the declaration and comparing with that.

    Dave

  • Structure of the Table OTL (Oracle time and labor)

    Hello

    Could you let me know the structure of the tables of OTL (Oracle time and labor).
    I've been through manual eTrm, but I'll try to find the joints and the structure of the hierarchy.

    Thank you.

    931832 wrote:
    Hello

    Could you let me know the structure of the tables of OTL (Oracle time and labor).
    I've been through manual eTrm, but I'll try to find the joints and the structure of the hierarchy.

    Thank you.

    Click "diagrams and PDF files" when you access eTRM Web site - http://etrm.oracle.com/pls/et1211d9/etrm_fndnav.ls_object?c_name= *. PDF & c_type = FILE

    Thank you
    Hussein

  • How to decrease the level of fragmentation of a table.

    Hi all

    There is a table in my database of production.
    His version is Oracle 10 G (10.2.0.1.0)

    (i) its size is 26 GB with level of fragmentation.
    (II) it has more then 48 crores of lines.
    (III) its size is 20 GB without fragmentation level. (Up to 6 GB of unused space is wasted).

    Here are my doubts about the above points.

    (i) how to reduce the level of fragmentation of the table.

    (II) if there is a way to reduce the level of fragmentation, how long it will take to perform the particular activity in order to reduce the level of fragmentation.

    Move the table into a new table space and rebuild the indexes.

    Concerning
    Asif Kabir

  • compression of the table

    Hi guys,.

    I try to compress the table. Then I connect via Oracle SQL Developer > right click > storage > compress. All right.

    But does not change the size of the table.

    Y at - it a command to say: 'start compression for my table1 now?

    More than 50,000 rows in my table.

    Thank you!

    Compression of the data in a table does NOT change the size of the table.

    It increases just the available space in the table.

    Oracle shall never voluntarily return disk space after that she acquired it.

    Oracle is designed to reuse free space.

    Are what problem you trying to solve?

  • How to set the table

    Hi experts,

    I have a script for the table to find and change the properties.

    Could someone show me how it works.

    Respect of

    John

    myDoc = app.activeDocument;

    findTable();

    function findTable() {}

    for (s = myDoc.stories.length - 1; s > = 0; a--) {}

    for (t = myDoc.stories [s].tables.length - 1; t > = 0; t-) {}

    myTable = myDoc.stories [s] .tables [t];

    tables [t].cells.everyItem (). texts.everyItem () .fillColor = "Black";

    tables [t].cells.everyItem () .fillColor = "None";

    tables [t].cells.everyItem () .leftEdgeStrokeColor = 'None ';

    tables [t].cells.everyItem () .rightEdgeStrokeColor = 'None ';

    tables [t].cells.everyItem () .topEdgeStrokeColor = 'None ';

    tables [t].cells.everyItem () .bottomEdgeStrokeColor = 'None ';

    }

    }

    }

    Alert ("Finish.")

    Hi John,.

    I have made some changes, but kept things similar to your original code, let me know how you go.

    var myTables = app.documents[0].stories.everyItem().tables.everyItem().getElements()
    
    findTable();
    
    function findTable(){
        for ( t = 0; t < myTables.length; t++ ){
            myTables[t].cells.everyItem().texts.everyItem().fillColor = "Black";
            myTables[t].cells.everyItem().fillColor = "None";
            myTables[t].cells.everyItem().leftEdgeStrokeColor = "None";
            myTables[t].cells.everyItem().rightEdgeStrokeColor = "None";
            myTables[t].cells.everyItem().topEdgeStrokeColor = "None";
            myTables[t].cells.everyItem().bottomEdgeStrokeColor = "None";
            }
        }
    

    Kind regards

    Brett

  • the table structure

    How to copy the table structure in oracle without constraints?

    Some constraints are copied in whole;

    create table w (order_type varchar2(1));
    insert into w values ('N');
    insert into w values ('C');
    insert into w values ('D');
    insert into w values ('X');
    
    alter table w add constraint pk_w primary key (order_type);
    
    create table t (x number, order_type varchar2(1) constraint t_fk references w (order_type) );
    
    insert into t values (1, 'X');
    
    commit;
    
    create table t2 as (select * from t where rownum < 1);
    
      1  select table_name, constraint_name from all_constraints
      2* where table_name in ('T', 'T2')
    SQL>
    SQL> /
    
    TABLE_NAME                     CONSTRAINT_NAME
    ------------------------------ ------------------------------
    T                              T_FK
    
  • How to find this value in the oracle database to find out the table

    Hi expert,

    I know there is a value in the oracle database, please show me how to find this value in the oracle database to find out the table that contains this value.

    Thank you very much

    918440 wrote:
    Hi expert,

    I know there is a value in the oracle database, please show me how to find this value in the oracle database to find out the table that contains this value.

    Thank you very much

    Go to the online documentation and discover the data dictionary. You may be interested in reading about ALL_TAB_COLUMNS, but you will need to know what you want until you can query the view to find information

  • How to get a list of the tables more fragmented in Oracle?

    Is there a SQL on how to get a list of the tables more fragmented in the Oracle DBMS?

    Update the statistics on the table and try this, you should see very fragmented tables upstairs with high wasted_space.

    select table_name,round((blocks*8),2) "size (kb)" ,
                                round((num_rows*avg_row_len/1024),2) "actual_data (kb)",
                                (round((blocks*8),2) - round((num_rows*avg_row_len/1024),2)) "wasted_space (kb)"
    from dba_tables
    where (round((blocks*8),2) > round((num_rows*avg_row_len/1024),2))
    order by 4 desc
    

    I changed the query a little because the ORDER BY will not work if we concat | ' Ko ' with the column because this makes the output a character column data.
    And added a WHERE condition to see that these tables where the total size is greater than the actual size of data.

    Published by: zahid79 on July 23, 2010 13:40

  • Oracle DB 11.2.0.4: Impossible to activate the table lock after having stopped it

    Hello

    I use Oracle Database 11.2.0.4.

    After reading the documentation on how to prevent unwanted table DDL statement.

    I found a way to do this in by issuing 'edit the table < table_name > disable table lock'.

    Turn it off doesn't work, however I can not re - activate.

    The error message is:

    ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired

    I want to activate the lock, because I need to add new columns to this table.

    I was digging on several threads that have the same problem as mine. But none of them gives any acceptable solution.

    Impossible to activate the table lock after disablng it

    ALTER table enable table lock blocking

    However, a poster responds by quoting the documentation that says: (Note: I can't find what doc says)

    'Specify the TABLE LOCK ACTIVATE to activate the table locking, allowing operations on the table DDL. All currently process transactions must commit or roll before Oracle database allows table locking. »


    By the way:

    1. the table is mine and nobody knows there are (therefore, it would be just me which undoubtedly make any DML at it, and I did not).

    2. I've disabled the lock table months ago and tried to turn it back on because I want to add the new column to the table.


    It means that I have to wait for that "ALL transactions running" happening on the current scheme being validated or cancelled?

    The table itself is located on the stops and never schema of production on which transactions take place continuously.


    Is it true that Oracle expects all execute transactions? Is it known bug?

    Why would Oracle wait as all transactions which has nothing to do with the underlying table?

    Is there no workaround solution to solve this?


    Note:

    I tried to deactivate - activate the table locking on the development database (which has less transaction) and it works fine.


    Kind regards


    Buntoro

    Your best option might be suspended from the database. If it is an application of type OTP, it must suspend in some secinds, do your DOF, then get out. Your users should not notice. I have described the mechanism here,

    Quiesce

    --

    John Watson

    Oracle Certified Master s/n

Maybe you are looking for