How to reduce time for gather statistics for a table.

I have a table size 520 gb
Its one of the partition size is 38 gb
and total indexes of related table is 412 gb.
Server/instance details.
==========
56 cpu -> Hyper threading enable
280 gb ram
35 gb sga
27 gb buffer cache
4.5 gb shared pool size
25 gb pga
undo size 90gb
temp size 150 gb
Details :
exec dbms_stats.gather_table_stats('OWNER','TAB_NAME',PARTNAME=>'PART_NAME',CASCADE=>FALSE,ESTIMATE_PERCENT=>10,DEGREE=>30,NO_INVALIDATE=>TRUE);
when i am firing this in an ideal time when there is no load that time also is is taking 28 mins to complete.
Can anybody please reply me how can we reduce the stats gather time.
Thanks in advance,
Tapas Karmakar
Oracle DBA.

Enable tracing to see where the time is going.
parallel 30 seems optimistic - unless you have a large number of discs to support the I/O ?
you haven't limited histogram collection, and most of the time spent of histograms may be wasted time - what histograms do you really need, and how many does Oracle analyse for and then discard ?
Using a block sample may help slightly
You haven't limited the granularity of the stats collection to the partition - the default is partition plus table, so I think you're also doing a massive sample on the table after completing the partition. Is this what you want to do, or do you have an alternative strategy for generating table-level stats.
Regards
Jonathan Lewis

