Update statistics using .GATHER_SCHEMA_STATS( options= 'GATHER AUTO')

Hi!
We have recently upgraded from Oracle 9.2.0.8 to Oracle 10.2.0.4. We are still running our nightly job, starting every day at 0400AM:
begin
dbms_stats.gather_schema_stats('TRADER', estimate_percent =>DBMS_STATS.AUTO_SAMPLE_SIZE, method_opt => 'for all columns size repeat', degree => DBMS_STATS.DEFAULT_DEGREE, cascade=>TRUE);
end;However the Oracle daily maintance window also gathers statistics and our nightly statistics gathering might be superflous. The Oracles nightly maintance window appears like a black box to me and I don't really know what happens there. Can anyone please point to some place where I can find more information related to that or even write some information in this thread?
Also, I have recently discovered the "GATHER AUTO" option for DBMS_STATS.GATHER_SCHEMA_STATS:
declare
    m_object_list    dbms_stats.objecttab;
begin
dbms_stats.gather_schema_stats(
    ownname        => 'TRADEDB',
    options        => 'GATHER AUTO',
    objlist        => m_object_list
end;
/We have a large OLTP enterprise system (approx 200GB just to give an indication), where there is a lot of DML on tables at various times of the day. Some tables may get outdated statistics before the nightly run.
Does it make sense to run the above "GATHER AUTO"-code every hour or half an hour to keep our schema statistics up to date?
Information about our database:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE     10.2.0.4.0     Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - ProductionThanks in advance for you help and please let me know if you need more information.

Can anyone please point to some place where I can find more information related to that or even write some information in this thread?http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/stats.htm#i41282
( from doing a quick search from the http://www.oracle.com/pls/db102/homepage )

Similar Messages

  • Can play audio after last update cant use feedback option either

    Dear Sir after the latest firefox update the most of the audio pop-ups from individual radio stations, from site that I am using religiously to listen to radio from my country of origin, dont play audio. However, I am able to open all audio pop-us when I use explorer. What is the problem and how can I fix it?
    many thanks
    PS I cannot even send this feedback by pressing submit feedback I had to use: ask a new question

    joqueza wrote:This is just frustrating. After doing a system upgrade (which upgraded xorg to version 1.5) I can't use the keyboard anymore. In fact, my screen would freeze also, as long as I was using the latest Xorg version. This machine's card is a geforce2 mx440..
    Perhaps you can find some help here http://wiki.archlinux.org/index.php/Xor … otplugging (or in one of the many threads about xorg 1.5 breaking input devices)
    No Idea about your problem after downgrading (expect just as a guess, there is some problem with xbinkeys when it is autostarted with the window manager -- http://bbs.archlinux.org/viewtopic.php?id=65468).

  • It it a necessary to enable monitoring if we use  GATHER_SCHEMA_STATS?

    It it necessary to enable monitoring if you use GATHER_SCHEMA_STATS with the GATHER AUTO or GATHER STALE options? What will happen if I donot enable monitoring and do the following:
    EXEC DBMS_STATS.GATHER_SCHEMA_STATS(ownname=>'SCOTT', options=>'GATHER AUTO');
    Thanks in advance,
    Lily. NYC.

    OPTIONS=> 'GATHER STALE'
    When executing dbms_stats, statistics are first flushed from SGA and then
    segments with stale stats are examined.
    Oracle will gather statistics on objects which have statistics considered to
    be STALE. This is done by looking at the tabmodifications views.
    Answering to your question, if you didn't enable table monitoring and run gather stale option, you wont get any error. Simple, oracle doesn't collect stats, since there is no information available in tabmodifications views.
    OPTIONS=>GATHER AUTO
    Oracle will gather automatically statistics on objects which currently have NO
    statistics (even if there have NO MONITORING) plus existing objects with STALE
    statistics. GATHER AUTO (just like GATHER STALE) requires monitoring to be turned
    on for the objects which have already statistics.
    If monitoring is not turned on, there is no way for Oracle to know which objects become state.
    Jaffar

  • Error while executing the table statistics using Brtools

    Dear Team,
    We are getting ORA-01031: insufficient privileges error whenever we have tried to execute the update or table statistics using brtools on our SAP development server. I have checked the permissions of sapcheck directory and changed it to 775 still error remains the same. I have observed, it is failing to create the sta or chk files in sapcheck directory after executing update statistics using Brtools.
    BR0291I BRCONNECT will be started with options '-p initDEV.sap -l E -f stats -t  "USTUD" -p 1'
    BR0280I BRTOOLS time stamp: 2010-07-20 12.02.33
    BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort:
    c
    BR0280I BRTOOLS time stamp: 2010-07-20 12.02.34
    BR0257I Your reply: 'c'
    BR0259I Program execution will be continued...
    BR0801I BRCONNECT 6.40 (50)
    BR0280I BRCONNECT time stamp: 2010-07-20 12.02.42
    BR0301E SQL error -1031 at location BrLicCheck-12
    ORA-01031: insufficient privileges
    BR0806I End of BRCONNECT processing: cedsegpe.log 2010-07-20 12.02.42
    BR0280I BRCONNECT time stamp: 2010-07-20 12.02.42
    BR0804I BRCONNECT terminated with errors
    I have checked the owner for SAPUSER table and it is showing as OPS$DEVADM
    Please, advise me on the same.
    Thanks and Regards,
    Kedar

    Dear All,
    Thanks for your responses.
    Permissions are set as below for br* files.
    sap-dev:devadm 23> ls -ltr br*
    -rwxrwxr-x   1 oradev     sapsys     3437688 Oct 31  2008 brarchive
    -rwxrwxr-x   1 oradev     sapsys     3547760 Oct 31  2008 brbackup
    -rwxrwxr-x   1 oradev     sapsys     4632408 Oct 31  2008 brconnect
    -rwxrwxr-x   1 devadm     sapsys     3850224 Oct 31  2008 brrecover
    -rwxrwxr-x   1 devadm     sapsys     1480656 Oct 31  2008 brrestore
    -rwxrwxr-x   1 devadm     sapsys     4837672 Oct 31  2008 brspace
    -rwxrwxr-x   1 oradev     sapsys     2175208 Oct 31  2008 brtools
    I guess it is fine because with these set of permissions, it is working absolutely fine in my quality system.
    QAS Permissions are as belows for your information
    sap-qas:qa1adm 22> ls -ltr br*
    -rwsrwxr-x   1 oraqa1     sapsys     3437688 Oct 31  2008 brarchive
    -rwsrwxr-x   1 oraqa1     sapsys     3547760 Oct 31  2008 brbackup
    -rwsrwxr-x   1 oraqa1     sapsys     4632408 Oct 31  2008 brconnect
    -rwxrwxr-x   1 qa1adm     sapsys     3850224 Oct 31  2008 brrecover
    -rwxrwxr-x   1 qa1adm     sapsys     1480656 Oct 31  2008 brrestore
    -rwxrwxr-x   1 qa1adm     sapsys     4837672 Oct 31  2008 brspace
    -rwsrwxr-x   1 oraqa1     sapsys     2175208 Oct 31  2008 brtools
    So do you feel still it has something to do with permissions?
    Thanks and Regards,
    Kedar

  • Gather Schema Statistics - GATHER AUTO option failing to gather stats

    Hi ,
    We recently upgraded to 10g DB and 11.5.10 version of Oracle EBS. I want to employ GATHER AUTO option while running Gather Schema Statistics.
    To test the working, I created a test table with 1 million rows. Then, stats were gathered for this table alone by using Gather Table Stats. Now, I deleted ~12% of rows & issued commit. The table all_tab_statistics shows that the table has stale statistics (stale stats column = YES). After that I ran Gather Schema Stats for that particular schema. But the request did not pick the test table to be gathered.
    What is the criterion on which Oracle chooses which all tables to be gather statistics for under Gather Auto option? I am aware of the 10% change in data, but how is this 10% calculated? Is it only based on (insert + update + delete)?
    Also, what is the difference between Gather Auto and Gather Stale ?
    Any help is appreciated.
    Thanks,
    Jithin

    Randalf,
    FYI.. this is what happens inside the concurrent progarm call.. there are a few additional parameters for output/ error msgs:
    procedure GATHER_SCHEMA_STATS(errbuf out varchar2,
    retcode out varchar2,
    schemaname in varchar2,
    estimate_percent in number,
    degree in number ,
    internal_flag in varchar2,
    request_id in number,
    hmode in varchar2 default 'LASTRUN',
    options in varchar2 default 'GATHER',
    modpercent in number default 10,
    invalidate in varchar2 default 'Y'
    is
    exist_insufficient exception;
    bad_input exception;
    pragma exception_init(exist_insufficient,-20000);
    pragma exception_init(bad_input,-20001);
    l_message varchar2(1000);
    Error_counter number := 0;
    Errors Error_Out;
    -- num_request_id number(15);
    conc_request_id number(15);
    degree_parallel number(2);
    begin
    -- Set the package body variable.
    stathist := hmode;
    -- check first if degree is null
    if degree is null then
    degree_parallel:=def_degree;
    else
    degree_parallel := degree;
    end if;
    l_message := 'In GATHER_SCHEMA_STATS , schema_name= '|| schemaname
    || ' percent= '|| to_char(estimate_percent) || ' degree = '
    || to_char(degree_parallel) || ' internal_flag= '|| internal_flag ;
    FND_FILE.put_line(FND_FILE.log,l_message);
    BEGIN
    FND_STATS.GATHER_SCHEMA_STATS(schemaname, estimate_percent,
    degree_parallel, internal_flag, Errors, request_id,stathist,
    options,modpercent,invalidate);
    exception
    when exist_insufficient then
    errbuf := sqlerrm ;
    retcode := '2';
    l_message := errbuf;
    FND_FILE.put_line(FND_FILE.log,l_message);
    raise;
    when bad_input then
    errbuf := sqlerrm ;
    retcode := '2';
    l_message := errbuf;
    FND_FILE.put_line(FND_FILE.log,l_message);
    raise;
    when others then
    errbuf := sqlerrm ;
    retcode := '2';
    l_message := errbuf;
    FND_FILE.put_line(FND_FILE.log,l_message);
    raise;
    END;
    FOR i in 0..MAX_ERRORS_PRINTED LOOP
    exit when Errors(i) is null;
    Error_counter:=i+1;
    FND_FILE.put_line(FND_FILE.log,'Error #'||Error_counter||
    ': '||Errors(i));
    -- added to send back status to concurrent program manager bug 2625022
    errbuf := sqlerrm ;
    retcode := '2';
    END LOOP;
    end;

  • IF Auto Update Statistics ENABLED in Database Design, Why we need to Update Statistics as a maintenance plan

    Hi Experts,
    IF Auto Update Statistics ENABLED in Database Design, Why we need to Update Statistics as a maintenance plan for Daily/weekly??
    Vinai Kumar Gandla

    Hi Vikki,
    Many systems rely solely on SQL Server to update statistics automatically(AUTO UPDATE STATISTICS enabled), however, based on my research, large tables, tables with uneven data distributions, tables with ever-increasing keys and tables that have significant
    changes in distribution often require manual statistics updates as the following explanation.
    1.If a table is very big, then waiting for 20% of rows to change before SQL Server automatically updates the statistics could mean that millions of rows are modified, added or removed before it happens. Depending on the workload patterns and the data,
    this could mean the optimizer is choosing a substandard execution plans long before SQL Server reaches the threshold where it invalidates statistics for a table and starts to update them automatically. In such cases, you might consider updating statistics
    manually for those tables on a defined schedule (while leaving AUTO UPDATE STATISTICS enabled so that SQL Server continues to maintain statistics for other tables).
    2.In cases where you know data distribution in a column is "skewed", it may be necessary to update statistics manually with a full sample, or create a set of filtered statistics in order to generate query plans of good quality. Remember,
    however, that sampling with FULLSCAN can be costly for larger tables, and must be done so as not to affect production performance.
    3.It is quite common to see an ascending key, such as an IDENTITY or date/time data types, used as the leading column in an index. In such cases, the statistic for the key rarely matches the actual data, unless we update the Statistic manually after
    every insert.
    So in the case above, we could perform manual statistics updates by
    creating a maintenance plan that will run the UPDATE STATISTICS command, and update statistics on a regular schedule. For more information about the process, please refer to the article:
    https://www.simple-talk.com/sql/performance/managing-sql-server-statistics/
    Regards,
    Michelle Li

  • How to check/verify running sql in lib cache is using updated statistics of table

    How to check/verify running sql in lib cache is using updated statistics of table used in from clause.
    one of my application table is highly busy i.e frequent update/insert/delete.
    we gather table stats every 30 min.

    Hello, "try dynamic sampling" = think "outside the box", maybe hit two birds with same stone.
    As a matter of fact, I was just backing up your statement: "30 minutes seems pretty extreme"
    cheers

  • Up/Down Arrow keys do not perform their function on SOME websites or at SOME times, on other websites and at other times these keys work fine, updated firefox, restarted computer. turned off cursor key option in Advanced tab, using autoscrolling option.

    Up/Down Arrow keys do not perform their function on SOME websites or at SOME times, on other websites and at other times these keys work fine, updated firefox, restarted computer. turned off cursor key option in Advanced tab, using autoscrolling option.

    You may have switched on [http://kb.mozillazine.org/accessibility.browsewithcaret caret browsing].
    You can press press F7 (on Mac: fn + F7) to toggle caret browsing on/off.
    See http://kb.mozillazine.org/Scrolling_with_arrow_keys_no_longer_works
    * Tools > Options > Advanced : General: Accessibility: [ ] "Always use the cursor keys to navigate within pages"

  • I have an Airport Express that I am trying to use connected by ethernet to my iMac G4 running Mac OS 10.4.11.  I need to update the Airport software in order to use security option WPA2 Personal.  I currently have Airport software v. 5.6.1.

    I have an Airport Express that I am trying to use connected by ethernet to my iMac G4 running Mac OS 10.4.11.  I need to update the Airport Express softwart in order to use security option WPA2 Personal to connect to the internet through my Airport Extreme.  I currently have Airport Express software version 5.6.1.  How can I update this software? (I can connect directly to my Airport Extreme by ethernet and download the update that way).  Is a later version of A E software available for download anywhere?   Any suggestions would be greatly appreciated.
    Thanks.

    Download and install AirPort Utility 5.4.2 for Mac OS X 10.4.11 "Tiger" here:
    AirPort Utility 5.4.2
    Once installed, launch AirPort Utility. It will tell you if a firmware upgrade is available for your Express.

  • I tried updating iphone 6 to 8.1.3 But the phone went dead. I have tried using restore options - both update and erase, but the process stops when it tries to update Iphone firmware.

    I tried updating iphone 6 to 8.1.3 But the phone went dead. I have tried using restore options - both update and erase, but the process stops when it tries to update Iphone firmware.

    Put your phone in DFU mode,
    Hold the Power Button (3 secs)
    Continue holding the power button and also hold the home button (15 secs)
    Release the power button while continuing to hold the home button (10 secs)
    Your device should prompt with the "Connect to iTunes Screen"
    Restore.

  • Hi. I am using iphone 3gs running on ios 5.1.1. I didn't find any software update option at any place in setting.  Please tell me how can i get it or how i would be able to download and install ios update without using computer

    Hi
    I am using iphone 3gs running on ios 5.1.1
    I didn't find any software update option at any place in setting.
    Please tell me how can i get it or how i would be able to download and install ios update without using computer

    Just use the phone the way it is, forget the apps.

  • I want to add an application like winrar useing rar file so i can auto download it all thet i have is a zip fill but i want a rar file too the option to auto download it is gray so i cant use it plz help me.

    i want to add an application like winrar useing rar file so i can auto download it all thet i have is a zip fill but i want a rar file too the option to auto download it is gray so i cant use it plz help me.
    == This happened ==
    Every time Firefox opened
    == all the time

    Here is the answer: Not an add on or plug-in! In fact you can get rid of all those useless plugins and add-ons! Go and get it. Im using the Alpha version right now and it works great. Works better then anything else .......add multiple links for all files sit back and relax. Its all done for you with no more intervention on your part! Check it out!
    http://wordrider.net/freerapid/
    Only one downside to this. No proper installer. You will have to copy the files to your respective programs folder.
    C:\Program Files\FreeRapid or C:\Program Files (x86)\FreeRapid
    Then create shortcuts to your desktop from FRD app. Thats it then start downloading!
    By the way this not an add. I just spent the whole night looking for the solution to this problem because I was so frustrated with the whole thing. I download tons of files and I have lots of other projects going and I dont have time for all this nonsense with RapidShare and Firefox. Hope this helps some other poor souls out there!

  • I used to be able to attach a document to an iCal entry.   After the latest update, it appears this option has been removed.  How can I add an attachment now?  Thanks!

    I used to be able to attach a document to an iCal entry.   After the latest update, it appears this option has been removed.  How can I add an attachment now?  Thanks!

    Hi Dan,
    Yes, iCal 4.0.4 (1395.7). In edit mode, the 'attachments' option is between 'Invitees' and 'URL' (see below). As I said this is for calendars under On My Mac, I suspect you are not seeing this as your event is on MobileMe.
    Best wishes
    John M

  • In the iCloud preferences, there is a message asking for software update to use the "find my mac" option.  However, my mac is updated.  What should i do?

    In the iCloud preferences, there is a message asking for software update to use the "find my mac" option.  However, my mac is updated.  What should i do?

    https://crash-stats.mozilla.com/report/pending/40811976-6063-4df1-b2ba-b82972110929
    https://crash-stats.mozilla.com/report/pending/1f1e849a-240e-4017-bbfc-485832110929
    https://crash-stats.mozilla.com/report/pending/2b3b5fc3-f3ed-47df-aa8e-293452110929
    https://crash-stats.mozilla.com/report/index/bp-9156003e-2cd4-488f-a6fb-195ff2110930
    https://crash-stats.mozilla.com/report/pending/7bc611b9-6d9d-4a4e-a32d-443ba2110929
    https://crash-stats.mozilla.com/report/pending/477fda1b-b03b-469e-ad85-878282110929
    https://crash-stats.mozilla.com/report/pending/4983f2ce-592c-4963-bcf5-319bb2110929
    https://crash-stats.mozilla.com/report/index/bp-25958efc-bef3-4366-a857-1cfa92110930
    https://crash-stats.mozilla.com/report/pending/881f2ee5-0b3c-4470-8590-401572110929
    https://crash-stats.mozilla.com/report/pending/7f30c50f-833e-41d3-946e-e66d62110930
    https://crash-stats.mozilla.com/report/index/bp-51bb0656-a417-42ff-87fb-b72942110930

  • Gather_database_stats_job_proc / gather auto

    Hi,
    I am trying to understand exactly what gather_database_stats_job_proc does, and how it uses the "gather auto" option.
    I've read article :http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14211/stats.htm#sthref1429
    The GATHER_DATABASE_STATS_JOB_PROC procedure collects statistics on database objects when the object has no previously gathered statistics or the existing statistics are stale because the underlying object has been modified significantly (more than 10% of the rows).The DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC is an internal procedure, but its operates in a very similar fashion to the DBMS_STATS.GATHER_DATABASE_STATS procedure using the GATHER AUTO option. The primary difference is that the DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC procedure prioritizes the database objects that require statistics, so that those objects which most need updated statistics are processed first. This ensures that the most-needed statistics are gathered before the maintenance window closes.
    and also Metalink Note:281793.1, but want to be clear on the following:
    can we gather stats on indexed columns only? - is this possible?
    Many thanks.

    Gareth,
    Thanks for the advice. I'm not sure that this will do what we require, as it does not allow you to specify "indexed columns only" (as you can directly from DBMS_STATS via the , method_opt => 'FOR ALL INDEXED COLUMNS SIZE AUTO' option).
    According to the link you provided, we could set AUTOSTATS_TARGET - (This parameter is applicable only for auto statistics collection. The value of this parameter controls the objects considered for statistics collection )
    When pname is AUTOSTATS_TARGET, the following are valid values:
    'ALL' - Statistics are collected for all objects in the system
    'ORACLE' - Statistics are collected for all Oracle owned objects
    'AUTO' - Oracle decides for which objects to collect statistics
    Regards,
    MarkB...

Maybe you are looking for

  • Can't save pdf in cs5 on mac, why?

    Anyone?

  • [Solved] Conky doesn't show network speed

    Hello Archers! I have my old conky config with net speed indication which worked in past but stopped working this installation. My user is in "network" group and I have ${font monospace:bold:size=10}NETWORK ${hr 2} ${font monospace:normal:size=10}Dow

  • How to throw a permanent exception during mapping?

    I'm using the java coding: "throw new RuntimeException(message);" to trigger an error during mapping. This will set the message status to: "System error, manual restart possible". How can I throw a permanent exception during mapping? So that the mess

  • Why are my apps changing when i change the orientation from landscape to portrait

    Recently, on my ipad mini retina, when i change the orientation from landscape to portrait, the apps change. For example, when i enter a game like impossible and change to landscape to play it and then exit the screen has shifted to either the right

  • Sort Contacts by Company Workaround

    I keep all contacts on the iPhone and do not sync. I create a complete contact record for each person and sort and display them by last name. I then create a "contact" for each company, putting the company name in the Last Name field. I then "Add Fie