Update optimizer statistics

Hi,
   Whats the use of to run update optimizer statistics.
Thanku

It Update the Optimizer Statistics... simple he?
No interview questions.
Read the "Rules of Engagement"
Regards
Juan

Similar Messages

  • 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

  • Check and update optimizer statistics failed

    Hellow Friends,
    After running job Check and update optimizer statistics each and every time from db13 in my BI production server it got failed please
    view the logs
    BR0301E SQL error -20000 at location stats_tab_collect-20, SQL statement:                                                                    
    'BEGIN DBMS_STATS.GATHER_TABLE_STATS (OWNNAME => '"SAPSR3"', TABNAME => '"/BIC/B0000228000"', ESTIMATE_PERCENT => NULL, METHOD_OPT => 'FOR ALL
    ORA-20000: index "SAPSR3"."/BIC/B0000228000KE"  or partition of such index is in unusable state                                              
    ORA-06512: at "SYS.DBMS_STATS", line 13159                                                                               
    ORA-06512: at "SYS.DBMS_STATS", line 13179                                                                               
    ORA-06512: at line 1                                                                               
    BR0886E Checking/collecting statistics failed for table SAPSR3./BIC/B0000228000                                                              
    BR0280I BRCONNECT time stamp: 2009-05-19 18.17.19                                                                               
    BR0883I Table selected to collect statistics after check: SAPSR3./BIC/B0000229000 (161130/1480:0:0)                                          
    BR0280I BRCONNECT time stamp: 2009-05-19 18.17.19                                                                               
    BR0881I Collecting statistics for table SAPSR3./BIC/B0000229000 with method/sample E/P10 ...                                                 
    BR0280I BRCONNECT time stamp: 2009-05-19 18.17.21                                                                               
    BR0301E SQL error -20000 at location stats_tab_collect-20, SQL statement:                                                                    
    'BEGIN DBMS_STATS.GATHER_TABLE_STATS (OWNNAME => '"SAPSR3"', TABNAME => '"/BIC/B0000229000"', ESTIMATE_PERCENT => 10, METHOD_OPT => 'FOR ALL C
    ORA-20000: index "SAPSR3"."/BIC/B0000229000KE"  or partition of such index is in unusable state                                              
    ORA-06512: at "SYS.DBMS_STATS", line 13159                                                                               
    ORA-06512: at "SYS.DBMS_STATS", line 13179                                                                               
    ORA-06512: at line 1                                                                               
    BR0886E Checking/collecting statistics failed for table SAPSR3./BIC/B0000229000                                                              
    BR0280I BRCONNECT time stamp: 2009-05-19 18.17.21                                                                               
    BR0883I Table selected to collect statistics after check: SAPSR3./BIC/B0000230000 (0/13545:0:0)                                              
    BR0280I BRCONNECT time stamp: 2009-05-19 18.17.21                                                                               
    BR0881I Collecting statistics for table SAPSR3./BIC/B0000230000 with method/sample E/P30 ...                                                 
    BR0280I BRCONNECT time stamp: 2009-05-19 18.17.21                                                                               
    BR0301E SQL error -20000 at location stats_tab_collect-20, SQL statement:                                                                    
    'BEGIN DBMS_STATS.GATHER_TABLE_STATS (OWNNAME => '"SAPSR3"', TABNAME => '"/BIC/B0000230000"', ESTIMATE_PERCENT => 30, METHOD_OPT => 'FOR ALL C
    ORA-20000: index "SAPSR3"."/BIC/B0000230000KE"  or partition of such index is in unusable state                                              
    ORA-06512: at "SYS.DBMS_STATS", line 13159                                                                               
    ORA-06512: at "SYS.DBMS_STATS", line 13179                                                                               
    ORA-06512: at line 1                                                                               
    BR0886E Checking/collecting statistics failed for table SAPSR3./BIC/B0000230000                                                              
    Please help me to resolve the issue.

    some of your PSA tables are inconsistent - ex: /BIC/B0000228000 - check PSA partitioning in RSRV to correct the same or delete data from the same using SE14 and try running the same.

  • DB13 Check and Update Optimizer Statistics Error

    Dear Gurus,
    While Updating the Update stats in DB13 Calender it shows the Below mentioned error.
    BR0881I Collecting statistics for table SAPPSU.EKUB with method/sample C ...                           
    BR0280I BRCONNECT time stamp: 2009-01-18 02.23.01                                                      
    BR0884I Statistics collected for table: SAPPSU.EKUB, rows old/new: 4093/6243                           
    BR0280I BRCONNECT time stamp: 2009-01-18 02.23.14                                                      
    BR0883I Table selected to collect statistics after check: SAPPSU.EQBS (4288797/6962268)                
    BR0280I BRCONNECT time stamp: 2009-01-18 02.23.14                                                      
    BR0881I Collecting statistics for table SAPPSU.EQBS with method/sample E/P3 ...                        
    BR0280I BRCONNECT time stamp: 2009-01-18 02.23.28                                                      
    BR0301E SQL error -25153 at location stats_tab_collect-16
    ORA-25153: Temporary Tablespace is Empty
    BR0886E Checking/collecting statistics failed for table SAPPSU.EQBS                                    
    BR0280I BRCONNECT time stamp: 2009-01-18 02.23.30                                                      
    BR0883I Table selected to collect statistics after check: SAPPSU.ESLH (278/420)                        
    BR0280I BRCONNECT time stamp: 2009-01-18 02.23.30                                                      
    BR0881I Collecting statistics for table SAPPSU.ESLH with method/sample C ...                           
    BR0280I BRCONNECT time stamp: 2009-01-18 02.23.30                                                      
    BR0884I Statistics collected for table: SAPPSU.ESLH, rows old/new: 278/420                             
    BR0280I BRCONNECT time stamp: 2009-01-18 02.24.19                                                      
    BR0883I Table selected to collect statistics after check: SAPPSU.HRS1210 (13400/25026)                 
    BR0280I BRCONNECT time stamp: 2009-01-18 02.24.19                                                      
    BR0881I Collecting statistics for table SAPPSU.HRS1210 with method/sample E/P30 ...                    
    BR0280I BRCONNECT time stamp: 2009-01-18 02.24.19                                                      
    BR0884I Statistics collected for table: SAPPSU.HRS1210, rows old/new: 13400/13400                      
    BR0986W Index SAPPSU.HRS1210~0 is unbalanced - please rebuild the index                                
    BR0280I BRCONNECT time stamp: 2009-01-18 02.24.38                                                      
    BR0883I Table selected to collect statistics after check: SAPPSU.JGTBP00 (75747/117862)                
    BR0280I BRCONNECT time stamp: 2009-01-18 02.24.38                                                      
    BR0881I Collecting statistics for table SAPPSU.JGTBP00 with method/sample E/P10 ...                    
    BR0280I BRCONNECT time stamp: 2009-01-18 02.24.39                                                      
    BR0884I Statistics collected for table: SAPPSU.JGTBP00, rows old/new: 75747/106197                     
    BR0280I BRCONNECT time stamp: 2009-01-18 02.24.40                                                      
    BR0883I Table selected to collect statistics after check: SAPPSU.JGTGPNR (76144/117862)                
    BR0280I BRCONNECT time stamp: 2009-01-18 02.24.40                                                      
    Please help me to sort out this issue.
    Thanks
    Anbu

    Hello Anbu,
    the reason for this error is that you have no TEMPFILEs in your temporary tablespace (usually PSAPTEMP).
    Please add one with the BR*Tools:
    http://help.sap.com/saphelp_nw70/helpdata/de/1b/d20f6fe45a9e43b1856ea1b52c9612/content.htm
    Regards
    Stefan

  • Error in Computing Database statistics while running Update optimizer stati

    Dear All,
    I am getting following error while executing Update optimizer statistics on my ECC Production Server.
    BR0280I BRCONNECT time stamp: 2011-09-07 06.00.34
    BR0815I Number of indexes in schema of owner SAPFEP: 82458
    BR0815I Number of indexes in schema of owner SAPFEPDB: 403
    BR0825E Table/Index '/SAPAPO/MATKEY' not found in database
    BR0182E Checking parameter/option 'stats_dbms_stats' failed
    BR0806I End of BRCONNECT processing: cegskeaq.sta 2011-09-07 06.00.34
    BR0280I BRCONNECT time stamp: 2011-09-07 06.00.34
    BR0804I BRCONNECT terminated with errors
    You are requested to please suggest the corrective action.
    Regards,
    Manish Sachan

    Hiu2026u2026u2026
    Please find the complete Log u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    BR0801I BRCONNECT 7.00 (34)
    BR0805I Start of BRCONNECT processing: cegxrutc.sta 2011-10-05 06.00.16
    BR0484I BRCONNECT log file: /oracle/FEP/sapcheck/cegxrutc.sta
    BR0101I Parameters
    Name                           Value
    oracle_sid                     FEP
    oracle_home                    /oracle/FEP/102_64
    oracle_profile                 /oracle/FEP/102_64/dbs/initFEP.ora
    sapdata_home                   /oracle/FEP
    sap_profile                    /oracle/FEP/102_64/dbs/initFEP.sap
    system_info                    fepadm/orafep fjeccprd1 AIX 3 5 00F67F154C00
    oracle_info                    FEP 10.2.0.2.0 8192 114671 3007543000 fjeccprd1 UTF8 UTF8
    sap_info                       700 SAPFEP 0002LK0003FEP0011H01500816140015Maintenance_ORA
    make_info                      rs6000_64 OCI_102 May 31 2008
    command_line                   brconnect -u / -jid STATS20080725060000 -c -f stats -t ALL
    stats_table                    ALL
    stats_dbms_stats               ALL:R:2,/SAPAPO/MATKEY:B:3
    stats_change_threshold         50
    stats_parallel_degree          1
    BR0280I BRCONNECT time stamp: 2011-10-05 06.00.27
    BR0813I Schema owners found in database FEP: SAPFEP*, SAPFEPDB%
    BR0280I BRCONNECT time stamp: 2011-10-05 06.00.37
    BR0814I Number of tables in schema of owner SAPFEP: 68904
    BR0836I Number of info cube tables found for owner SAPFEP: 93
    BR0814I Number of tables in schema of owner SAPFEPDB: 264
    BR0280I BRCONNECT time stamp: 2011-10-05 06.00.47
    BR0815I Number of indexes in schema of owner SAPFEP: 82459
    BR0815I Number of indexes in schema of owner SAPFEPDB: 403
    BR0825E Table/Index '/SAPAPO/MATKEY' not found in database
    BR0182E Checking parameter/option 'stats_dbms_stats' failed
    BR0806I End of BRCONNECT processing: cegxrutc.sta 2011-10-05 06.00.47
    BR0280I BRCONNECT time stamp: 2011-10-05 06.00.47
    BR0804I BRCONNECT terminated with errors
    Regards,
    Manish Sachan

  • DB13 Check and update optimizer stat error: ORA-01652: unable to extend tem

    Hi SAP Gurus,
    When running Check and Update Optimizer Statistics in DB13, an error occurs.
    BR0280I BRCONNECT time stamp: 2011-03-10 06.35.52                    
    BR0301E SQL error -1652 at location stats_tab_collect-16             
    ORA-01652: unable to extend temp segment by 12137 in tablespace SYSTEM
    BR0886E Checking/collecting statistics failed for table SAPR3.ACCTIT 
    BR0280I BRCONNECT time stamp: 2011-03-10 06.36.49                    
    BR0850I 3 of 39479 objects processed - 3.522 of 342.781 units done   
    BR0204I Percentage done: 1.03%, estimated end time: 15:47            
    Looking at tablespace SYSTEM in DB02, the percent used is 58. Auto-extent feature is OFF. Will turning the auto-extent ON, remove the error?

    It seems like Your user (by a mistake) have tablespace SYSTEM as temporary tablespace.
    Connect as sysdba in Your database and check which temp tablespaces awaiable, and size of them:
    select tablespace_name, sum(bytes)/1024/1024 "Size of TEMP TBS in MB" from dba_temp_files  group by tablespace_name;
    Check which users having SYSTEM as tamp-tbs:
    select username, temporary_tablespace from dba_users where temporary_tablespace like 'SYSTEM' order by 1;
    Change those users to have one of your temp-tablespaces:
    alter user &username temporary tablespace &&TempTBS;
    It's also a good idea to have autoextend on on Your temp TBS, but remember to set maxsize so you doesn't fill up your disksystem.
    Hope this solve Your problems.
    Regards
    Audun
    DBA

  • Update Optimizer stats

    Hi everyone,
    This is really urgent,
    Early watch report has showed that our update optimizer statistics are not up to date.So i m thinking to schedule Update optimizer job thro DB13.My system setup is very big n is linux based.So when do u feel is the best time to schedule that(load wise),and how much time will it take(system is on cluster plus 14 app servers),so its a real big one and an Early watch has to be schedule jst after that.
    Please advise.
    Its urgent

    Hi,
    you can use brconnect as ora<sid>
    if you want to update all tables you can use:
    brconnect -u / -c -f stats -t all -p <number of parallel threads>
    check the follwing links for more details about brconnect:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/88/fce73a86e99c77e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/88/fce73a86e99c77e10000000a114084/frameset.htm
    Regards
    Ermanno

  • 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

  • Problem in updates  optimizer

    Hi All,
    I am facing a problem in updates  optimizer while runing through db13 but it is runing successfully at os lavel.
    Log is given below :
    18.01.2008     17:48:18     Job started
    18.01.2008     17:48:18     Step 001 started (program RSDBAJOB, variant &0000000002580, user ID JITENDRA)
    18.01.2008     17:48:18     Execute logical command BRCONNECT On host bslprtl
    18.01.2008     17:48:18     Parameters:-u / -jid STATS20080118174818 -c -f stats -t PSAPPRD
    18.01.2008     17:48:19     ld.so.1: brconnect: fatal: libclntsh.so.10.1: open failed: No such file or directory
    18.01.2008     17:48:19     Process died due to signal 9
    18.01.2008     17:48:19     Job finished
    Kindly help how to resolve this issue.....
    Regards,
    Jitendra Tiwari

    hi,
    to Jitendra:
    > I am facing a problem in updates optimizer while runing through db13 but it is runing successfully at os lavel.
    As which user have you executed the update statistics at OS level?
    Have you installed the oracle 10g instantclient as indicated on the SAP notes?
    what are your environment variables ofr the user <SID>adm?
    to kaushal:
    >The libclntsh.so.10.1 file is in the /export/home/oracle10g/lib32 directory which is specified in "Native Library Path Suffix"
    1) That would be on your system.
    2) That is the oracle client shared library, but SAP recommends to install the INSTANTCLIENT, and it will NOT be on the mentioned directory, even in YOUR system. BRCONNECT is looking for the instantclient not for the "normal" client.
    Please, check note 819829 Oracle Database 10g: Instant Client 10.x on Unix where it is explained
    to Eric:
    >if you are using Oracle 9i, then use the BR*tools made for Oracle 9.
    It is possible to use BRCONNECT 700 with Oracle 10g 9i, but I prefer to run BRCONNECT 640 with 9i as it can be complicated to set all variables.
    Edited by: Fidel Vales on Jan 18, 2008 3:04 PM

  • (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....

  • 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

  • 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

  • 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

Maybe you are looking for

  • Can't see files on my Vision:M in Mediasou

    In Mediasource (it is fully updated) if I navigate to Vision:M-->Music I can see my album folders, if I click on these folders the majority of them appear empty. I see no tracks. I know this music is on my player since I listen to it all the time. An

  • Blobs in Browsers

    How do I get an image in an Oracle blob column to display on a regular html page? I have managed to store the image in the database with the DBMS_LOB package. Thanks, Tom

  • Drill down report problem

    Hello all, I am working on Drildown Reports. The report is working perfectly and it is displaying the output correctly. I am able to see my Report output in Grid display. The problem is I have some Z fields in my report. When i am displaying with Cha

  • Seting transparency in a form box

    Is this possible? I've got a form on a page with a background image, and I was wondering whether I could set the transparency of the text boxes on the forms to, say, 75%? This should keep the background image viewable while at the same time make sure

  • Error when saving shipment cost document

    Hi, I am facing below error No purchase order item was generated for shipment cost item 0000001003 000001 Message no. VY633 Diagnosis You have marked the shipment cost item for transmission to the finanacial accounting department. For this transactio