How much time it take to rebuild an index for a table with 20 millions rows

Hi all,
i need to rebuild the index of a table containing 20 000 000 row (i don't know why the other people working on this didn't think of rebuilding the index regularly, because i asked and apparently it has never been done :cry: :cry:) i am not a sql developper nor a DBA so i can't mesure how long it take to rebuild the index, does any one have an idea (aproximativly of course :aie:), the other question is there any formula to use in order to calculate how often to rebuild the indexes (i can for example retieve how much rows are delated or inserted daily ...)
Thanks again
Taha

taha wrote:
:aie: that's why i am asking because i don't know (and to be sure which solution is best)
so the table is like this (the columns) :
45 varchar2, 5 timestamp, 30 Number no LOB columns, (15 indexes : 5 unique indexes and that those indexes uses at a maximum 4 columns)15 indexes - 100,000 deletes: this could mean 1,500,000 block visits to maintain index leaf blocks as the table rows are deleted. If you're unlucky this could turn into 1,500,000 physical block read requests; if you're lucky, or the system is well engineered this could be virtually no physical I/O. The difference in time could be huge. At any rate it is likely to be 1,500,000 redo entries at 250 - 300 bytes per entry for a total of about 400MB of redo (so how large are your redo logs and how many log switches are you going to cause).
yes the tables is used by an application so (update, insert ) can take place at any time
for the deletion , there is the batch which does a mass delete on the table ( 4 or 5 time each day)
You haven't answered the question - how long does it take to do a sample batch delete.
If you can enable SQL tracing, or take a before/after snapshot of v$sesstat or v$session_event for the session as it does the delete then you can get some idea of where the time is going - for all you know it might be spending most of its time waiting for a lock to do away.
>
"How many leaf blocks are currently allocated to the index(es) ?" how can i answer to this question ? may be if i check the all_objects table ?
If you keep your statistics up to date then dba_indexes is a good place, cross-checked with dba_segments, and you can use the dbms_space package for more detail. I have a code sample on my blog which allows you to compare the current size of your indexes with the size they would be if rebuilt at some specific percentage: http://jonathanlewis.wordpress.com/index-sizing/ (It's such good code that Oracle Corp. has copied it into MOS note 989186.1)
Regards
Jonathan Lewis

