Setting of Optimizer Statistics Gathering

I'm checking in my db setting and database is analysing each day. But as I notice there are a lot of tables that information shows last analysis in about month ago... Do I have to change some parameters?

lesak wrote:
I don't have any data that show you that my idea is good. I'd like to confirm on this forum that my idea is good or not. I've planned to make some changes to have better performance of query that read from top use tables. If this is bad solutions it's also important information for me.One point of view is that your idea is bad. That point of view would be to figure out what the best access for your query is and set that as a baseline, or figure out what statistics get you the correct plans on a single query that has multiple plans that are best with different values sent in through bind variables, and lock the statistics.
Another point of view would be to gather current plans for currently used queries, then do nothing at all unless the optimizer suddenly decides to switch away from one, then figure out why.
Also note the default statistics gathering is done in a window, if you have a lot of tables changing it could happen that you can't get stats in a timely fashion within the window.
Whether the statistics gathering is appropriate may depend on how far off histograms are from describing the actual data distribution you see. What my be appropriate worry for one app may be obsessive tuning disorder for another. 200K rows out of millions may make no difference at all, or may make a huge difference if the newly added data is way off from what the statistics make the opitmizer think it is.
One thing you are probably doing right is to recognize that tuning particular queries may be much more useful than obsessing over statistics.
Note how much I've used the word "may" here.

