Query to check index rebuild progress check query

alter index EB.GL_TRN_PK_PRIM rebuild; its big index with millions rows, want to see its progerss, is there any query to check that how its doing?

Hi,
its big index with millions rowsI hope that you are running it in parallel. With 35 processes you should be able to do a million row index in under 10 minutes.
When I rebuild indexes, I pass the time run running a tablespace map on the target TS.
You can watch Oracle build the index nodes.
is there any query to check that how its doing?I use a script like this one:
http://www.dba-oracle.com/data_warehouse/tablespace_reorganization.html
Because Oracle retrieves the indoes in pre-sorted order, you can watch the new tree build in real-time . . .
Hope this helps . . .
Donald K. Burleson
Oracle Press author
Author of "Oracle Tuning: The Definitive Reference"
http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm

Similar Messages

  • Amount of temporary tablespace size used for index rebuild

    Hi All,
    I want to know approximate amount of temporary tablespace size used for index rebuild. I need this information to avoid the insufficient temporary tablespace error during the huge index rebuild.
    Is there a query or procedure to find it out.
    Thank you.

    Hi,
    While creating the index, the temporary segment is created in the permanent tablespace. So permanent tablespace must have sufficient space.
    http://www.oracle-base.com/articles/10g/SpaceObjectTransactionManagement10g.php
    http://aprakash.wordpress.com/2010/01/05/numeric-segment-name/
    Anand

  • Which index rebuild?

    Hi,
    i have question about index rebuild
    how can findout which index rebulid?

    Generally speaking, none of your indexes will need rebuilding, so forget all about them and let them do their work without fiddling with them.
    Right: there will always be a few exceptions to such general rules. There are no easy rules to follow, though, despite what some so-called experts will tell you.
    Classically, you are supposed to do analyze index blah validate structure and then query the view INDEX_STATS. If DEL_LF_ROWS divided by LF_ROWS is greater than about 0.25 (that is, 25% of the index is marked as deletable but hasn't been lately), and if that ratio doesn't improve by itself over the course of the next few days, then the index might be considered a candidate for a rebuild.
    Rather less classically, but rather more practicably, if you have metrics for how queries are supposed to perform and you regularly track against those metrics, then when the metric indicates a slow-down, you might at least investigate whether the index has blown out and could do with a bit of re-compaction.
    You might also reasonably rebuild your index if moving it into archive partitions or soon-to-be read-only tablespace, for then you will want the index to be as compact as possible.
    You might also very reasonably drop indexes before a bulk load and therefore equally reasonably re-create them after the load.
    Similarly, if you discover you got the order of columns wrong (because your queries always want to select things by column S and D, but your index is built on columns D, G and S), then you will be looking to drop and re-create the index from scratch.
    But most indexes really don't need routine maintenance.

  • Log space involved in Index Rebuilding

    Hello everyone..
    I read in one site that, an index rebuild requires space greater than or equal to the table on which it is defined and as a . Is that true?
    Already log grows when the index was first created right? Why does does it grows again when the index is rebuilt? 
    -- Thanks and Regards Srikar Reddy Gondesi, Trainee SQL Server Database Administrator Miracle Software systems, Inc.

    Hi,
    I will start fro the second point: A Log File is managed using a virtual blocks named VLF (Virtual Log Files).  A VLF is a basic unit whci can not get bigger or smaller after it is created. Increasing the log file or decreasing
    it, is done by adding or removing VLFs. You can not remove a VLS until all it content has been truncated.
    Each action is written in the log file according to the database backup mode (simple/bulk/full) and the action itself as mentioned in post above (check Andrew Bainbridge post above). therefor
    if you do an action that need to write the log file it will not use the older place and you need to use new place (place on VLF which is in unused status or build new VLF).  You can get more information on managing the Log File in this great presentation:
    http://cdn.prod.brentozar.com/wp-content/uploads/2012/09/How-SQL-Server-Stuff-Works-Log-Files.pdf
    or an Hebrw short blog: http://ariely.info/Blog/tabid/83/EntryId/130/Transaction-Log-File-Structure.aspx
    About the first point, i am not sure i understood your meaning, but if you asking if index get more place on disk then original table then the answer is basically no (but an index add to the original disk place and might use the same
    size or so). We can decide what information (column) is kept in the index Principle
    To clarify: If the question is related just to "what/when is written in the log file" then the answer of Andrew covers it. If the question "What/when causes
    the file to grow" then you need to read more on the VLF as mentioned here (written to log file do not necessarily grow the file size, in a well manage system theoretically the file should never grow/decrease).
    [Personal Site] [Blog] [Facebook]

  • Alter index rebuild question

    Hello experts,
    I have a simple question regarding rebuilding indexes...
    First, I am running 11.2.0.2 on Solaris 10.
    My reason for rebuilding is to relocate the indexes to their own tablespace, and while I recognize this is a subjective reason as far as performance is concerned, it makes administration easier.
    That being said, my question is in regards to use of "compute statistics" and also "online", and "nologging".
    Since I do want to minimize he impact to our users, and this table is one of the most used tables in the database, my syntax was going to be as follows:
    alter index <schema>.<index> rebuild online nologging tablespace <ts_idx> compute statistics;
    Questions:
    1.   does doing the rebuild online preclude queries against the table during the duration of the rebuild?
    2.   does use of nologging improve speed of rebuilding
    3.   is it advisable to include the "compute statistics".  I believe I read on Jonathan Lewis' page that statistics are gathered automatically and to include "compute statistics" was not necessary when rebuilding an index.
    And I guess one final question is whether I can include all the options in the same rebuild statement as I have shown above?
    I've tested the above in our test database, but it seems to hang when using the online option (with all the other options).
    Thanks in advance.

    Excellent resource.  Thanks for the link.  While I've read most of those discussions on either Jonathan's or Richard's web sites already, it is a good presentation and reference.
    Unfortunately, it does not answer either of the questions that I asked.  The reason I asked those questions is because the answers you gave contradict what i read in Oracle documentation (although it might be version specific).
    Also, it does seem to be slightly faster to rebuild using nologging (in my test environment).
    I've tested this with multiple indexes and the timing is slightly improved consistently.
    {quote}
    SQL> ALTER INDEX ARADMIN."T2179_C1_0944_1037" REBUILD LOGGING TABLESPACE REMEDY_IDX;
    Index altered.
    Elapsed: 00:00:10.68
    SQL> ALTER INDEX ARADMIN."T2179_C1_0944_1037" REBUILD nologging TABLESPACE REMEDY_IDX;
    Index altered.
    Elapsed: 00:00:08.50
    {quote}
    The use of online, however, seems to "hang" for some reason, even in my test database while no one else is logged into the database except me.
    Referencing Oracle's documentation, it says that rebuilding an index online does not allow queries against the base table.  This is why I asked this question, but your answer is different than Oracle's.  In this case, however, it is for Oracle 10.2, so not sure if this is still true for 11.2.
    Ref.  Oracle Text SQL Statements and Operators
    [ONLINE]
    ONLINE enables you to continue to perform updates, inserts, and deletes on a base table; it does not enable you to query the base table.
    You cannot use PARALLEL with ONLINE. ONLINE is only supported for CONTEXT indexes.
    Now, regarding the use of "compute statistics", I am pretty sure I recall reading either in Jonathan's papers, or in Richard's papers, that this is not necessary and/or is redundant.  But then why would Oracle include this as an option.  This is counter intuitive, which again is why I'm asking.  Do you know if any reference that can clear this up?

  • Index rebuild - temporary segment

    Hi,
    I am getting an error while rebuilding the indexes, like unable to allocate extents in temporary segment. Kindly help me to solve this.
    Regards,
    Mathew Collins

    You should never drop an index with the intention of recreating it without first checking the size of the index against the size of the available temp tablespace sort area.
    If you are using an alter index rebuild to reorganize the index then unless you specify a new tablespace in the command the existing tablespace must have enough free space to hold the entire original index and the rebuilt index. An alter index rebuild also uses temporary (sort) tablespace so you still need to ensure that your index has not outgrown your temp tablespace.
    HTH -- Mark D Powell --

  • Limiting index rebuild time

    Is there a way to limit the time a rebuild index command will run so it will die at a specific time or after a given interval so as not to interfere with a scheduled job?
    Joe Torre DBA III County of Riverside, CA

    Joe,
    Great, thank you for the information.
    First, an index rebuild can be done online or offline... but either way, if it's killed then all of the work done is lost. It's all or nothing with a rebuild.
    What I would suggest to you is two things:
    1. Only perform maintenance on the indexes that absolutely need it. This can be done by investigating sys.dm_db_index_physical_stats()
    2. During your maintenance windows (though it's an online operation so it could be done all day) reorganize the indexes. If you need to kill it, the progress stays. It can be used in an iterative fashion as the progress is not lost, even if it's killed.
    When you notice you have a good amount of internal or external fragmentation even after reorgs are complete, that's when you will need to do a rebuild and if you can only get so many done at a time so be it.
    One last thing I'd like to leave you with. Since T-SQL is completed step by step in a batch, you may want to create something using service broker that can rebuild the indexes. This way you can control how many outstanding items there are at once and take
    into account hardware such as CPU and Disk IO, etc. The service broker part allows the procedures to be run asynchronously. That would allow you to potentially get through many more index rebuilds than running them all in one script, potentially, if your hardware
    is beefy enough and the server activity is low.
    I hope this helps.
    Sean Gallardy | Blog |
    Twitter

  • Index rebuild

    Hi Team,
    Please tell me any difference b/w alter index <index> rebuild or alter index <index> rebuild move.
    Is there any difference that more space will be released if I move index to diffrenet tablespace and move move back to orginal tablespace.
    I know that if we use move option we can move index to different tablespace,
    Regards,
    jit

    Even if you would do lots of dml's, that's not certainly means that you need the rebuilding of the index. If your assertion is based on this that there would be some "holes" within the leaf blocks which wont be reused and would require a rebuild, it's wrong then since Oracle would take care of these things on its own. So again, what criteria, other than an OLTP db you used to conclude that you need rebuilding of indexes?
    But I just wanted to know If I go for alter index rebuild or alter index rebuild move and move back the indexes, which option will be best for me mean by which option I can reclaim more space.Well, I am sorry to say but I think you really don't know very well both the commands. The commands don't differ in the space reclaim given by them but in the way they do the rebuild. Please read the documentation to know what both commands do and how? BTW, from where you picked the command alter index rebuild move since I am not sure that such command exists?
    Aman....

  • Different b/w index rebuild and index rebuild online

    hi..guys could u plz tel me difference between index rebuild and index rebuild online

    There is no difference in both the commands. Both will rebuild the index structure from the scratch.But in the first case with only Rebuild, as long as the index, its temporary segment is not prepared and merged together, index is not available for the other users for use. The Online clause makes the index available for others even while being rebuild.
    Rebuilding index online has the same concept of creating them online to some extent,
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96521/indexes.htm#3062
    HTH
    Aman....

  • Help With Zen Vision:M 30G, lost alot of music, "rebuilding" progress bar doesnt fin

    I purchased my Zen Vision:M 30GB player about 5 months ago and its been great untill today I turned it on and it froze, so i hit the reset button.
    Heres the thingI reset it and that "Rebuilding" progress bar poped up like it has in the past when i hit reset?But this time the progress bar only got about? /6th of the way full, before the unit returned to its normal menu, and i went to look at my music and about 90% of it is gone! Ive done a restart in the past and the rebuilding progress bar would have to fill up all the way before it would go to the normal menu and i had no problems with it then, just today it started doing the thing where it would only go /6th the way. Heres the weird stuff,I went to look at the system information to look how much memory was left and based on the numbers, my 90% of missing music should still be on there somewhere. I tried connecting it to my computer and all the sudden now my computer decides to recognize it but The Creative Media Explorer will say its not connected, that is a first for me too?I tried doing that system recovery thing, where i did the scan disk but that did not help at all. Everytime i try to re-boot or re-start it does that thing where the "Rebuilding" progress bar only goes /6th of the way before it goes back to the normal menu, i think that has somthing to do with it. Any help would be GREATLY appreciated?Message Edited by Lowalkoroc on 03-7-20070:20 PM
    Message Edited by Lowalkoroc on 03-7-20070:20 PM

    I was just about to post a topic about this. I had the same problem and after numerous efforts I decided to follow the "Format (All)" instructions [url="http://forums.creative.com/creativelabs/board/message?board.id=dap&message.id=5530#M5530">here[/url]. After a reformat, a reboot, and a reload of all my songs everything is working again. Thank the Lord and the Creative forums.

  • In EM 10g, i didn''t see alert like index rebuild(same was in 9i)

    in EM 10g, i didn''t see alert like index rebuild(same was in 9i)
    Do you know, which alert was being obsoleted in EM 10g grid

    In 10g, how to create an alert, which send mail who identify indexes which may benefit from rebuild

  • Index Rebuild in Oracle 7

    Hi DBA's,
    DB Details: ORACLE 7 , Machine : P-III : VMWARE..
    I am getting an error in prod like follows,
    24-may-2011 04:24:33 am: start rebuilding the index on the table ...
    alter index
    ERROR at line 1:
    ORA-01652: unable to extend temp segment by 168168 in tablespace SFX_INDEX
    doubt:
    why does the error say "extend temp segment" for the permanent index tablespace.
    We have 3000MB Free space in Same tablespace & we have 2000MB free space in Temp also.But Still it is Giving error in "ORACLE 7 "
    Any Idea...
    Help me soon .

    user11919409 wrote:
    DB Details: ORACLE 7 , Machine : P-III : VMWARE..
    I am getting an error in prod like follows,
    24-may-2011 04:24:33 am: start rebuilding the index on the table ...
    alter index
    ERROR at line 1:
    ORA-01652: unable to extend temp segment by 168168 in tablespace SFX_INDEX
    doubt:
    why does the error say "extend temp segment" for the permanent index tablespace. Because when you rebuild an index, the new index structure starts life as a temp segment (and so can be easily dropped in case of failure) and gets renamed and reassigned as the index segment once the index rebuild process is complete.
    >
    We have 3000MB Free space in Same tablespace & we have 2000MB free space in Temp also.But ; Still it is Giving error in "ORACLE 7 "
    It's the free space in the SFX_INDEX tablespace that's the problem, you don't have 168168 free contiguous blocks within the tablespace necessary for the index (the actual amount of space this corresponds to is of course is dependent on your block size).
    Cheers
    Richard Foote
    http://richardfoote.wordpress.com/

  • Index rebuilding slow in Oracle 10g

    We are trying to build indexes in Oracle 10g and its extremely slow. Any pointers to find out what the problem is and then fixing it?
    I am using a syntax like:
    alter index INDEX_NAME rebuild tablespace TABLESPACE_NAME online compute statistics parallel;
    Should online and parallel together be an issue? (I don't necessarily need to do online, I just removed online and started again, but not sure how it will go)

    user8294047 wrote:
    We are trying to build indexes in Oracle 10g and its extremely slow. Any pointers to find out what the problem is and then fixing it?
    I am using a syntax like:
    alter index INDEX_NAME rebuild tablespace TABLESPACE_NAME online compute statistics parallel;
    Should online and parallel together be an issue? (I don't necessarily need to do online, I just removed online and started again, but not sure how it will go)In addition to the advices you've already got regarding index rebuilding in general:
    If you're using the ONLINE rebuild option it might take a while if there are active transactions on the table, since it waits until no transactions are active to start the rebuild process, the same applies to the completion of the ONLINE operation.
    Of course, you should get an "ORA-00054 resource busy" error when this is the case when using the normal (offline) rebuild option without the ONLINE keyword.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Oracle Sys table index rebuild

    hi, expert
    I am new to this expert Forums
    Blow Table Index are rebuild,This table are relation with sys user or not?
    after rebuild index, getting error in alert log file
    ORA-00600: internal error code, arguments: [psdnop-1], [1410], [], [], [], [], [], [], [], [], [], []
    ORA-01410: invalid ROWID
    when trying to select * from dba_network_acls getting error massage Rowid invalid
    ALTER INDEX CTXSYS.SYS_C003684 REBUILD;
    ALTER INDEX CTXSYS.SYS_C003683 REBUILD;
    ALTER INDEX CTXSYS.SYS_C003682 REBUILD;
    ALTER INDEX CTXSYS.SYS_C003681 REBUILD;
    ALTER INDEX CTXSYS.SYS_IOT_TOP_54056 REBUILD;
    ALTER INDEX CTXSYS.SYS_C003677 REBUILD;
    ALTER INDEX CTXSYS.SYS_IL0000054052C00002$$ REBUILD;
    ALTER INDEX CTXSYS.SYS_IOT_TOP_54044 REBUILD;
    ALTER INDEX CTXSYS.SYS_C003675 REBUILD;
    ALTER INDEX CTXSYS.SYS_IOT_TOP_54038 REBUILD;
    ALTER INDEX CTXSYS.SYS_IOT_TOP_54031 REBUILD;
    ALTER INDEX CTXSYS.SYS_IOT_TOP_54028 REBUILD;
    ALTER INDEX CTXSYS.SYS_IOT_TOP_54018 REBUILD;
    ALTER INDEX CTXSYS.DR_STOPLIST_PK REBUILD;
    ALTER INDEX CTXSYS.DR_STOPLIST_UNIQ REBUILD;
    ALTER INDEX CTXSYS.DR_THS_BT REBUILD;
    ALTER INDEX CTXSYS.DR_UNIQ_THS_BT REBUILD;
    ALTER INDEX CTXSYS.SYS_IOT_TOP_54003 REBUILD;
    ALTER INDEX CTXSYS.DR_THS_RINGID REBUILD;
    ALTER INDEX CTXSYS.DR_UNIQ_THS_PHRASE REBUILD;
    ALTER INDEX CTXSYS.SYS_C003629 REBUILD;
    ALTER INDEX CTXSYS.SYS_C003626 REBUILD;
    ALTER INDEX CTXSYS.SYS_C003627 REBUILD;
    ALTER INDEX CTXSYS.SYS_IOT_TOP_53991 REBUILD;
    ALTER INDEX CTXSYS.SYS_IOT_TOP_53963 REBUILD;
    ALTER INDEX OLAPSYS.SYS_C004604 REBUILD;
    ALTER INDEX OLAPSYS.SYS_C004600 REBUILD;
    ALTER INDEX XDB.SYS_C003740 REBUILD;
    ALTER INDEX XDB.SYS_C003741 REBUILD;
    ALTER INDEX XDB.SYS_C003742 REBUILD;
    ALTER INDEX MDSYS.UNIQUE_CLASS_CONSTRAINT REBUILD;
    ALTER INDEX MDSYS.UNIQUE_USER_CONSTRAINT REBUILD;
    ALTER INDEX MDSYS.UNIQUE_LRS_GEOM_LAYER REBUILD;
    ALTER INDEX MDSYS.UNIQUE_NETWORK_LAYER REBUILD;
    ALTER INDEX MDSYS.UNIQUE_NETWORK_LINK_LAYER REBUILD;
    ALTER INDEX MDSYS.UNIQUE_NETWORK_NODE_LAYER REBUILD;
    ALTER INDEX MDSYS.UNIQUE_NETWORK_PATH_LAYER REBUILD;
    ALTER INDEX MDSYS.UNIQUE_NETWORK_PATH_LINK_LAYER REBUILD;
    It is possible to recreate this index again to solve this problem, or any other solution.
    Thanks in Advance sir,

    Pl do not post duplicate threads - Oracle sys Index rebuild then Getting error Invalid Error Ora-01410

  • On Index Rebuild in 10g

    My partitioned table has 150 Million records with average row length of 444. I need to add 8 million more records from another non partitioned table, which will fit into 2 partitions of earlier table.
    I have set database to no force logging, disabled all foreign keys and using APPEND hint to add the rows. I suppose this won't generate redo logs for table.
    Now to reduce redo logs due to indexes, I am planning to set them unusable and then skip the unusable indexes (any unique index will be in used state as Oracle needs to enforce integrity). I can do this for partitioned indexes and rebuild required partitions alone.
    But I have around 12 global single column(with maxlength of 25 bytes) indexes . so my question is, if I rebuild the index offline (as online rebuild scans the full table- Doc ID: 272762.1), will it scans the full table or the existing index, which is in unusable state?
    Or is there any other approach? I suppose I can try using partition exchange option but I still need to deal with those indexes.

    Rebuilding unusable Index scans the table rather than the original index. Also we cannot build it online.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1669403535933#11145054166877

Maybe you are looking for