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)

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 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

  • 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

  • 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

  • Build/update dynamically the table 3D

    Hi all

    I'm having a problem with the dynamic generation of a 3D of the following set of data table:

    x: {1,2,3,4,5}

    y: {1,2,3,4,5}

    Z_1: {1,2,3,4,5}

    Z_2: {1,2,3,4,5}

    Z_3: {1,2,3,4,5}

    Z_4: {1,2,3,4,5}

    Z_5: {1,2,3,4,5}

    where there is (5) Z amplitudes associated with each measurement location.  What I am able to statically (from the above values x and y tables 1 d and 2D table Z) is to create a 3D Board made up of x and is indexed intensity to the graphic format of the 2D tables.  Each page of the table corresponds to each of the 5 Z amplitudes measured at each location.  In the attached VI, the Array Build function works perfectly for the static case where the entire data is available.  I followed the example of a another discussion forum will be subject to the provisions of nest two loops construction 2D array in the inner loop and incrementing the pages on the outer loop. The static situation is resolved.

    However, my goal is to graphically present data he is taken, point by point, to the user.  The other attached VI simulates this scenario, incrementation of x and y positions based on the measure button.  Z matrix indicator shows that the 2D Array (each individual page) is in the proper format.  The construction of the 3D picture is dynamically where I'm having problems.  I tried to build table and replace a subset of table, but none of these functions to produce the desired result.

    In the case of building table, 3D table is correctly based on the first measure: for x = y = 1, 2D array page0 is set Z_1 in position (1,1), page1 has the Z_2 value in the position (1,1), page2 Z_3, etc..  However, on the second measure, as expected, the berries are concatenated page5 have Z_1 values in the (1,1) and (2,2) positions.  This result is properly formatted, however, should the counted array 3D page is limited to 5 (page0, 1, 2, 3, 4).  So ideally, page5 should in this case replace page0.  So build array results in the correct format but concatenation is not desirable.

    The subset of spare board was made with the index of the page (outside of the loop) number to specify the subset of the 3D Board needs to be replaced.  The result was an empty 3D array.

    Thank you any help to solve this problem.

    kmsk wrote:

    Any suggestions on how to handle filling out table 3D of unknown size?

    If the size of the final table has a reasonable upper limit, you can initialize an array of slightly oversized, then keep using the subset of the table replace. It will be much faster and more effective memory than gradually more and more large networks.

    When the purchase is made, you can cut to the final size.

    Aircraft add to a table 3D using 'insert into array' or 'Build array' (favorite?), cause memory frequent shifts and might slow down your code by orders of magnitude in casing of excessive fragmentation of memory.

  • ADF: Double in taskflow Page Navigation click on the row in the table on the page .jsff

    Hi all

    My 11.1.1.7 Jdev.

    I have a taskflow with two fragments (.jsff) pages. On the first page, I have a table when I double click on the row in the table that I want to go to the next page.

    I tried to call java script but I do not understand. How can I get it?

    handleNavigation is the only thing that you should not use in the adf. Read 'How to navigate in the stubborn workflow' in this http://www.oracle.com/technetwork/developer-tools/adf/learnmore/nov2010-otn-harvest-190744.pdf.

    Timo

  • ExportCollectionAction causes the current values of lines to be copied into the first row of the table

    Greetings experts,

    I use JDev 11.1.2.3

    I am faced with a really strange behavior of the exportCollectionActionListener. I have a table for each row in this table, a link that calls a popUp. This popUp tells the story of this selected save changes (means it displays data from a different table/VO, who keeps a history of the first) in a table. I have a button that calls the exportCollection for this second table. When I press on it, an excel file is generated and downloaded and everything is perfect until now. If there was not any which record in this table, and o back to the first, by pressing the button send is not track all changes. But if there where all records from this table of history (always talking about the history of the current line), go back to the first and press on submit, that the very first line of the table of fir trees, gets all of it's values as the last row of the second table, as it is copied from one to the other. I have to press on restore back to normal (note that the popUp has it's CancelListener to call a restore of a bean to support operation).

    Why is this happening?

    Thanks in advance

    I found a work around for this problem.

    I added the code that causes the whole view Refresh (ie: the whole page), the popUp cancelListener, also I changed the commandLink partialSubmit property and set it to true. It's not like totally cool watching the screen charge for this fragment of a second after the closure of the pop-up window, but it not the drill.

  • Reorganization of the table

    All,

    I found a few tables are very fragmented in our database of production and continues to re - organize. I intend to use 'change the method of displacement of the table '.

    Database version: 11.2.0.3

    Name of the table: Test Tablespaces: users, tools - they already have enough space for the move.

    During the race, this database of impact will this order?  This will allow DML and DDL operations?  Please let me know what has be to consider other things.

    SQL> alter table test move tablespace tools;
    
    
    Table altered.
    
    
    SQL>  select status from dba_objects where object_name='TEST_INDX';
    
    
    STATUS
    -------
    VALID
    
    
    SQL>  alter table test move tablespace users;
    
    
    Table altered.
    
    
    SQL> select status from dba_objects where object_name='TEST_INDX';
    
    
    STATUS
    -------
    VALID
    

    Thank you

    Why do you feel compelled to do something?

    If you regularly remove 'huge', and then nothing else to do.

    If "SHRINK you" the size of the table, you force only Oracle to expand yet; before the next deletion.

    What you propose would be similar to replace the gas tank on your car you consume gasoline in order to eliminate all the space as 'wasted' in there.

    The problem arises when you want to fill. You develop the tank; just to keep more gasoline.

  • Citing a taskflow of the fragment on the page

    Hello

    I use JDev PS3. I use export custom Excel feature (which includes a popup and a shuttle service to select the required columns) in each fragment of the page.
    I intend to generalize this task and do use this feature available to other applications. Any suggestions are appreciated.

    Thank you

    Hello

    I think that he is a candidate for a declarative component. If the component is a panelCollection users would then drag and drop the table. The export button is added to the toolbar of the collection of panels and its logic could then access the table (this is a child element of the collection of panels) and a list of its columns to export. I implemented a similar use case in an article for the 2013 edition of the Oracle Magazine (next issue) July/August and know that it works.

    Frank

  • Fragmentation of the distribution of system and database data

    Hi all

    I'm working on a scenario (University), with the fragmentation of a central database. A company has regional offices, i.e. (England, Wales, Scotland) and each regional office has different combinations of areas of activities. They currently have a central database in their seat and my task is to "design a data distribution system. Regime that means something like the horizontal fragmentation / portrait? Also can someone point me to a specific example of the Oracle of creating a fragmented table? I tried to search online and found the keyword ' partition by ", but not much with the exception of database that links - but I think that it is more concerned with the mark than to actually create the fragments.

    Thank you very much for your time

    >
    I would like to create a Db (or data access system) for each region that contains the data for this region - only, for example in Wales has that one sector of activity must therefore only the entered information and used for staff in this area. Instead of completely replicating the entire DB in each regional office, I want to create the smallest region specific "fragments" of the central office DB.

    Regions should combine once a month for pay, etc., but the idea is to distribute the data locally. My task is to find the best solution for the scenario, put in balance the advantages and disadvantages
    >
    The simplest solution is what I suggested in my first answer.

    Use the central DB. Partition of the table as your sample; by region. RLS (row-level security) allows you to restrict the regions to their own data.

    Only a single "Central" table has ALL data regions; It is only in the partitions.

    The only real issue is that the regions will have access as a remote central DB. This isn't really a problem in this day and age. The largest companies have data centers and local regions or offices do not have their own DB.

    In my humble OPINION the replication should be AVOIDED unless it is absolutely necessary.

  • How to purge the tables using odi?

    Hello

    I want to purge the data in the target. That data my political is to remember that the only 90 days. I have to keep the only 90 days of data. How can I do this in ODI. I don't have a single column DATE.

    Thank you

    Kind regards
    AMSII

    If your existing date field can be used to identify records to be served, then you can simply create a procedure in ODI along the lines of

    delete of < %="odiRef.getSchemaName" ()="" %=""> . * your_table * where your_date_field< (sysdate="" -="">

    It of the easiest way, but beware of your index finger on the table, that they don't get too fragmented. You might also consider using a strategy of daily score on the table that would allow you to remove partitions over 90 days, which would be much faster.

  • Get the rank of the table selected in DialogOKAction

    I use JDeveloper 11.1.1.6

    In my example, I have a page fragment that includes a table reading with the button 'Add Row '. When the user clicks on the button 'Add Row', the following will occur:
    1. create the insertion occurs. The KP for this table is generated DB so that it is marked as not necessary in my model.
    2. a popup in windw dialogue form is created asking required data and not need to be completed.

    Now the user enters data and click on the OK button. The OK button calls a method that does the following.
    1 validates the data user and if OK we continue on another that I have send a message to the user to correct the data.
    2. the new line is posted. I must do this so that I can I hope to add value to the PK that is not created by the DB until the validation.

    I have 2 questions:
    1. I need to get this PK value so that I can write a record in a table of audit and also do something else with this value. I can't get that to work.
    2. After all other work, I want to return to the table with the new selected line. I can't get that to work either.


    I have attached the portion of my method in question below this 2 issues. 3 fault code lines are in bold. Could you please provide guidance as what I might want to try.






    BindingContainer lBindings = getBindings();

    now, I'm doing some validation before committing

    Validation of new line... must start now because the primary key is generated DB
    OperationBinding = lOperationBinding
    lBindings.getOperationBinding ("Commit");
    Object lResult = lOperationBinding.execute ();

    Download the new line
    DCIteratorBinding = lIteratorBindings
    (DCIteratorBinding) lBindings.get ("myTable1Iterator");
    ViewObject lVO = lIteratorBindings.getViewObject ();
    VORowImpl Lrowrequired = (VORowImpl) lVO.getCurrentRow ();

    Create and insert the Audit record
    RowIterator lAuditIterator = lRow.getAudit ();
    AuditVORowImpl = lAuditRow
    (AuditVORowImpl) lAuditIterator.createRow ();
    lAuditRow.setId (lRow.getId ()); _*
    set the other fields on the lAuditRow

    Validate the new line of verification
    lOperationBinding = lBindings.getOperationBinding ("Commit");
    lResult = lOperationBinding.execute ();

    refresh the VO
    DCIteratorBinding = lDciter
    (DCIteratorBinding) lBindings.get ("myTable1Iterator");
    Key lCurrentKey = lDciter.getCurrentRow () .getKey (); _*
    lDciter.executeQuery ();

    Define the new line created as the selected line in the table during update
    lDciter.setCurrentRowWithKey (lCurrentKey.toStringFormat (true)); _*

    refresh the page fragment "store Group view.
    AdfFacesContext.getCurrentInstance () .addPartialTarget (this.getTable ());

    User,
    I see two possible things to try.
    1. check the entity behind the new line and make the key attribute "update after inserting" to ensure that you get the key based on the sex of the db.
    2 use a sequence of db and you get the key before inserting the row into the db. Then you know the key.

    One last thing, you should check for errors after executing an operation...

    Timo

  • Change of primary key on the Table clears the other columns

    Preliminary info/Installation
    JDeveloper 11 g 11.1.1.6.0
    We have a table (object view or entity) that has 8 columns. The primary key is composed of 4 1 columns.
    The table is displayed in a page fragment.
    2 of the 4 non-primary key columns are LOV.
    All the 8 columns are needed.
    The table is editable including 2 of primary key columns.

    Question
    Assume that the table displays the 3 lines. If we change a rank 1 non-primary key column and a primary key in row 2 column, everything works well when we are committed to the database
    If, however, we first change a primary key column, then a primary key on a different line column, then the column/row primary key that changed us first, gets annihilated and the other columns LOV on this same line. The 2 columns that are not LOV keep data as it should. We then get a validation error because the required data are not present. All this happens before we try all commit to the database. If debug us and look the iterator, it has the old data in this document, before and after any performance on the binding.
    If we look at and update the data via the App Module, everything works well. We have tried to update the view, etc. through valueChangeListener also with no luck.

    If you change the primary key value, it should not be the primary key.

    This is true in the design of database relational regardless of how access you the data. In addition, EO don't like if you change the primary key value.

    Have you considered adding a surrogate key (use a sequence) and make your PK course a unique key?

    John

  • How to model in the tables of aggregate SPR with different years of data

    Can someone let me know how to accomplish the following in OBIEE?

    I want to create a table of logical facts with multiple sources of logical table. I have a global table that only stores the data of the current year. OBIEE, if a user creates a report using data from the current year, I hit the global table of the query. However, my facts database table stores data annually. If a user creates a report using data from previous periods, I want the application to hit the base of facts table.

    And if you're curious, that the aggregate contains only data of the current year as the ETL needs to do a full charge every night because of the complexity. The high volume of data and the amount of time it takes to complete this comprehensive way we only have time to fill in the data of the current year.

    Thanks in advance.

    Hello

    See Fragmentation in the link below

    http://108obiee.blogspot.com/2009/01/fragmentation-in-OBIEE.html

    Kind regards
    Sandeep

Maybe you are looking for