Similar Messages

  • Gather statistics or analyze table

    What is the difference between gather statistics for table and analyze table?
    Regards
    Arpit

    Analyzing a table is gathering statistics (whether you're using the old ANALYZE statement or the preferred dbms_stats package).

  • How to reduce time for replicating large tables?

    Hi
    Any suggestions on how to reduce the amount of time it takes to replicate a large table when it is first created?
    I have a table with 150 million rows in it, and it takes forever to start the replication process even if I run it in parallel, and I can’t afford the downtime.

    What downtime are you referring to? The primary doesn't need to be down when you're setting up replication and you're presumably still in the process of doing the initial configuration on the replicated database, so it's not really down, it's just not up yet.
    Justin

  • Suggested schedule for gather statistics on sysadm

    We have recently upgraded to 11.1.0.7 with psoft version 9.0 and tools 8.49 on sun solaris version 10. Currently we are running stats every night on all non work sysadm tables. I'm wondering if this is too much. We are seeing sql statements use different explain plans. For ex: one sql takes plan A and finishes in expected time. At some other point during the week that same sql will take plan B and will either never finish or take way too long.
    So I'm curious to see how other folks are handling their statistics.
    Other items of note:
    we disabled the nightly oracle statistics job
    our database is about 200 GB of used space
    In any feedback is much appreciated.

    Welcome to the forum!
    Whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION)
    >
    For example there is a table T1 with 25GB size (3 crores rows) and partitioned when i try generating statistics for a T1 table with below command it takes lots of time and i dont know what is the progress.
    >
    Your command will generate statistics for the entire table; that is, ALL partitions. Is that what you intended?
    Sometimes partitioned tables have historical data in older partitions and a small number of ACTIVE partitions where the amount of data changes substantially. You could collect stats only on the partitions that have large data changes. The older, static partitions may not need frequent stat collections since the amount of data that changes is small.
    If you are using 11g you could collect incremental statistics instead of global stats. Here is an article by Maria Colgan, an Oracle developer on the Optimizer team on stats.
    https://blogs.oracle.com/optimizer/entry/how_do_i_compare_statistics

  • SQL 2008 R2 Best Practices for Updating Statistics for a 1.5 TB VLDB

    We currently have a ~1.5 TB VLDB (SQL 2008 R2) that services both OLTP and DSS workloads pretty much on a 24x7x365 basis. For many years we have been updating statistics (full scan- 100% sample size) for this VLDB once a week on the weekend, which
    is currently taking up to 30 hours to complete.
    Somewhat recently we have been experiencing intermitent issues while statistics are being updated, which I doubt is just a coincidence. I'd like to understand exactly why the process of updating statistics can cause these issues (timeouts/errors). My theory
    is that the optimizer is forced to choose an inferior execution plan while the needed statistics are in "limbo" (stuck between the "old" and the "new"), but that is again just a theory. I'm somewhat surprised that the "old" statistics couldn't continue to
    get used while the new/current statistics are being generated (like the process for rebuilding indexes online), but I don't know all the facts behind this mechanism yet so that may not even apply here.
    I understand that we have the option of reducing the sample percentage/size for updating statistics, which is currently set at 100% (full scan).  Reducing the sample percentage/size for updating statistics will reduce the total processing time, but
    it's also my understanding that doing so will leave the optimizer with less than optimal statistics for choosing the best execution plans. This seems to be a classic case of not being able to have one’s cake and eat it too.
    So in a nutshell I'm looking to fully understand why the process of updating statistics can cause access issues and I'm also looking for best practices in general for updating statistics of such a VLDB. Thanks in advance.
    Bill Thacker

    I'm with you. Yikes is exactly right with regard to suspending all index optimizations for so long. I'll probably start a separate forum thread about that in the near future, but for now lets stick to the best practices for updating statistics.
    I'm a little disappointed that multiple people haven't already chimed in about this and offered up some viable solutions. Like I said previously, I can't be the first person in need of such a thing. This database has 552 tables with a whole lot more statistics
    objects than that associated with those tables. The metadata has to be there for determining which statistics objects can go (not utilized much if at all so delete them- also produce an actual script to delete the useless ones identified) and what
    the proper sample percentage/size should be for updating the remaining, utilized statistics (again, also produce a script that can be used for executing the appropriate update statistics commands for each table based on cardinality).
    The above solution would be much more ideal IMO than just issuing a single update statistics command that samples the same percentage/size for every table (e.g. 10%). That's what we're doing today at 100% (full scan).
    Come on SQL Server Community. Show me some love :)
    Bill Thacker

  • Synchronous Scenario. How to reduce time. Pls advice urgent.

    Hi All,
    I have Synchronous Scenario. It has no BPM , simple synchronous scenario (HTTP --- Webservice).
    It is taking 10 seconds. How can I reduce time of this scenario.
    Pls advice

    Hi,
    The Time Consumption is based on below factors
    1. the amount of data to be processed across the interface.
    2. The response time of Receiver system
    3. Type of Mapping used and implementations of any complex logics with Advanced UDFs etc
    4. Hardware configurations
    5. Resource Consumptions etc.
    please refer below fine tunning docs.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/489f5844-0c01-0010-79be-acc3b52250fd
    XI Performance Benchmarks ?
    Thanks
    Swarup

  • How to measure signal duration and statistics for each pulse

    The attached vi has data for the maximum value of six different cutting tools while machining a part for 48000+ consecutive cycles. How would I measure the length of time each tool was used before being changed??(when profile makes a large negative transition.) Since the first three tools are related to the same holes in the part, I would also like to be able to get statistics(average) for each individual peak to see how the life of one tool affects the other tools. I am not sure if I need to do some more averaging or a differentiation to detect slope change points?? The peak detection vi's did not work real well since the peaks are not a constant value each time. This is a version 7 file.
    Attachments:
    display_tooling_data_max_values.vi ‏1643 KB

    Judging by your graphs, what you need is a differential operation:
    Break the wire going from the MEAN output to the graph.
    Insert a TIME DOMAIN MATH block (from the ARITHMETIC AND COMPARISON palette)
    Make sure it's set for DIFFERENTIAL.
    Wire the output to your graph.
    See all those negative spikes? That's the transitions in your data. Put a threshold on those, and you'll determine where the changes are.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • How to prevent Time Evaluation to run for past date?

    Dear Friends,
    I have a problem with Time evaluation issue.
    While time evaluation runs with PDC recalculation date in 2010 its creating two different quota for an absence.
    So client donu2019t want to run time evaluation for before 31.12.2010.
    Please let me know how to do this.
    They donu2019t want to used earliest recalculation date filed for this purposes.
    Thanks and in advance,
    Anoop

    Hi,
    They want to use Earliest personal recalculation date for monthy locking.

  • How to reduce the number of bytes for a picture

    I want to reduce the number of bytes used for a picture to be sent to a site like Ebay or craigslist. I son't see any options in Iphoto for this purpose.

    You can do it in Preview.
    Open the image in Preview. Under Tools, click Adjust Size.
    Scale it down to the smallest acceptable size (the website should give a suggested resolution).
    Then go to File -> Export, save it as a Jpeg.
    Smaller size image means smaller file size.

  • Gather statistics for schema at OEM

    Hi,
    How do we gather schema statistics thru OEM?

    in V10+ once every 24 hours Oracle collects statistics by default job; so you do not need to take additional action
    Handle:      785301
    Status Level:      Newbie
    Registered:      Jul 29, 2010
    Total Posts:      36
    Total Questions:      17 (17 unresolved)
    so many questions without ANY answers.
    http://forums.oracle.com/forums/ann.jspa?annID=718
    Edited by: sb92075 on Dec 10, 2010 10:12 AM

  • How to set time delay in javascript for indesign cs2?

    while am running the js, am using function date.getMonth, date.getDate()...
    this function produce the error, which return the function as error message,
    if i set alert before running this every time , am not getting the errror
    how to solve this?
    thanks in advance
    subha

    Dear Subhaoviya
    Please use the below coding and get your date and Time functions
    var today = new Date();
    var myDate = today.getDate();
    Thanks & Regards
    T.R.Harihara SudhaN

  • How to Convert Time Stamp to String for Filename use

    I'm writing an Labview application in which I would like to convert pull time stamp infor from Time Stamp VI and convert to string so I can use to append as part of filename.
    The fomat that I want may look something like basefilename081208_1300.  This would represent a file name that has elements consisting of the date 08/12/08 and 13:00 hours zulu.
    Paul 

    Hello:
    Use the Format Date/Time String VI, and use as the format string the following: %d%m%y_%H%M
     This way you'll get the date string you want. 
    Then concatenate the output to other strings you need to name your file.
    I've attached an screenshot.
    Hope this helps.
    Robst.
    Robst - CLD
    Using LabVIEW since version 7.0
    Attachments:
    datetime string.JPG ‏20 KB

  • How to reduce Time taken by DSO Activation.

    Hi
    My Inventory Transaction DSO taking nearly 18min for 180,000 records to activate. It means it takes 1 min for every 10,000 records to activate. I think its too much.
    Is there any way i can reduce DSO activation time... what are factors that increases the DSO activation Time.
    Pls let me know if u have some idea  this issue.
    Thanks.....

    Hi,
      Some of the factors which affect DSO activation are
    1) Data volume and size of DSO (if the volume and no of fields are more then it takes long time)
    2) SID generation(uncheck this if the DSO is not used for reporting)
    3) Secondary index (remove unwanted secondary index)
    4) No of background jobs and packages siz allocated for activation (check the settings for ur DSO in tcode RSODSO_SETTINGS)
    Apart from this it also depends on database performance and other factors
    Regards,
    Raghavendra.

  • How to reduce time while deleting more than 300K records ?

    Hi,
    I am using SQL SEVER 2008 R2. I've a doubt, if there any possible to reduce executing time while deleting  more than 3 lakhs records. I will explain about the table structure. Table_Name : test. In that table have 15 Columns , 6 Indexes ,Foreign and
    Primary Key releationships. 
    Query :  DELETE FROM test WHERE roleid=1      [roleid is not primary key]
    Message: (308240 row(s) affected) 
    Time : 28 seconds.
    Cheers,
    RAM BHARATH

    Hi,
    I am using SQL SEVER 2008 R2. I've a doubt, if there any possible to reduce executing time while deleting  more than 3 lakhs records. I will explain about the table structure. Table_Name : test. In that table have 15 Columns , 6 Indexes ,Foreign and
    Primary Key releationships. 
    Query :  DELETE FROM test WHERE roleid=1      [roleid is not primary key]
    Message: (308240 row(s) affected) 
    Time : 28 seconds.
    Cheers,
    RAM BHARATH
    I suppose Roleid has index on it ?. 3 lac records getting deleted in 28 sec i think its ok as delete operation takes exclusive lock .Exclusive lock is not compatible with other locks so some delay might be expected 
    You should check blocking process if any by using sp_who2 to see if your process is waiting on any resource or is blocked by some other SPID.
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • How to reduce time when updating table with join of anther table

    Hi all,
    I am update table Policy1 using another table from other scheme
    Policy1 is in schema "TEST".
    TRN_POLICY_RISK_GIS is in Schema "TEST2".
    Now i am executing my query which is taking lot of time to update and make cpu utilization upto 45%.
    update policy1 set total_si = (select total_is from (select pol_sys_id,
    avg(nvl(pol_cvr_si,0)) total_si from TEST2.TRN_POLICY_COVER_GIS tpcg
    group by pol_sys_id ) b where p.pol_sys_id = b.pol_sys_id)
    Help to optimize to given query.

    update policy1    A
        set total_si =
           (select avg(nvl(pol_cvr_si,0))
               from TEST2.TRN_POLICY_COVER_GIS    B
              where B.pol_sys_id = A.pol_sys_id
    ;hopefully there is an index on TEST2.TRN_POLICY_COVER_GIS (POL_SYS_ID)

Maybe you are looking for

  • Printer driver for an HP LaserJet 1000 series for use with Windows 7

    The CD ROM HP LaserJet 1000 series printer driver is not recognized by my new Windows 7 PC. So the printer does not work. I've looked on the HP web site for compatible drives and get the hint that a Vista driver would work. Can someone please confirm

  • Oracle 8.1.5 on Windows XP

    Hi, I tried to Install Oracle 8.1.5 on Windows XP professional. It Installs completely, and then I created a Database through the Database Configuration Assistant and connect to that Database as well. Everything is working fine until I reboot my mach

  • How do I uninstall Reader 9.1.3 and Update 9.1.3-CPSID_49522 and reinstall Reader 8.1.3?

    I know this sounds backwards but I have been encountering many computer problems when I realized that Adobe Reader updates 9.1.2 and 9.1.3 plus Reader 9.1.3-CPSID_49522 were installed on my computer but the system requirements for these programs are

  • Mock RFP for SUN network management tool, desperate 4 help, just need specs

    OK, I have a project that in essence is a mock Request for Proposal (RFP), I play as an intern, & our instructor roleplays the manager we need to convince. The different network management tools that were available were for example; HP Openview, Cisc

  • Help in jwindow

    hi there i want to build an application with jwindow but i have a problem , the jwindow doesn't have a taskbar button how can i create one