Similar Messages

  • How much time will take applyning SP11 level in ECC6.0

    Hi,
    How much time will take for appying SP11 level in ECC6.0.
    Regards,
    venkat reddy.

    hi,
    Make sure , that you increase the shared memory being utilized by database .
    In oracle we increase the SHARED POOLSIZE , that will reduce the time in ACT_700 .
    There is note which talks about the SHARED_POOL_SIZE , it should be minimum 500 mb , depending upon your total physical RAM and CPU.
    Thanks
    Prasanna

  • I bought a mac book pro and apple promised upgradation to lion aosx but yet nothing rcvd , want to ask how much time it takes for them to send me the code to download it (now its more than a week i purchased this mac)

    i bought a mac book pro and apple promised upgradation to lion aosx but yet nothing rcvd , want to ask how much time it takes for them to send me the code to download it (now its more than a week i purchased this mac)

    http://www.apple.com/macosx/uptodate/

  • How much time iphone take to restore 10gb

    while connecting to itunes it shows restore so if i off icloud it wil not show?

    taha wrote:
    :aie: that's why i am asking because i don't know (and to be sure which solution is best)
    so the table is like this (the columns) :
    45 varchar2, 5 timestamp, 30 Number no LOB columns, (15 indexes : 5 unique indexes and that those indexes uses at a maximum 4 columns)15 indexes - 100,000 deletes: this could mean 1,500,000 block visits to maintain index leaf blocks as the table rows are deleted. If you're unlucky this could turn into 1,500,000 physical block read requests; if you're lucky, or the system is well engineered this could be virtually no physical I/O. The difference in time could be huge. At any rate it is likely to be 1,500,000 redo entries at 250 - 300 bytes per entry for a total of about 400MB of redo (so how large are your redo logs and how many log switches are you going to cause).
    yes the tables is used by an application so (update, insert ) can take place at any time
    for the deletion , there is the batch which does a mass delete on the table ( 4 or 5 time each day)
    You haven't answered the question - how long does it take to do a sample batch delete.
    If you can enable SQL tracing, or take a before/after snapshot of v$sesstat or v$session_event for the session as it does the delete then you can get some idea of where the time is going - for all you know it might be spending most of its time waiting for a lock to do away.
    >
    "How many leaf blocks are currently allocated to the index(es) ?" how can i answer to this question ? may be if i check the all_objects table ?
    If you keep your statistics up to date then dba_indexes is a good place, cross-checked with dba_segments, and you can use the dbms_space package for more detail. I have a code sample on my blog which allows you to compare the current size of your indexes with the size they would be if rebuilt at some specific percentage: http://jonathanlewis.wordpress.com/index-sizing/ (It's such good code that Oracle Corp. has copied it into MOS note 989186.1)
    Regards
    Jonathan Lewis

  • How much time it takes for a job status to get updated in to TBTCO table?

    Hi all,
    We have a program that fetches the Job count and job name from a third party tool(UC4) and then searches for the status of the job in the TBTCO table.
    In some rare cases we found that the TBTCO table had not updated with the Job details when the call was made to it.
    Do we have any SAP scheduler settings which determines after a particular time the status gets refreshed in the TBTCO table once the job is triggered?

    hi may be checking Sy-subrc and using wait for X seconds should be a convenient way to code.
    I doubt if there is any schedule to update the table..

  • How much time take unlock

    I have recieved the confirmation from my carrier (sunrise Switzerland) that my iphone will be unlocked in three days.
    Please can you help me and inform how much time will take the unlocking because three days has gone.

    iPhone: Troubleshooting authorised unlock issues
    http://support.apple.com/kb/TS3198

  • How Much time you spend

    Hi All
    I was wondering seeing you experts :) ... like N.gassparato.. billy... blushadow..michael.. cd.. danny... and a lot others..
    even after knowing so much in this technology....still you all are very active in this forum...i would like to know
    how much time you epxerts spend in a day for this forum alone :) ... just out of curiosity...
    Regards
    Mj

    >
    how much time you epxerts spend in a day for this forum alone ... just out of curiosity...
    >
    It depends: Not enough. Or too much. ;-)
    Personally I'd say I spend about an hour (spread over the day) reading postings, maybe a bit more if I develop a small PL/SQL / SQL solution for a problem that presents a nice challenge. "SQL and PL/SQL" is my preferred topic, followed by "OracleXE". I like the "Database General" part, although I'm not contributing that much there - I'm simply a developer, DBA jobs are not my daily bread, aside from my OracleXE instance which drives my blog. Learning something new from others, day by day, is what keeps me coming back to this place.
    @sp009: Does your supervisor know that you're "here"? Personally I wouldn't want to work for someone who doesn't want me to improve upon my skills by using communities such as this one.
    C.

  • How much time is on that Playlist-Burning CD

    Is there a better, even slightly more sophisticated way of determining just how much time is on a playlist? For burning to a CD?
    I'm trying to burn a CD that holds 80 minutes, or 700 MB. I know that what that really means is that the CD can accommodate about 74 minutes of recorded time.
    In iTunes, the particular playlist says I've used about 1.3 hours.
    What does that mean?
    How does iTunes calculate the "." something? Does the .1, .2, .3, .4, etc. translate into a defined amount of minutes?
    Does the memory, or size of the particular tune factor in? I didn't think so. I've just been looking at "time." (By the way, all of the tunes on this playlist are AIFF. Didn't bother to convert them to MP3 or AAC.) But I would if I had to. (Just a lot more time and work.)
    There must be a better way of measuring just how much time one has included in a Playlist for burning.
    Any thoughts, advice, suggestions would be very much appreciated.
    P.S. As always, iTunes "Help" has been of no help. Unless they're keeping it a secret somewhere.

    HangTime,
    You're here in iTunes too? You're everywhere. What the heck would I do without you?
    As always, you are right. Problem solved.
    But one more thing, when I went to print out the song list for the CD, the order was all changed. In an order I don't comprehend. How do I get it to print out the songs in the order I have them on my playlist? I need that, to put into the CD sleeve. Have no idea why it came out all jumbled up. Totally, random. Tried to show lists according to Artist, Album, Song, etc. to no avail.

  • Possible to check how much time an update statement on a table would take ?

    Hello @all
    I have a table with a fragmented Index, the table has an actula "user_updates" from 226'699.
    How can i find out how much time an update on this table takes ?
    i would like to check if there is any performance increase when i regroup the index (rebuild), cause the index has a fragementation of 85% now... (or should i delete the index completely) cause there are no user_seeks... only user_updates on the table...
    and i thought that indexes only makes sense if users are reading from the table... am i wrong ? (cause on every update from the table, the index (indexes) have to be updated too...
    Thanks and Regards
    Dominic

    Rebuilding the index will not likely result in a modification be quicker. At least not more than marginal. In fact, it might wven be slower, since if you currently have space on the index page for the new row and then rebuild so you *don't* have space then
    the index rebuild will make that update be slower (at least for the cases where you get page splits). 
    However if the index isn't used to find rows (any of the other three columns), then you have an index which only cost you and doesn't help you!
    Tibor Karaszi, SQL Server MVP |
    web | blog
    Tibor, check out this forum thread:
    http://social.technet.microsoft.com/Forums/sqlserver/en-US/64ad4f52-2fd8-4266-b4a4-5657c8870246/needed-more-answerers?forum=sqlgetstarted
    Ed Price, Power BI & SQL Server Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • HT4623 I found an update ios6 in my iphone settings and then I tapped on  install ,but it is going on and nothing is displaying .Only apple logo is displaying  frequently.It has been happening  for 13 hours.my question is how much time it will take to upd

    Can anybody help in my concern below
    I found an update ios6 in my iphone settings and then I tapped on  install ,but it is going on and nothing is displaying .Only apple logo is displaying  frequently.It has been happening  for 13 hours.my question is how much time it will take to update ios

    Read this: iOS 4: Updating your device to iOS 5 or later
    ... oh I think it is a 3gs or a 3
    This makes a difference. What does it say in Settings > General > About?

  • How much time does an AP take to failover to secondary controller

    hi All,
    My query is to understand how much time will an AP take to failover to its secondary WLC(Backup) incase primary goes offline.
    Whats the heartbeat time for each AP to verify reachability to WLC.
    also what is the purpose of AP Fail over priority under each AP. i want to ensure AP's fall back to primary WLC once its back online.(Preemption)

    Hi Matehw,
    My query is to understand how much time will an AP take to failover to its secondary WLC(Backup) incase primary goes offline.
    We can not tell exact time but normally It takes 1-3 minutes.
    Whats the heartbeat time for each AP to verify reachability to WLC.
    AP Heartbeat Timeout - AP sends heartbeat to WLC (By default its 30s). Once the primary WLC(or where AP is connected to)goes down, With heartbeats, the AP realizes sooner that the controller has become unreachable.
    also what is the purpose of AP Fail over priority under each AP.
    First of all there are three types: it goes like this Cirtical...high...medium..low.
    ***To configure AP failover priority, we must enable AP Fallback feature globally and then individual APs with a suitable priority level. 
    *** When using both the local  and global backup configurations, the locally configured settings take precedence in the event of a controller failure. If an AP is not able to join any of the locally configured controllers, it then tries to join the global backup controllers.
    More info:
    http://rscciew.wordpress.com/2014/01/22/ap-failover/
    Regards
    Dont forget to rate helpful posts

  • Want to upgrade RAC 10.2.0.2 database (2 instances) to 10.2.0.5. DB size is 4 TB. Contains mostly .pdf files, reports. I do not have test/upgrade environment. How much time I can expect it will take?

    Want to upgrade RAC 10.2.0.2 database (2 instances) to 10.2.0.5. DB size is 4 TB. Contains mostly .pdf files, reports. I do not have test/upgrade environment. How much time I can expect it will take?
    How much the upgrade process depends of database size, in this case?
    I have fast boxes  IBM AIX 5.3 , 64 b.

    Appreciate your comments ...
    Yes, sound stupid, regarding test environment, but in reality, is not that much:
    -I do have "preprod" environment, (2 instances RAC) same releases of OS, OCW,RAC ... but DB size is 40 GB!!!  It has all the objects as production, but (again but) it does not have physical standby, as production has. This is not that unusual, knowing that production DB grows very fast, and very large, and business do not want to keep preprod, dev, test databases same HUGE size as production is. Savings ...
    -My DB upgrade depends if application  running on top of it is certified for higher RDBMS release ... looks like they have some problems.
    -Very encouraging sounds comment that DB upgrade does not depend that much of the DB size ...
    - i do not recall from where this info came, but I have heard that R 11.* treats PDF files in different way that R10 did it ... and because of that, process of upgrading big databases which have many items of that type (pdf) can take very long. Any idea about this?
    -Brian, thx ... I'm trying hard to provide DB simmilar size in UPG environment and face all possible pitfalls before I go in production...thx for youe advice. I'm relly interested in how upgrade to 11.* from 10.* traets my pdf-s ... All my TBs comming from pdfs. Everi advice will be wellcome ...

  • How much time does it usually takes for moderator approval for a post

    How much time does it usually takes for moderator approval for a post?
    I have a post posted on Mar 9 and it is still pending for moderator approval.

    It's impossible for anyone here to say. It could be very quick, or a given book may never appear. As RG said, it's completely up to the publisher in the applicable country.
    Regards.

  • How much time does the dowload of photoshop CC take ?

    How much time does the dowload of photoshop CC take ?

    Hi Saurabh,
    I am facing the same problem. It is taking very long time in "Create Database Schema".
    How the problem got resolved for u?
    My Laptop capacity is 500 GB (USB), 2 GB Ram, Dual Core Processor.
    Any idea how long it will take in this configuration?
    Thanks in advance.
    Vijay G

  • How much time does the ESS import take?

    Hi,
    How much time does import of ESS into NWDI take?
    I have selected following files for import yesterday:
    SAP-JEE
    SAP-BUILDT
    SAP-ESS
    SAP-JTECHS
    SAPPCUI_GP
    and looked at it today and it is still importing.
    In CMS Transport Studio State column displays message:  Import running.
    Any ideas why it takes so long?
    Regards,
    Ladislav

    Hi,
    I have imported files one by one in this order:
    SAP-JEE
    SAP_BUILDT
    SAP_JTECHS
    SAPPCUI_GP
    SAP_ESS
    Is this order correct?
    I didn't import EP_BUILDT - is it required?
    I have checked the CBS logs and there is one broken DC in SAPPCUI_GP compartment
    in the pcui_gp/isr development component.
    The build log contains this error:
        [javac] Compiling 316 source files to /usr/sap/PDI/JC26/j2ee/cluster/server0/temp/CBS/3/.B/22/t/0C0A08ED5B9ACC3F0164FD6D8A0DB879/classes
         [javac] ERROR: /usr/sap/PDI/JC26/j2ee/cluster/server0/temp/CBS/3/.B/22/t/0C0A08ED5B9ACC3F0164FD6D8A0DB879/gen_wdp/packages/com/sap/pcui_gp/isr/isrprocessevent/FcISRProcessEvent.java:470: cannot resolve symbol
         [javac] ERROR: symbol  : method getWebContextAdapter ()
         [javac] ERROR: location: interface com.sap.tc.webdynpro.services.task.ITask
         [javac] ERROR:                               .getCurrentTask()
         [javac] ERROR:                                                                ^
         [javac] WARNING: Note: Some input files use or override a deprecated API.
         [javac] WARNING: Note: Recompile with -deprecation for details.
         [javac] 1 error
    Maybe because of this error the requests are queued?
    How to fix this?
    Regards,
    Ladislav

Maybe you are looking for

  • Unable to get IP on one ssid of a two ssid autonomus 1141 AP

    We recently added a second ssid at a remote site AP but the clients cannot get an IP. They get associated to the AP but no IP. The ssid we added is using the default vlan 1 which is where the dhcp server is located. The other ssid vlan 101 is the vis

  • Account modification key for movement type 643

    Hello Experts, I am reaching out to you today as I am in need of some info on Account assignment for Goods issue process. I looked at transaction OMWN or OMJJ for movement type based settings. I am running a business process ' Intercompany stock tran

  • Is there a way to record video from the iSight camera

    Running Mavericks on an early 2008 iMac. iMovie 08 says 'NO CAMERA CONNECTED." Recording from QuickTime Player no longer has a perference panel, and the videos recoded are jerky and sound is bad. I can't find any soluion on youTube - they all say jus

  • ME51N for consumable Material through COST CENTER

    Hi all I got the ERROR : <b>Create Acc. 400000 for 19.09.2007 as a cost element in controlling area 1000</b>. This error came when i was creating PR for consumable material i.e. Tcode ME51N Help me solve this Problem Pradeep

  • What is portDetect.log

    what is portDetect.log