10g Automatic Stats Collection -- AUTO ( METHOD_OPT)

I have implememted Oracle 10g Auto Stats collection feature. To generate new stats on 10g optimizer I deleted the schema stats and then scheduled the DBMS_SCHEDULER to collect stats in AUTO method_opt.
I see that the new 10g optimizer is collecting stats differently in different databases eben through they have the same data.
For exampl I see that it collected Histograms on 10 columns in one table in one environment but it generatd histograms only on 9 columns in another env.
I am concerned that the stats difference will result in the execution plan getting changed across different instances.
Can someone please clarify the cause of the same. How can I make sure tha the 10g optimizer is collecting stats uniformly across different envs.
Thank You

You wrote:
"I am concerned that the stats difference will result in the execution plan getting changed across different instances."
and you should be concerned.
I would recommend not collecting stats the way you are but rather to use a nuanced approach where you collect only when they are stale or only when you know that changes have rendered old statistics invalid.

Similar Messages

  • Comments on "Auto" Stats collection practice in 10g

    We going to implement auto stat collection practice in our production env. Can someone on this forum comment on the results / experiences ? As per Tom Kytes he is sceptical on going with this practice because it uses AUTO method_opt option which actually can result in different stats being collected based on column usage and data distribution.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:52288431326913.
    Thank You

    Hi
    Can someone on this forum comment on the results / experiences ?As for any "automatic feature" it works fine in many situations but not always. You have to test it to know if in your situation it is usable or not. IMHO it makes sense to give it a try...
    can result in different stats being collected based on column usage
    and data distribution.This is the purpose of AUTO. So, no news here.
    HTH
    Chris

  • Is 11g auto stats collection automatic on? where can I find this job?

    Is 11g auto stats collection automatic on?
    I manually created a 11g database, but I did not see auto stats collection job. where can I find this job? or how could I verify this is on?
    Thank you.

    Found in Automated Maintenance Tasks.

  • Auto Stats Collection on function based indexes

    In 10g does AUTO Stats Collection job in the default weeknight / weekend window collect stats on "function based indexes".
    Thank You
    Message was edited by:
    user449511
    I got the reply in another similar post posted by me some time earlier.
    Thank You
    Message was edited by:
    user449511

    SELECT job_name, comments
    FROM dba_scheduler_jobs;Then refine your search using the columns in the view.

  • Does Indes stats get auto collected when stats auto collection is on?

    In 10g and 11g, does Index stats get auto collected when stats auto collection is on (by default)? When do we need it? As I saw nothing in INDEX_STATS in both 10g and 11g.
    Thanks.

    Default is FOR ALL COLUMNS SIZE AUTO. statistics for indexes were also collected.
    Index stats will be populated only if you validate structure. The view INDEX_STATS is only populated after you run an analyze index name validate structure. if you log out you no longer see the statistics
    analyze index <index_name> validate structure;
    select * from index_stats;
    You'll see the information.
    Edited by: Anantha on Jan 12, 2009 2:16 PM
    Edited by: Anantha on Jan 12, 2009 2:25 PM

  • Auto optimizer stats collection interval

    Hi,
    I have a question about "auto optimizer stats collection" in 11gR2.
    I see on the history, 1 execution of "auto optimizer stats collection" on Monday, Tuesday, Wenesday, Thursday and Friday and 5 executions on Saturday and Sunday.
    I find the duration of each window (4 hours on Mon, Tue, Wen, Thu and Friday, 20 hours on Sat and Sun) and start date (22 hour Mon, Tue, Wen, Thur and Friday and 6h on Sat and Sun), but i don't find the interval between executions or frenquency of execution for each window.
    Someone can tell me, if is it possible to change this and where ?
    Regards,

    Thank's for all reply, but it's not the answer of my question.
    I know how disable/enable automatic task, i know to add/delete window, etc ... but where can i configure the frequency or interval of the "auto optimizer stats collection" task.
    I try to explain what i want to know.
    By defaut, on window Mon, Tue, Wen, Thu and Fri, the task start at 22:00 and run once, the window duration is 4 hours. Why one run ?
    On window Sat and Sun, the task start à 6:00 and run 5 times ( 6:00, 10:00, 14:00, 18:00 and 22:00), the window duration is 20 hours. Why 5 runs ? or why 4 hours between 2 runs ?
    Regards

  • Auto optimizer stats collection enabled, but not running and not showing up

    I enabled auto optimizer stats collection days ago, but it never ran. DB version is 11gr2, OS is redhat 5. It shows enabled in dba_autotask_client, but not in autotask_task. Please help on this issue.
    SQL> select client_name, status from dba_autotask_client;
    CLIENT_NAME STATUS
    auto optimizer stats collection ENABLED
    auto space advisor DISABLED
    sql tuning advisor ENABLED
    SQL> select task_name, status, to_char(last_good_date, 'YYYY-MM-DD HH24:MI:SS') last_good_date, last_good_duration
    from dba_autotask_task
    where client_name = 'auto optimizer stats collection'; 2 3
    no rows selected
    SQL> select program_action, number_of_arguments, enabled
    from dba_scheduler_programs
    where owner = 'SYS'
    and program_name = 'GATHER_STATS_PROG'; 2 3 4
    PROGRAM_ACTION NUMBER_OF_ARGUMENTS ENABL
    dbms_stats.gather_database_stats_job_proc 0 TRUE
    SQL> select w.window_name, c.autotask_status, c.optimizer_stats, w.repeat_interval, w.enabled
    -- , w.duration, w.last_start_date, w.next_start_date
    2 from dba_autotask_window_clients c , dba_scheduler_windows w
    3 4 where c.window_name = w.window_name
    5 order by last_start_date desc;
    WINDOW_NAME AUTOTASK OPTIMIZE REPEAT_INTERVAL ENABL
    MONDAY_WINDOW ENABLED ENABLED freq=daily;byday=MON;byhour=22;byminute=0; bysecond=0 TRUE
    SUNDAY_WINDOW ENABLED ENABLED freq=daily;byday=SUN;byhour=6;byminute=0; bysecond=0 TRUE
    SATURDAY_WINDOW ENABLED ENABLED freq=daily;byday=SAT;byhour=6;byminute=0; bysecond=0 TRUE
    FRIDAY_WINDOW ENABLED ENABLED freq=daily;byday=FRI;byhour=22;byminute=0; bysecond=0 TRUE
    THURSDAY_WINDOW ENABLED ENABLED freq=daily;byday=THU;byhour=22;byminute=0; bysecond=0 TRUE
    WEDNESDAY_WINDOW ENABLED ENABLED freq=daily;byday=WED;byhour=22;byminute=0; bysecond=0 TRUE
    TUESDAY_WINDOW ENABLED ENABLED freq=daily;byday=TUE;byhour=22;byminute=0; bysecond=0 TRUE
    7 rows selected.
    SQL>

    SQL> select max(last_analyzed) from all_tables where owner='ARAD';
    MAX(LAST_
    26-SEP-12

  • 'auto optimizer stats collection' in em12cr3

    During installation of EM 12cR3 the OUI noted to 'disable stats gathering job', and indicated it would disable for me.
    After installation I look at dba_auto_task and see that 'auto optimizer stats collection' is enabled.
    The install docs Overview of the EM Prerequisite Kit also say to disable this for the install and upgrade.
    What is not clear to me is:  "is this only for the install/upgrade?  should the collection be enabled after the install is complete?"

    Hi Sherrie,
    auto optimizer stats needs to be disable only during install and upgrade of 12c cloud control
    Once its done you can enable the auto optimizer stats collection at Repos DB level
    Regards,
    Rahul

  • Stat collection for VLDB 10g

    hi
    have large data warehouse db , we create a new partition on monthly basis problem is we need to force stat collection for those new partitions on weekly basis and rebuild relevant indexes,
    what are options and best practices for this particular release?
    its version 10.2
    thanks

    user9182826 wrote:
    hi
    have large data warehouse db , we create a new partition on monthly basis problem is we need to force stat collection for those new partitions on weekly basis and rebuild relevant indexes,
    what are options and best practices for this particular release?
    its version 10.2
    thanksVLDB, so what is the size of database?
    Is it possible to perform gather stats on whole database daily?
    if no other option then go for Round-Robin stats, so that for the large objects, perform gather stats on partitions as per your convenience.

  • How stop the automatic statistics collection job after the maintenance wind

    Hi,
    we are for a solution to stop the automatic statistics collection job after the maintenance window finished.
    we disable all jobs except the automatic statistics collection, because this is the only one we want to run. Then we define specific values for the interval and duration parameters of the maintenance window to customize this task.
    But for their systems it is very important that this job/task will immediately stop when the window is closed!!!
    So, how could we ensure this behavior.
    For Oracle 10g it is easy because the statistic job always exists and it is possible to set its duration and create an addtional event based job which kills all jobs that are running over duration.
    In Oracle 11g the statistic job is created by the system during the maintenance window is open.
    We are not able to modify parameters of this system job. After the maintenance window closed the job is already running - only with another resource priority - but it is running.
    Please help me in this scenario
    Thanks&Regards
    Prem

    ?So basically you are saying is if none of the tables are changed then GATHER_STATS_JOB will not run, but i see tables are updated still the job is not running. I did >query dba_scheduler_jobs and the state of the job is true and scheduled. Please see my previous post on the output
    Am i missing anything here, do i look for some parameters settings
    So basically you are saying is if none of the tables are changed then GATHER_STATS_JOB will not run,GATHER_STATS_JOB will run and if there are any table in which there's a 10 percent change in data, it will gather statistics on that table. If no table data have changes less than 10 percent, it will not gather statistics.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/stats.htm#i41282
    Hope this helps.
    -Anantha

  • How to disable automatic statistics collections on tables

    Hi
    I am using Oracle 10g and we have few tables which are frequently truncated and news rows added to it. Oracle automatically analyzes the table by some means which collects statistics of the table but at the wrong time(when the table is empty). This makes my query to do a full table scan rather using indexes since the statistics was collected when the table was empty.Could any one please let me know how to disable the automatic statistics collection feature of Oracle?
    Cheers
    Anantha PV

    Hi
    I am using Oracle 10g and we have few tables which
    are frequently truncated and news rows added to it.
    Oracle automatically analyzes the table by some means
    which collects statistics of the table but at the
    wrong time(when the table is empty). This makes my
    query to do a full table scan rather using indexes
    since the statistics was collected when the table was
    empty.Could any one please let me know how to disable
    the automatic statistics collection feature of
    Oracle?
    First of all I think it's important that you understand why Oracle collects statistics on these tables: Because it considers the statistics of the object to be missing or stale. So if you just disable the statistics gathering on these tables then you won't have statistics at all or outdated statistics.
    So as said by the previous posts you should gather the statistics manually yourself anyway. If you do so right after loading the data into the truncated table, you don't need to disable the automatic statistics gathering as it only processes objects that are stale or don't have statistics at all.
    If you still think that you need to disable it there are several ways to accomplish it:
    As already mentioned, for particular objects you can lock the statistics using DBMS_STATS.LOCK_TABLE_STATS, or for a complete schema using DBMS_STATS.LOCK_SCHEMA_STATS. Then these statistics won't be touched by the automatic gathering job. You still can gather statistics using the FORCE=>true option of the GATHER__STATS procedures.
    If you want to change the automatic gathering job that it only gathers statistics on objects owned by Oracle (data dictionary, AWR etc.), then you can do so by calling DBMS_STATS.SET_PARAM('AUTOSTATS_TARGET', 'ORACLE'). This is the recommended method.
    If you disable the schedule job as mentioned in the documentation by calling DBMS_SCHEDULER.DISABLE('GATHER_STATS_JOB') then no statistics at all will be gathered automatically, causing your data dictionary statistics to be become stale over time, which could lead to suboptimal performance of queries on the data dictionary.
    All this applies to Oracle 10.2, some of the features mentioned might not be available in Oracle 10.1 (as you haven't mentioned your version of 10g).
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle:
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Stats collection running long in 11g

    Oracle11.2.0.1
    Sun Solaris.
    Stats collection running long for almost 12 hours from 6PM to 6AM daily and stats collection autotask is getting STOPPED after the window duration.
    DBA_TABLES.last_analyzed is not getting updated after 2AM in the morning. I believe it is scanning some big tables, but not able to pin point the table/index.
    And we've some a bunch of 100GB tables in the DB. Is there a way to find out which table it's gathering stats between 2AM and 6AM and not getting completed?
    Thanks for your time!

    moreajays wrote:
    Hi,
    I would suggest to find out those tables with huge Table & last_analyzed is Null , these tables would be possible tables responsible for long run.
    Only AWR ot other SQL Hist stats tables can help you to get details.
    To fix this issue you should run stats gathering manually in day time (not in maintenance window) either with auto stats or with little estimate_percent (10 or 5)
    After getting first successful analyze (manually) , maintenance stats will pick up new incremental stats thereafter
    Ajay,
    I don't think that your statement that after the gathering the statistics manually, it would be next done incrmentally is correct. The incremental statistics are introduced only for partitioned tables AFAIK. Can you post a link from the documentation that your mentioned behavior exists?
    Aman....

  • Stats collection issue on 11.2

    Hello all,
    we have a oracle 11.2.0.3 enterprise edition database has auto optimizer stats collection is enabled
    but does not collect any stats, I tried to disable and enable the task with same result,
    database is been up for a month now,
    no rows listed in DBA_AUTOTASK_CLIENT_HISTORY, DBA_AUTOTASK_schedule,DBA_AUTOTASK_TASK
    statistics_level is set to typical,
    is there anything else I could check,
    Any help is appreciated,
    Thanks,
    Red

    rred wrote:
    Hello all,
    we have a oracle 11.2.0.3 enterprise edition database has auto optimizer stats collection is enabled
    but does not collect any stats, I tried to disable and enable the task with same result,
    database is been up for a month now,
    no rows listed in DBA_AUTOTASK_CLIENT_HISTORY, DBA_AUTOTASK_schedule,DBA_AUTOTASK_TASK
    statistics_level is set to typical,
    is there anything else I could check,
    Any help is appreciated,
    Thanks,
    Red
    SQL> show parameter queue
    NAME                         TYPE      VALUE
    job_queue_processes               integer      1000
    SQL> select job_name from dba_scheduler_jobs;
    JOB_NAME
    XMLDB_NFS_CLEANUP_JOB
    SM$CLEAN_AUTO_SPLIT_MERGE
    RSE$CLEAN_RECOVERABLE_SCRIPT
    FGR$AUTOPURGE_JOB
    BSLN_MAINTAIN_STATS_JOB
    DRA_REEVALUATE_OPEN_FAILURES
    HM_CREATE_OFFLINE_DICTIONARY
    ORA$AUTOTASK_CLEAN
    FILE_WATCHER
    PURGE_LOG
    MGMT_STATS_CONFIG_JOB
    JOB_NAME
    MGMT_CONFIG_JOB
    RLM$SCHDNEGACTION
    RLM$EVTCLEANUP
    POSPAY_CHECK_JOB
    15 rows selected.
    SQL>

  • Multi-page units of work with automatic state management

    Hi Jhs team:
    When my applications need to support an end-user task requiring data entry on many different web pages to complete,
    how to building multi-page units of work with automatic state management ? please give some instruction .

    Ting Rung,
    You can do this in two ways:
    - use a Struts form bean to collect all the values over the requests
    - submit the changes of each request to bc4j, but do not post and commit the changes to the database.
    The latter is easiest. For this to work, you must set the doCommit property of all your save actions in the stuts-condig to false, except for the last save action in the chain of requests.
    In addition, in your application module class, you need to overwrite method postChanges as follows:
    * DO NOT post the changes to the database
    public void postChanges() throws Exception
    // do not post here
    // posting will happen when the commitChanges
    // method on the handler is invoked
    Steven Davelaar,
    Jheadstart Team.

  • Dictionary stats collection

    Hi,
    We have been encountering several gc buffer busy and other waits on the objects that were present in the system tablespace lately.
    We have 4 node rac 11.1.0.7
    automatic optimizer statistics collection is disabled.
    After looking at the statistics we found that they were collected in 2009 and after collecting the dictionary statistics at 2:00am (statistics collection is complete at 2:00am) with estimate percent 100 on 1st node. The waits completely stopped at 4:00 am and didnt occur any more..
    Please clarity my following doubts.
    1. Importance/significance of collecting dictionary statistics.
    2. Should they be collected at regular intervals.
    3. statistics collection done at 2:00am and the waits stopped at 4:00am ---> 2 hours extra... (did oracle take 2 hours to realize this).
    Thanks,
    PVSTKR

    Disabling automatic statistics collection is wrong, as it will only update stale statistics (ie more than 10 percent of the table has changed)
    1 In 11g and higher, according to documentation, you should collect dictionary statistics
    2 Evidently yes
    3 Who can tell? We weren't there when you collected the statistics. Please note that when you collect statistics sql statements in the shared pool will be invalidated and require reparse.
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for

  • Need to develop a desktop application which can generate timetable

    Hi All, Below mentioned is my requirement: I need to create a desktop application whch can generate the time table automatically. Fields which we give as input are as follows: 1.No of classess 2.Teachers along with their subjects 3.Work load for each

  • Java Application for submission message in multiple forum at a time

    Hello, I want to build a Java desktop application by which I can be able to submit any message to my desired forum without login into the forum website. My application will be able to send the same message to as many forum I specify. I have not yet s

  • PO ORDCHG - idoc - releationship browser population Error

    Hi , I tried to create a purchase order and changed it. All the configurations for IDOC are working fine for Purchase order creation and Change. The IDOC generated for Purchase order create is populated in the Releation ship browser but however the I

  • Flatten form before e-mailing

    I have a PDF form for used as a bid/estimate. I'd like to be able to flatten it after filling out the fields before e-mailing it to a customer. And not just because I don't want them to edit it, but because when they open it on an iPhone or iPad (not

  • Creating projects in Issue Tracker 0.9 application

    How do I create a new project from within the applicationin in the Issue Tracker application available at OTN? Right now I manually enter the project into the ht_projects table