Similar Messages

  • Optimizer Statitics Gathering Task is not updating stale statistics

    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production PL/SQL Release 11.2.0.2.0 - Production
    ******************** List stale statistics for Schema IGR using dbms_stats.gather_database_stats **************************
    DECLARE
    ObjList dbms_stats.ObjectTab;
    BEGIN
    dbms_stats.gather_database_stats(objlist=>ObjList, options=>'LIST STALE');
    FOR i in ObjList.FIRST..ObjList.LAST
    LOOP
    IF ObjList(i).ownname = 'IGR' THEN
    dbms_output.put_line(ObjList(i).ownname || '.' || ObjList(i).ObjName || ' ' || ObjList(i).ObjType || ' ' || ObjList(i).partname);
    END IF;
    END LOOP;
    END;
    IGR.USER_INFO TABLE 189 < --------------------- 189 Tables with stale statistics
    PL/SQL procedure successfully completed.
    **************************** Check date IGR Table(s) last analyzed ***********************************************
    SELECT MAX(last_analyzed) last_analyzed
    FROM dba_tables
    WHERE owner = 'IGR'
    LAST_ANALYZED
    14-DEC-11
    *************************** Check status of Task 'auto optimizer stats collection' **********************************
    SELECT client_name, job_name, job_status, job_start_time
    FROM dba_autotask_job_history
    WHERE client_name = 'auto optimizer stats collection'
    ORDER BY job_start_time
    CLIENT_NAME JOB_NAME JOB_STATUS JOB_START_TIME
    auto optimizer stats collection ORA$AT_OS_OPT_SY_11952 SUCCEEDED 12-FEB-12 10.07.23.059313 AM EUROPE/LONDON
    auto optimizer stats collection ORA$AT_OS_OPT_SY_11955 SUCCEEDED 12-FEB-12 02.07.33.879238 PM EUROPE/LONDON
    auto optimizer stats collection ORA$AT_OS_OPT_SY_11958 SUCCEEDED 12-FEB-12 06.07.43.783262 PM EUROPE/LONDON
    auto optimizer stats collection ORA$AT_OS_OPT_SY_11961 SUCCEEDED 12-FEB-12 10.07.54.206488 PM EUROPE/LONDON
    Any suggestions welcome
    Thanks
    Steve

    Thank you for the feedback.
    I have manually updated the statistics on a single Table successfully and the Table has been removed from the list of stale statistics. So this is further evidence the daily Task "Optimizer Statistics Gathering Task" is failing to update stale statistics.
    Any further comment or suggestion welcome
    Thanks
    Steve
    SQL> SELECT owner, table_name, last_analyzed, num_rows
    FROM dba_tables
    WHERE owner = 'IGR' AND table_name = 'SYSAUDIT';
    OWNER TABLE_NAME LAST_ANAL NUM_ROWS
    IGR SYSAUDIT 14-DEC-11 59036
    1 begin
    2 dbms_stats.gather_table_stats(
    3 ownname=> 'IGR',
    4 tabname=> 'SYSAUDIT',
    5 estimate_percent=> 100,
    6 cascade=> DBMS_STATS.AUTO_CASCADE,
    7 degree=> null,
    8 no_invalidate=> DBMS_STATS.AUTO_INVALIDATE,
    9 granularity=> 'AUTO',
    10 method_opt=> 'FOR ALL COLUMNS SIZE AUTO');
    11* end;
    PL/SQL procedure successfully completed.
    SQL> /
    OWNER TABLE_NAME LAST_ANAL NUM_ROWS
    IGR SYSAUDIT 13-FEB-12 104970

  • Disable Automatic Optimizer Statistics

    Hi there
    I wanted to query user_tab_modifications to track, number of rows updated in a week. Since this view is refreshed automatically when Automatic Optimizer Statistics gathers statistics, i disabled the Automatic Optimizer Statistics. Now i am executing execute dbms_stats.FLUSH_DATABASE_MONITORING_INFO(); manually to get the view populated with number of rows updated.
    My concern here is , will i get the exact number of rows updated in a week from user_tab_modifications by doing this ? Also, is there anything else that is also updating this view apart from optimizer statistics that are gathered on a table.
    Thanks

    You could try writing some PLSQL on your own.
    How about :
    SQL> create table count_X_updates (update_count number);
    Table created.
    SQL> insert into count_X_updates values (0);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL>
    SQL> create table X (col_1 varchar2(5), col_2 varchar2(5), col_3 number);
    Table created.
    SQL> insert into X values ('a','first',1);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL>
    SQL> create or replace trigger count_x_updates_trg
      2  after update of col_1,col_2,col_3
      3  on X
      4  for each row
      5  declare prev_cnt number;
      6  begin
      7  update count_X_updates set update_count = update_count+1;
      8* end;
    SQL> /
    Trigger created.
    SQL>  update x set col_1 = 'b', col_2='secnd',col_3=2;
    1 row updated.
    SQL> commit;
    Commit complete.
    SQL> select * from count_X_updates;
    UPDATE_COUNT
               1
    SQL>  update x set col_1 = 'c' where col_3=2;
    1 row updated.
    SQL> commit;
    Commit complete.
    SQL> select * from count_X_updates;
    UPDATE_COUNT
               2
    SQL> select * from x;
    COL_1 COL_2      COL_3
    c     secnd          2
    SQL>Note : This trigger code has to be improved because
    a. Multiple sessions might get the same value
    b. It introduces a point of serialisation -- multiple session will wait on a row lock on the table count_X_updates -- effectively meaning that all other sessions attempting to update X will wait (even if they are updating different rows in X) till each preceding one issues a COMMIT.
    So, this demo code is only to show you PLSQL Triggers. But it cannot be used in Production.
    Practice some PLSQL. Read up on autonomous transactions.
    Hemant K Chitale

  • Optimizer Statistics collection after upgrade from 8i to 10R2

    I just upgraded database from 8.1.7 to 10R2 .
    What would the best approach for Optimizer Statistics collection. We would like to open database for test , but I afraid some quries going to run slow without latest stats. Should I run it manually or let Oracle run it’s default stats collection job later on.
    Any suggestions?

    user594143
    You really need a strategy before an upgrade like this, but you have two options -
    a) try to make the 10g stats collection identical to the 8i stats collection. Check the code you used to run, check the 8i default values for the parameters in your current dbms_stats() calls, and write them in explicitly when you run the code under 10g.
    OR
    b) do a full 10g conversion. Get rid of your own collection code, clear out most of the old settings you had in your parameter file for fiddling with the optimizer, do a 'gather_schema_stats' then leave 10g to do its default thing and fix any problems that appear.
    If you have testing time on a non-production system, then (b) is the strategic option - although personally I think it tends to collect too many histograms and still needs some refinement; if you don't have any testing time and you're going straight into production then (a) is the least threatening option (and if someone's made you do that, you might also set the optimizer_features_enable to 8.1.7 until you can do some proper upgrade tests).
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk

  • Automatic Optimizer Statistics Collection Enabled still tables not analyzed

    Hello,
    We have Oracle 11g R1 database. Our automatic Optimizer Statistics Collection settings are enabled, still I don't see the tables being analyzed, any suggestions if I am missing any settings. All tables do get analyzed if I do manual statistics gathering.
    SQL> select CLIENT_NAME ,STATUS from DBA_AUTOTASK_CLIENT;
    CLIENT_NAME STATUS
    auto optimizer stats collection ENABLED
    auto space advisor ENABLED
    sql tuning advisor ENABLED
    Thanks,
    SK

    user599845 wrote:
    Hello,
    We have Oracle 11g R1 database. Our automatic Optimizer Statistics Collection settings are enabled, still I don't see the tables being analyzed, any suggestions if I am missing any settings. All tables do get analyzed if I do manual statistics gathering.
    SQL> select CLIENT_NAME ,STATUS from DBA_AUTOTASK_CLIENT;
    CLIENT_NAME STATUS
    auto optimizer stats collection ENABLED
    auto space advisor ENABLED
    sql tuning advisor ENABLED
    Thanks,
    SK
    still I don't see the tables being analyzed, post SQL & results that lead you to this conclusion.
    realize that statistics can be "collected" without updating LAST_ANALYZED column.
    if data within table does not change, the nothing would be gained by "updating" statistics to same values as now/before.

  • Database contains stale optimizer statistics

    I am upgrading from oracle 9.2.0.7 to 10.2.0.3 , During inital stages I get the following warning message "WARNING: --> Database contains stale optimizer statistics.
    .... Refer to the 10g Upgrade Guide for instructions to update" .How can I handle this before upgrade
    I have the folloiwng parameters set in my paremeter file for optimizer
    Optimizer_mode=choose
    optimizer_index_cost_adj=32
    hash_area_size = 2024000
    query_rewrite_enabled=FALSE
    star_transformation_enabled=FALSE
    Thank you
    Message was edited by:
    tcklion

    .... Refer to the 10g Upgrade Guide for instructions to update"
    Sybrand Bakker
    Senior Oracle DBA

  • How to check the progress of statistics gathering on a table?

    Hi,
    I have started the statistics gathering on a few big tables in my database.
    How to check the progress of statistics gathering on a table? Is there any data dictionary views or tables to monitor the progress of stats gathering.
    Regds,
    Kunwar

    Hi all
    you can check with this small script.
    it lists the sid details for long running session like
    when it started
    when last update
    how much time still left
    session status "ACTIVE/INACTIVE". etc.
    -- Author               : Syed Kaleemuddin_
    -- Script_name          : sid_long_ops.sql
    -- Description          : list the sid details for long running session like when it started when last update how much time still left.
    set lines 200
    col OPNAME for a25
    Select
    a.sid,
    a.serial#,
    b.status,
    a.opname,
    to_char(a.START_TIME,' dd-Mon-YYYY HH24:mi:ss') START_TIME,
    to_char(a.LAST_UPDATE_TIME,' dd-Mon-YYYY HH24:mi:ss') LAST_UPDATE_TIME,
    a.time_remaining as "Time Remaining Sec" ,
    a.time_remaining/60 as "Time Remaining Min",
    a.time_remaining/60/60 as "Time Remaining HR"
    From v$session_longops a, v$session b
    where a.sid = b.sid
    and a.sid =&sid
    And time_remaining > 0;
    Sample output:
    SQL> @sid_long_ops
    Enter value for sid: 474
    old 13: and a.sid =&sid
    new 13: and a.sid =474
    SID SERIAL# STATUS OPNAME START_TIME LAST_UPDATE_TIME Time Remaining Sec Time Remaining Min Time Remaining HR
    474 2033 ACTIVE Gather Schema Statistics 06-Jun-2012 20:10:49 07-Jun-2012 01:35:24 572 9.53333333 .158888889
    Thanks & Regards
    Syed Kaleemuddin.
    Oracle Apps DBA
    Mobile: +91 9966270072
    Email: [email protected]

  • Creteria for generating optimizer statistics

    Dear membes,
    Oracle 10.2.0.2
    os : HP-UX 11i
    I want to know is there any creteria for generating optimizer statistics
    for the production database, like we have a creterai for rebuilding indexes
    through checking the index_stat table.
    Is there any tables present in database for this kind pre checking before
    generating the optimizer statistics.
    Thanks.

    VIRENDER SINGH wrote:
    Dear membes,
    Oracle 10.2.0.2
    os : HP-UX 11i
    I want to know is there any creteria for generating optimizer statistics
    for the production database, like we have a creterai for rebuilding indexes
    through checking the index_stat table.
    Is there any tables present in database for this kind pre checking before
    generating the optimizer statistics.First of all I hope you've heard that rebuilding indexes is something that should only be done under very rare circumstances, see e.g. here or here.
    Since you're on 10g already you should be aware of the fact that the database is coming with a pre-configured default statistics collection job that runs every night and attempts to gather statistics on stale objects (either with no statistics at all or more than 10% changes since the last statistics gathering).
    If you're having an application that modifies large chunks of data in batch jobs, then you should consider gathering statistics right after these batch modifications because otherwise it might take too long until the default job is activated and refreshes the statistics and many execution plans until then might suffer from the incorrect/outdated statistics.
    Ideally you should know your application and data and work out when to gather the statistics and in particular how to gather the statistics and in some cases even use hand-crafted statistics (using the DBMS_STATS.SET__STATS procedures) that lead the optimizer in the desired direction.
    There are many potential pitfalls to consider, e.g. the default method for generating histograms has changed in 10g to "FOR ALL COLUMNS SIZE AUTO" which means you'll get histograms for columns that are used in WHERE clauses (when using equal or range comparisons) and have skewed data or contain large gaps in the values. This was not the case in 9i and not always does the existence of histograms change execution plans for the better, in particular if you're using bind variables.
    In addition 10g introduced the possibility of "out-of-range" predicates which means that the optimizer takes into account if a predicate value is outside the recorded minimum and maximum value of the column. If the gap is becoming significant the selectivity is adjusted and eventually you get an estimate of 1 (or actually 0 adjusted to 1) rows which can have dramatic effects on your execution plans.
    This means you need to be careful if the default "staleness" of 10% changes is applicable to your particular situation otherwise you might be confronted with execution plans that either deteriorate over time and/or "switch" at a certain point in time to a really "bad" plan to due the adjusted selectivity caused by the "out-of-range" predicates. If this is the case you should consider refreshing the statistics more often (using your own logic/job) to avoid such situations.
    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/

  • Understand Oracle statistics gathering

    Hi experts,
    I am new in Oracle performance tuning. can anyone tell me what the mean of "Oracle statistics gathering" in simple words/way. i has read it from Oracle site http://docs.oracle.com/cd/A87860_01/doc/server.817/a76992/stats.htm.
    But i am not understand it properly. It Any role in oracle performance tuning? Does it make good performance of Oracle DB???
    Reg
    Harshit

    Hi,
    You can check this in some Easy way :ORACLE-BASE - Oracle Cost-Based Optimizer (CBO) And Statistics (DBMS_STATS)
    >> It Any role in oracle performance tuning? Does it make good performance of Oracle DB???  :Yes
    HTH

  • DB13 is missing option to optimize statistics

    How can I get DB13 to have the option to optimize statistics.
    The oracle version is 10.2.0.2

    Dear William
    Maybe the parameter is not set in init<SID>.ora file. Check this file for optimizer enable parameter as to
    optimizer_mode = choose
    optimizer_index_cost_adj = 10
    optimizer_features_enable = 9.2.0
    You can also check on Note 540021 for any other required parameter which might be missing.
    Hope it helps.
    Regards
    Lokesh Gupta

  • (10g) 자동 통계정보 수집(AUTOMATIC OPTIMIZER STATISTICS COLLECTION)

    제품 : ORACLE SERVER
    작성날짜 : 2006-07-21
    PURPOSE
    이 문서는 10g의 new feature인 자동 통계정보 수집(Automatic Optimizer
    Statistics Collection)에 대한 소개와 기능에 대한 자료이다.
    Explanation
    1. 개요
    Optimizer statistics는 GATHER_STATS_JOB에 의해서 자동으로
    수집된다. 이 JOB은 SYS 소유로서 OBJECT_TYPE이 JOB이다.
    이 JOB은 통계정보가 없거나 stale 상태의 통계정보를 갖는 DB 내의
    모든 OBJECT들에 대한 통계정보들을 수집한다.
    2. 자동 통계정보 수집을 위한 설정과 방식
    1) STATISTICS_LEVEL = TYPICAL | ALL
    2) 통계정보들은 predefined GATHER_STATS_JOB에 의해 수집된다.
    3) JOB이 수행될 때 JOB은 다음과 같은 사항들을 결정한다.
    - missing 또는 stale 상태의 통계정보를 갖는 object를 결정한다.
    - 좋은 통계정보를 생성하기 위해 필요한 적당한 sampling percentage.
    - histogram과 histogram의 사이즈를 요구하는 적절한 column.
    - 통계정보 수집에 대한 parallelism의 degree.
    - 어느 object에 대한 통계정보를 수집할지에 대한 우선순위
    3. GATHER_STATS_JOB에 대한 설명
    이 job은 데이타베이스 생성 시점에 생성되고 스케줄러에 의해 관리된다.
    GATHER_STATS_JOB 은 DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC procedure를
    call함으로써 통계정보를 수집한다.
    이 프로시져는 'GATHER AUTO' 옵션을 사용한 DBMS_STATS.GATHER_DATABASE_STATS
    procedure와 아주 유사한 형태로 동작한다. 이것과 다른 점은
    GATHER_DATABASE_STATS_JOB_PROC procedure는 통계정보를 수집해야 할
    Object에 대해 우선순위를 두고 순서대로 처리한다. 즉, 가장 많이
    통계정보가 update가 되어야 할 object를 가장 먼저 처리하는 것이다.
    이것은 maintenance window가 close되기 전에 가장 필요한 통계정보가
    먼저 수집되도록 하기 위함이다.
    4. Dictionary Objects에 대한 통계정보
    1) Oracle Database 10g부터 최적의 performance 결과를 얻기 위해 dictionary
    table들에 대한 통계정보도 수집할 수 있다.
    언제라도, DBMS_STATS.GATHER_SCHEMA_STATS procedure를 사용하여
    dictionary table들에 대한 통계정보를 수집하는 것이 가능하다.
    이 때 GATHER_SYS argument는 TRUE로 셋팅되어 있어야 한다.
    2) DBMS_STATS.GATHER_DICTIONARY_STATS라 하는 새로운 procedure도 사용
    하는 것이 가능하다. 이것을 사용하기 위해서는 ANALYZE ANY DICTIONARY
    라는 새로운 system privilege가 있어야 한다.
    이 권한은 만약 어떤 user가 SYSDBA 권한이 없는 경우 dictionary object와
    fixed object들을 analyze할 수 있도록 한다.
    3) GATHER_DATABASE_STATS라는 프로시져는 GATHER_FIXED라 불리우는 새로운
    argument를 가진다. 이 값은 default로 FALSE로 셋팅된다. 즉, 기본적으로
    fixed table들에 대해서는 통계정보를 생성하지 않도록 한다.
    전형적인 System WorkLoad가 있는 동안에는 fixed table들에 대하여
    한번만 analyze하면 충분하다.
    4) GATHER_FIXED_OBJECTS_STATS라는 procedure를 사용하여 fixed table들에
    대한 통계정보를 모으는 것도 가능하다. 또한 모든 fixed table들에 대하여
    통계정보를 delete하는 것도 가능하고, fixed table에 통계정보를
    export 또는 import하는 것도 가능하다.
    Example
    none
    Reference Documents
    <Note:266040.1>

    Hi,
    Please see here,
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/stats.htm#i41448
    If the table/s are changing very frequently than its better to gather the stats manually.This would lead teh volatile table coming up into the stats job again and again.
    For the system stats and data dictionary stats,they are not collected by default.So there is no choice but to gather them manually.
    Aman....

  • Cgi statistics gathering under 6.1 and Solaris 9

    Hello all,
    is it possible to log for cgi requests the value for handling each of the time spent on the request?
    I see a lot of editable parameters in the 'Performance, Tuning and Scaling Guide' but can't figure out how to do that.
    Once in a thread I read "...enable statistics gathering, then add %duration% to your access log format line".
    I can't find the terminus %duration% in the guide, which parameter is taken?
    Regards Nick

    Hello elvin,
    thanks for your reply. Now I think I managed to let the webserver log the duration of a cgi request, but I'm unsure how to interpret the value eg. in the access log I get
    ..."GET /cgi/beenden.cgi ... Gecko/20040113 MultiZilla/1.6.3.1d" 431710"
    ..."GET /pic.gif ... Gecko/20040113 MultiZilla/1.6.3.1d" 670"
    so the last value corresponds to my %duration% in the magnus.conf.
    431710 ... in msec? - makes no sense
    670 ... in msec?
    The complete string in magnus.conf reads as follows:
    Init fn="flex-init" access="$accesslog" format.access="%Ses->client.ip% - %Req->vars.auth-user% [%SYSDATE%] \"%Req->reqpb.clf
    -request%\" %Req->srvhdrs.clf-status% %Req->srvhdrs.content-length% \"%Req->headers.user-agent%\" \%duration%\""Regards Nick

  • MaxDB UpdAllStats - missing optimizer statistics for one name space

    Hi experts,
    every weekend the job UpdAllStats runs in the SAP systems hosted by us (weekdays just PrepUpdStats+UpdStats). Now we're facing the issue that in one system there are no optimizier statistics for all tables in one special name space - let's call it /XYZ/TABLE1 etc.
    We randomly checked tables in that name space via DB20/DB50 and no optimizer statistics could be found. So we randomly checked other tables like MARA, VBAK etc. - all optimizer statistics up to date for those tables.
    We even started the statistics refresh via DB20 manually for one of the tables - still no optimizer statistics appearing for this table.
    I mean it's an update over all optimizer statistics - I rechecked note 927882 - FAQ: SAP MaxDB UPDATE STATISTICS and some others but couldn't find any reason for these tables being exluded. Especially I don't understand why the manual statistics refresh wouldn't work...
    Does anybody have an idea why this could happen?
    Thanks for your ideas in advance!
    Regards
    Marie

    Hi again,
    well it seems to be more of a visualisation problem I guess.
    We figured out that in MaxDB Database Studio you can see the optimizier statistics but not in the SAP system itself.
    We'll keep you up to date.
    Best
    Marie
    Edit: it was really just a visualisation problem... DB Studio rhows the right values

  • Error in Update optimizer statistics - index is in unusable state

    Hello,
    we have this error in log Check and update optimizer statistics:
    12.02.2009     23:21:20     'BEGIN DBMS_STATS.GATHER_TABLE_STATS (OWNNAME => '"SAPPB1"', TABNAME => '"/BIC/FZPPC0002"', ESTIMATE_PERCENT => 10, METHOD_OPT =
    12.02.2009     23:21:20     ORA-20000: index "SAPPB1"."/BIC/FZPPC0002~010"  or partition of such index is in unusable state
    12.02.2009     23:21:20     ORA-06512: at "SYS.DBMS_STATS", line 13452
    12.02.2009     23:21:20     ORA-06512: at "SYS.DBMS_STATS", line 13472
    12.02.2009     23:21:20     ORA-06512: at line 1
    12.02.2009     23:21:20     BR0886E Checking/collecting statistics failed for table SAPPB1./BIC/FZPPC0002
    i can temporary fix this problem when i delete and recreate index via SE14,  but this help only for one next running update statistics, every next running update statistics has same error:  index "SAPPB1"."/BIC/FZPPC0002~010"  or partition of such index is in unusable state. Exist any definitive solution for this problem. Thanks

    Hi,
    Two methods for checking/repairing Indexing issues
    1)RSRV for a particular cube
    2)SAP_INFOCUBE_INDEXES_REPAIR report
    You can also use this sql to rebuild an Index.
    alter index <index name> rebuild online; Or you can rebuild Index by using ABAP report 'RSANAORA'.
    Please check below thread it may help you.
    /message/6483705#6483705 [original link is broken]
    https://forums.sdn.sap.com/click.jspa?searchID=12942068&messageID=2052264
    Thanks,
    Sushil

  • Check and Update  Optimizer Statistics Error

    Hello,
    I have scheduled 'Check and Update  Optimizer Statistics' from DB 13 but I always get this error.
      BR0280I BRCONNECT time stamp: 2009-01-05 01.00.46
      BR0301E SQL error -20000 at location stats_ind_collect-3, SQL statement:
      'BEGIN DBMS_STATS.GATHER_INDEX_STATS (OWNNAME => '"SAPSR3"', INDNAME => '"/BIC  /B0000412000KE"', ESTIMATE_PERCENT => 30, DEGREE => NULL, NO_INVALIDATE => FALSE); END;'
      ORA-20000: index "SAPSR3"."/BIC/B0000412000KE"  or partition of such index is in unusable state
      ORA-06512: at "SYS.DBMS_STATS", line 10610
      ORA-06512: at "SYS.DBMS_STATS", line 10645
      ORA-06512: at line 1
      BR0886E Checking/collecting statistics failed for index SAPSR3./BIC/B0000412000KE
    Tried checking the table /BIC/B0000412000KE and got this from the check:
      Enhancement category for table missing
      Enhancement category for include or subtype missing
      Table /BIC/B0000412000 was checked with warnings
    I am still checking what this means but appreciate you have any idea on how to solve it.
    Thank you.
    Best Regards,
    Julius
    Edited by: Julius Baron Manuel on Jan 7, 2009 7:39 AM

    Hi Julius,
    Have your tried scheduling the update stats via DB13 'Immediately'. ??? Does it still gives you the same error when its done 'immediately'?
    Try out DB02 and check your whole Database along with missing indexes. Refresh database and update histories.
    Regards,
    Pranay

Maybe you are looking for