Statistics Collection in Oracle 10g

In Oracle 10g gathering table and index statistics are automatic ?
or we have to physically gather statistics for table and indexes

It depends how your database is configured -
PARAMETER statistics_level should be set to typical and there must be a job NAMED as GATHER_STATS_JOB should be active. you can change the job parameters

Similar Messages

  • Doubt regarding automatic statistics collection in Oracle 10g

    I am using Oracle 10g in Linux
    Does statistic collection for tables throughout the database happen automatically or should we manually analyze the tables using
    Analyze command or DBMS_STATS package ?
    AWR collects statistics(snapshots) every 1 hr but does it mean it collects only session and database related statistics and not the table related statistics?

    I am using Oracle 10g in Linux Version and os name and version?
    AWR collects statistics(snapshots) every 1 hr butIt's performance related statistics. Read about data gathering and AWR.
    Note that AWR is an extra licensable feature thru Management packs.

  • MBRC and SYSTEM STATISTICS in Oracle 10g database.

    Hi All,
    I am performing database upgrade from Oracle 8i Solaris to Oracle 10g HP-UX using exp/imp method.
    But i do have some doubts regarding MBRC and System statistics.
    MBRC in Oracle 10g is automatically adjusted if MBRC parameter is not set, but i found value 128 as shown below.
    SQL> select * from v$version;
    BANNER
    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 HPUX: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL> sho parameter multi
    NAME                                 TYPE                             VALUE
    db_file_multiblock_read_count        integer                          128Also i performed one simple full table scan to test it...but db file scattered read is performing on 128 blocks. So i dont think 128 is suitable and is automatic, i mean MBRC is not set accrodingly it always uses 128.
    Does this MBRC value affects whole database performance?
    Regarding SYSTEM STATISTICS i found below result:
    SQL> select * from AUX_STATS$
    SNAME                          PNAME                               PVAL1 PVAL2
    SYSSTATS_INFO                  STATUS                                    COMPLETED
    SYSSTATS_INFO                  DSTART                                    11-09-2009 04:59
    SYSSTATS_INFO                  DSTOP                                     11-09-2009 04:59
    SYSSTATS_INFO                  FLAGS                                   1
    SYSSTATS_MAIN                  CPUSPEEDNW                     128.239557
    SYSSTATS_MAIN                  IOSEEKTIM                              10
    SYSSTATS_MAIN                  IOTFRSPEED                           4096
    SYSSTATS_MAIN                  SREADTIM
    SYSSTATS_MAIN                  MREADTIM
    SYSSTATS_MAIN                  CPUSPEED
    SYSSTATS_MAIN                  MBRC
    SYSSTATS_MAIN                  MAXTHR
    SYSSTATS_MAIN                  SLAVETHRNow whether NOWORKLOAD or WORKLOAD is better, and this server is still under building process....so how can i collect WORKLOAD stats as high load on this server can't be performed?? Is it really require to gather system statistics, what will happen with NOWORLOAD stats?
    I have not seen single database where system stats are gathered in our organisation having more than 2000 databases.
    -Yasser

    Maybe this article written by Tom Kite helps:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:499197100346264909

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

  • How to genrate and check wait statistics in oracle 10g

    Dear all,
    how to genrate and check WAIT STATISTICS in oracle 10g on RHEL4.
    Regards,
    Ali

    Oracle Kernel keeps track of these statistics. Query v$waitstat for overall system level wait statistics or v$session_wait for individual session wait statistics.

  • Blank space updatation to Collection field in Oracle 10g

    Hi,
    we have the Oracle 9i database in the dev environment and Oracle 10g in Production environment.
    In Oracle 9i, the below scenario works find, but in Oracle 10g it won'nt, The scenerio is ,
    Update table1
    set test_collection = ' '; -- works fine in Oracle 9i , but it wont works in Oracle 10g,
    Update tabel1
    set test_collection = null; -- works in both the versions.
    Please suggest,.
    raja k

    What is myv, is that the collection name ?? See post number 5 of this thread where I declared it.
    >
    In Oracle 9i, we need not to specify the collection
    name while updating the collection type field in the
    table. 9.2.0.6 was notoriously buggy and wasn't considered stable till 9.2.0.7 if I recall correctly. And now (thankfully) it's unsupported.
    The sql code was written in concern to Oracle 9i, now
    while migrating to Oracle 10g, we are getting the
    problem with this. The problem is , i don'nt have the
    access to Production environment, which is migrated
    to Oracle 10g, we develop the code on Oracle 9i, and
    will release to deploy on Oracle 10g. Develop in 9i and deploy to 10g! Do you really think that's a good setup? How about upgrading your development environment to match production.
    update table1 set test_collection = null; - this
    works fine in Oracle 9i ,
    update table1 set test_collection = ''; - this works
    fine in Oracle 9i ,
    but in Oracle 10g ,
    update table1 set test_collection = null; - this
    works fine in Oracle 10g ,
    update table1 set test_collection = ''; - this won'nt
    works in Oracle 10g , Yes, I already understand what your issue is.
    as you suggested, do we need to specify the
    collection name while updating the collection type
    field. in Oracle 10g, In Oracle 9i , it won'nt
    required ?? Yes, this would be the correct way to do it.
    Karthick,
    because null is not same as ''
    SQL> select * from dual where ''=null
    2 /
    no rows selectedErrrm, yes it is actually...
    SQL> select 1 from dual where '' is null;
    1
    1
    SQL>
    ... if you use the correct condition for checking nulls.

  • SAP ECC6.0 Installation problem as abap on oracle 10g

    Hi guru's
    i am facing following error during installation of SAP ECC6.0
    development server with oracle 10g (10.1) database & windows 2003 server OS.
    During the installation step "create database statistics" following error occured.
    ERROR 2009-03-07 03:23:40
    CJS-30023  Process call 'D:\usr\sap\DEV\SYS\exe\uc\NTI386\brconnect.exe -u / -c -o summary -f stats -o SAPSR3 -p 2' exits with error code 5. For details see log file(s) brconnect.log.
    ERROR 2009-03-07 03:23:40
    FCO-00011  The step createOracleStatistics with step key |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_Postload|ind|ind|ind|ind|10|0|NW_Postload_ORA|ind|ind|ind|ind|0|0|NW_ORA_Statistics_Create|ind|ind|ind|ind|0|0|createOracleStatistics was executed with status ERROR .
    brconnect.log
    ORA-06512: at "SYS.DBMS_STATS", line 10645
    ORA-06512: at line 1
    BR0886E Checking/collecting statistics failed for index SAPSR3.TCNVA~0
    BR0280I BRCONNECT thread 2: time stamp: 2009-03-07 03.23.39
    BR0301E SQL error -1001 in thread 2 at location stats_ind_collect-3, SQL statement:
    'BEGIN DBMS_STATS.GATHER_INDEX_STATS (OWNNAME => '"SAPSR3"', INDNAME => '"TCNVAT~0"', ESTIMATE_PERCENT => 1, DEGREE => NULL, NO_INVALIDATE => FALSE); END;'
    ORA-01001: invalid cursor
    ORA-06512: at "SYS.DBMS_STATS", line 10621
    ORA-06512: at "SYS.DBMS_STATS", line 10645
    ORA-06512: at line 1
    BR0886E Checking/collecting statistics failed for index SAPSR3.TCNVAT~0
    BR0280I BRCONNECT thread 2: time stamp: 2009-03-07 03.23.39
    BR0301E SQL error -1001 in thread 2 at location stats_ind_collect-3, SQL statement:
    'BEGIN DBMS_STATS.GATHER_INDEX_STATS (OWNNAME => '"SAPSR3"', INDNAME => '"TCNVD~0"', ESTIMATE_PERCENT => 1, DEGREE => NULL, NO_INVALIDATE => FALSE); END;'
    ORA-01001: invalid cursor
    ORA-06512: at "SYS.DBMS_STATS", line 10621
    ORA-06512: at "SYS.DBMS_STATS", line 10645
    ORA-06512: at line 1
    BR0886E Checking/collecting statistics failed for index SAPSR3.TCNVD~0
    BR0280I BRCONNECT thread 2: time stamp: 2009-03-07 03.23.39
    BR0301E SQL error -1001 in thread 2 at location stats_ind_collect-3, SQL statement:
    'BEGIN DBMS_STATS.GATHER_INDEX_STATS (OWNNAME => '"SAPSR3"', INDNAME => '"TCNVDATA~0"', ESTIMATE_PERCENT => 1, DEGREE => NULL, NO_INVALIDATE => FALSE); END;'
    ORA-01001: invalid cursor
    ORA-06512: at "SYS.DBMS_STATS", line 10621
    ORA-06512: at "SYS.DBMS_STATS", line 10645
    ORA-06512: at line 1
    BR0886E Checking/collecting statistics failed for index SAPSR3.TCNVDATA~0
    BR0280I BRCONNECT thread 2: time stamp: 2009-03-07 03.23.39
    BR0301E SQL error -1001 in thread 2 at location stats_ind_collect-3, SQL statement:
    'BEGIN DBMS_STATS.GATHER_INDEX_STATS (OWNNAME => '"SAPSR3"', INDNAME => '"TCNVDT~0"', ESTIMATE_PERCENT => 1, DEGREE => NULL, NO_INVALIDATE => FALSE); END;'
    ORA-01001: invalid cursor
    ORA-06512: at "SYS.DBMS_STATS", line 10621
    ORA-06512: at "SYS.DBMS_STATS", line 10645
    ORA-06512: at line 1
    BR0886E Checking/collecting statistics failed for index SAPSR3.TCNVDT~0
    BR0280I BRCONNECT thread 2: time stamp: 2009-03-07 03.23.39
    BR0301E SQL error -1001 in thread 2 at location stats_ind_collect-3, SQL statement:
    'BEGIN DBMS_STATS.GATHER_INDEX_STATS (OWNNAME => '"SAPSR3"', INDNAME => '"TCNVF~0"', ESTIMATE_PERCENT => 1, DEGREE => NULL, NO_INVALIDATE => FALSE); END;'
    ORA-01001: invalid cursor
    ORA-06512: at "SYS.DBMS_STATS", line 10621
    ORA-06512: at "SYS.DBMS_STATS", line 10645
    ORA-06512: at line 1
    BR0886E Checking/collecting statistics failed for index SAPSR3.TCNVF~0
    BR0280I BRCONNECT thread 2: time stamp: 2009-03-07 03.23.39
    BR0301E SQL error -1001 in thread 2 at location stats_ind_collect-3, SQL statement:
    'BEGIN DBMS_STATS.GATHER_INDEX_STATS (OWNNAME => '"SAPSR3"', INDNAME => '"TCNVFT~0"', ESTIMATE_PERCENT => 1, DEGREE => NULL, NO_INVALIDATE => FALSE); END;'
    ORA-01001: invalid cursor
    ORA-06512: at "SYS.DBMS_STATS", line 10621
    ORA-06512: at "SYS.DBMS_STATS", line 10645
    ORA-06512: at line 1
    BR0886E Checking/collecting statistics failed for index SAPSR3.TCNVFT~0
    BR0280I BRCONNECT thread 2: time stamp: 2009-03-07 03.23.39
    BR0301E SQL error -1001 in thread 2 at location stats_ind_collect-3, SQL statement:
    'BEGIN DBMS_STATS.GATHER_INDEX_STATS (OWNNAME => '"SAPSR3"', INDNAME => '"TCNVG~0"', ESTIMATE_PERCENT => 1, DEGREE => NULL, NO_INVALIDATE => FALSE); END;'
    ORA-01001: invalid cursor
    ORA-06512: at "SYS.DBMS_STATS", line 10621
    ORA-06512: at "SYS.DBMS_STATS", line 10645
    ORA-06512: at line 1
    BR0886E Checking/collecting statistics failed for index SAPSR3.TCNVG~0
    BR0280I BRCONNECT thread 2: time stamp: 2009-03-07 03.23.39
    BR0844E 100 errors occurred in thread 2 - terminating processing of the thread...
    BR0280I BRCONNECT time stamp: 2009-03-07 03.23.39
    BR0848I Thread 2 finished with return code -1
    BR0280I BRCONNECT time stamp: 2009-03-07 03.23.39
    BR0879I Statistics checked for 22 tables
    BR0878I Number of tables selected to collect statistics after check: 0
    BR0880I Statistics collected for 0/14 tables/indexes
    BR1308E Collection of statistics failed for 17956/17936 tables/indexes
    BR0806I End of BRCONNECT processing: cepzzztx.sta 2009-03-07 03.23.39
    BR0280I BRCONNECT time stamp: 2009-03-07 03.23.40
    BR0804I BRCONNECT terminated with errors
    Regards
    Manvir Bhatia

    Hi,
    Your DB is running on 10.1, it is not recommended. Update the patch to 10.2.0.2 and apply the interim patches. Then retry the installation.
    Mahesh

  • ORACLE 10g CBO...analyze stats

    Hi
    Oracle 10g R2 Documentation says CBO does not consider stats gathered by analyze table command.But analyze table updates all the stats (dba_tables etc...).
    Still will these not be used?if not how ORACLE knows that stats are gathered by dbms_stats or not
    I agree dbms_stats Stats are more comprehensive than analyze.But want to know whether stats gatherd by analyze are completely ignored or not
    Thanks
    Pramod

    It helps if you quote the passage you have read as this makes it possible to explain why you may have misunderstood what was said - the manuals are not always completely clear.
    There are some calls to the analyze command that collect statistics that the optimizer does not need - but other calls to the analyze command do collect statistics that the optimizer can use. But there are differences between the "optimizer numbers" collected by analyze and those collected by dbms_stats - so dbms_stats is the strategic choice.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    "For every expert there is an equal and opposite expert."
    Arthur C. Clarke

  • 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/

  • Oracle 10g performance issues

    Hi,
    We were using Oracle 9i in Solaris 5.8 and it was working fine with some minor performance issues. We formatted the Solaris server with new Solaris 5.10 and installed Oracle 10g.
    Now we are experiencing some performance issues in Oracle 10g. This issue is arising when using through Websphere 5.1.
    We have analyzed the schema, index is rebuild, SGA is 4.5 GB, PGA is 2.0 GB, Solaris RAM is 16 GB. Also we are having some Mat Views (possibly this may cause performance issues - not sure) due to refresh.
    Also I have changed some parameters in init.ora file like query_rewrite = STALE_TOLERATED, open_cursors = 1500 etc.
    Is is something due to driver from which the data is accessed. I guess it is not utilizing the indexes on the table.
    Can anyone please suggest, what could be the issue ?

    <p>There are a lot of changes to the optimizer in the upgrade from 9i to 10g, and you need to be aware of them. There are also a number of changes to the default stats collection mechanism, so after your upgrade your statistics (hence execution paths) could change dramatically.
    </p>
    <p>
    Greg Rahn has a useful entry on his blog about stats collection, and the blog al,so points to an Oracle white paper which will give you a lot of ideas about where the optimizer changes - which may help you spot your critical issues.
    </p>
    <p>Otherwise, follow triggb's advice about using Statspack to find the SQL that is the most expensive - it's reasonably likely to be this SQL that has changed execution plans in the upgrade.
    </p>
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk

  • Performance Problem After upgrade to oracle 10g

    Hi
    I have upgrade one of my datawarehouse database from oracle 9.2.0.8 to oracle 10.2.0.4 running on solaris 9
    After the upgrade jobs which were running in the database is taking hell lot of time.
    The jobs are accessing the views which is used to get the monthly report data from the database.
    what could be the solution and where to start from to get the RCA to resolve this performance issue
    Please let me know if you require any other information
    database is currently running in the automatic shared memory management mode ie SGA_MAX and SGA_TARGET parameters are defined for that

    There are a lot of differences between 10g and 9i in this regard, among these are:
    - There is a default job that gathers statistics every night which is not there in 9i. You might have totally different statistics as in 9i due to that job, depending on how and if at all you used to collect statistics in 9i
    - The 10g DBMS_STATS package collects histograms on some columns by default (parameter METHOD_OPT=>'FOR ALL COLUMNS SIZE AUTO' default in 10g whereas 'FOR ALL COLUMNS SIZE 1' in 9i) which can have a significant effect on the execution plans
    - The 10g optimizer has CPU costing enabled by default which can make significant changes to your execution plans due to different costing of table scans and order of predicate evaluation. In addition it uses NOWORKLOAD system statistics if system statistics have not been gathered explicitly
    - 10g checks the min and max values stored for columns in the data dictionary. If your predicates are way off compared to these values then 10g begins to adjust the calculated selectivity of the predicate which can again significantly affect your execution plans
    - 10g introduces the "Cost Based Query Transformation (CBQT)" feature which means that rather than applying heuristic transformation rules transformations are costed and potentially discarded whereas 9i applies transformations unconditionally whenever possible
    Check also the following note resp. white paper:
    http://optimizermagic.blogspot.com/2008/02/upgrading-from-oracle-database-9i-to.html
    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/

  • 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

  • Oracle 10g is stealing my processor at 10pm

    Hi All,
    I have a real time application running on the same server as Oracle 10g. I dont use the database during real time operation, only for persistant store of config data.
    At 10pm each night an Oracle process is consuming all CPU on one of the processors for a minute or so, and this is damaging my real time response times.
    Can anyone tell me what Oracle is doing here, how do I control it?
    Any help appreciated.
    Regards,
    Keith

    The AWR has been described (by Tom Kyte, I believe) as Statspack on steroids. AWR collects database statistics every 60 minutes out of the box (this is configurable), and this data is maintained for a week and then purged. The statistics collected by AWR are stored in the database. To properly collect database statistics, the parameter statistics_level should be set to TYPICAL (the default) or ALL.
    The Oracle database uses AWR for problem detection and analysis as well as for self-tuning. A number of different statistics are collected by the AWR including wait events, time model statistics, active session history statistics, various system and session-level statistics, object usage statistics, and information on the most resource-intensive SQL statements. Other Oracle Database 10g features use the AWR, including ADDM and the other advisors in Oracle Database 10g that we will discuss in this series of articles.
    If you want to explore the AWR repository, feel free to do so. The AWR consists of a number of tables owned by the SYS schema and typically stored in the SYSAUX tablespace (currently no method exists to move these objects to another tablespace). All AWR table names start with the identifier “WR.” Following WR is a mnemonic that identifies the type designation of the table followed by a dollar sign ($). AWR tables come with three different type designations:
    Metadata (WRM$)
    Historical data (WRH$)
    AWR tables related to advisor functions (WRI$)
    Most of the AWR table names are pretty self-explanatory, such as WRM$_SNAPSHOT or WRH$_ACTIVE_SESSION_HISTORY.
    Also Oracle Database 10g offers several DBA tables that allow you to query the AWR repository. The tables all start with DBA_HIST, followed by a name that describes the table. These include tables such as DBA_HIST_FILESTATS, DBA_HIST_DATAFILE, or DBA_HIST_SNAPSHOT.

  • Client unable to connect to Oracle 10g on linux

    I have installed Oracle 10g on an Intel box running RedHat AS 3.0. The database installation was succesful but I am unable to connect to it from the client on my laptop running Oracle 10g client and Winfdows XP Pro. The server ip is 192.168.1.10 and I can ping it from the client:
    C:\>ping attila.n3kje.net
    Pinging attila.n3kje.net [192.168.1.10] with 32 bytes of data:
    Reply from 192.168.1.10: bytes=32 time<1ms TTL=64
    Reply from 192.168.1.10: bytes=32 time<1ms TTL=64
    Reply from 192.168.1.10: bytes=32 time<1ms TTL=64
    Reply from 192.168.1.10: bytes=32 time<1ms TTL=64
    Ping statistics for 192.168.1.10:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
    Here is some info about the 2 environments:
    [oracle@attila bin]$ uname -a
    Linux attila.n3kje.net 2.4.21-9.0.1.ELsmp #1 SMP Mon Feb 9 22:26:51 EST 2004 i686 i686 i386 GNU/Linux
    Server hosts file
    ======================================================
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1 attila.n3kje.net attila localhost.localdomain localhost
    hostname output
    ======================================================
    [root@attila root]# hostname
    attila.n3kje.net
    ifconfig output
    =======================================================
    [root@attila root]# ifconfig
    eth0 Link encap:Ethernet HWaddr 00:C0:9F:1D:0C:C8
    inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:13772171 errors:0 dropped:0 overruns:0 frame:0
    TX packets:13748842 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:1269613311 (1210.7 Mb) TX bytes:4065314800 (3876.9 Mb)
    Interrupt:16 Base address:0xecc0 Memory:fe100000-fe120000
    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:5513840 errors:0 dropped:0 overruns:0 frame:0
    TX packets:5513840 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:865454291 (825.3 Mb) TX bytes:865454291 (825.3 Mb)
    Client TNSNAMES.ORA
    ======================================================
    # tnsnames.ora Network Configuration File: C:\Oracle\product\10.1.0\Client_1\NETWORK\ADMIN\tnsnames.ora
    # Generated by Oracle configuration tools.
    ORACLE10G =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.10)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = DEV10G)
    PRDSRR =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.10)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = dev10g)
    Client SQLNET.ORA
    ======================================================
    # sqlnet.ora Network Configuration File: C:\Oracle\product\10.1.0\Client_1\network\admin\sqlnet.ora
    # Generated by Oracle configuration tools.
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (EZCONNECT, TNSNAMES)
    Server TNSNAMES.ORA
    ======================================================
    # tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.1.0/db_1/n
    etwork/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    DEV10G =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = attila.n3kje.net)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = DEV10G)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    Server LISTENER.ORA
    ======================================================
    # listener.ora Network Configuration File: /u01/app/oracle/product/10.1.0/db_1/n
    etwork/admin/listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /u01/app/oracle/product/10.1.0/db_1)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = attila.n3kje.net)(PORT = 1521))
    Results from the TNSPING command issued at the client
    =================================================================
    C:\>tnsping prdsrr
    TNS Ping Utility for 32-bit Windows: Version 10.1.0.2.0 - Production on 02-APR-2
    004 09:26:11
    Copyright (c) 1997, 2003, Oracle. All rights reserved.
    Used parameter files:
    C:\Oracle\product\10.1.0\Client_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
    (HOST = 192.168.1.10)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = dev10g)))
    TNS-12541: TNS:no listener
    C:\>tnsping oracle10g
    TNS Ping Utility for 32-bit Windows: Version 10.1.0.2.0 - Production on 02-APR-2
    004 09:26:38
    Copyright (c) 1997, 2003, Oracle. All rights reserved.
    Used parameter files:
    C:\Oracle\product\10.1.0\Client_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
    (HOST = 192.168.1.10)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVI
    CE_NAME = DEV10G)))
    TNS-12541: TNS:no listener
    C:\>
    Trying to connect to the database from the server
    ==================================================
    [oracle@attila bin]$ echo $ORACLE_SID
    DEV10G
    [oracle@attila bin]$ ./sqlplus system
    SQL*Plus: Release 10.1.0.2.0 - Production on Fri Apr 2 12:22:29 2004
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Pr
    oduction
    With the Partitioning, OLAP and Data Mining options
    [oracle@attila bin]$ ./sqlplus system@dev10g
    SQL*Plus: Release 10.1.0.2.0 - Production on Fri Apr 2 12:23:09 2004
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Enter password:
    ERROR:
    ORA-12154: TNS:could not resolve the connect identifier specified
    tnsping issued at the server
    ======================================================
    [oracle@attila bin]$ tnsping dev10g
    TNS Ping Utility for Linux: Version 10.1.0.2.0 - Production on 02-APR-2004 12:3
    :44
    Copyright (c) 1997, 2003, Oracle. All rights reserved.
    Used parameter files:
    /u01/app/oracle/product/10.1.0/db_1/network/admin/sqlnet.ora
    TNS-03505: Failed to resolve name
    What am I doing wrong?
    Thanks
    Renato

    Ok, I was able to succesfully connect to the database from the client. I made the following changes to the sqlnet.ora, tnsnames and listener. Here are the changes I made:
    sqlnet.ora
    ==============================
    # SQLNET.ORA Network Configuration File: /u01/app/oracle/product/9.2.0.1.0/netwo
    rk/admin/sqlnet.ora
    # Generated by Oracle configuration tools.
    # NAMES.DIRECTORY_PATH= (EZCONNECT)
    NAMES.DIRECTORY_PATH= (EXCONNECT, TNSNAMES, ONAMES, HOSTNAME)
    listener.ora
    ==============================
    # listener.ora Network Configuration File: /u01/app/oracle/product/10.1.0/db_1/n
    etwork/admin/listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /u01/app/oracle/product/10.1.0/db_1)
    (PROGRAM = extproc)
    (SID_DESC =
    (GLOBAL_DBNAME = DEV10G)
    (ORACLE_HOME = /u01/app/oracle/product/10.1.0/db_1)
    (SID_NAME = DEV10G)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.10)(PORT = 1521))
    tnsnames.ora
    ===========================================
    # tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.1.0/db_1/n
    etwork/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    DEV10G =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.10)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = DEV10G)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    Here is the new problem!
    I start the dbconsole using the folowing command:
    [oracle@attila bin]$ ./emctl start dbconsole
    TZ set to US/Eastern
    Oracle Enterprise Manager 10g Database Control Release 10.1.0.2.0
    Copyright (c) 1996, 2004 Oracle Corporation. All rights reserved.
    http://attila.n3kje.net:5500/em/console/aboutApplication
    Starting Oracle Enterprise Manager 10g Database Control ........................
    ... started.
    Logs are generated in directory /u01/app/oracle/product/10.1.0/db_1/attila.n3kje
    .net_DEV10G/sysman/log
    When I try and access it from the client I get the following error message:
    "The database status is currently unavailable. It is possible that the database is in mount or nomount state. Click 'Startup' to obtain the current status and open the database. If the database cannot be opened, click 'Perform Recovery' to perform an appropriate recovery operation."
    What am I doing wrong this time?
    Your help would be greatly appreciated
    Thanks
    Renato

Maybe you are looking for

  • Firefox stops responding frequently; there is no specific pattern to these episodes which might identify the problem.

    Firefox stops responding frequently (2 or 3 times daily). There are no observable patterns to these episodes which might identify a specific task that causes the crash. It has been increasing in frequency for about a month now. == Crash ID(s) == Can'

  • Mac vs PC ads, and the song that is in them.

    Hello everyone, Can someone, anyone, tell me what the little jingle is on the "hi, I'm a mac" ads (also called mac vs PC) and where I can find it. I really would like to try and make my own tit vs tat ads, but just cannot find this song anywhere!

  • Confused by increase in Monthly Direct Debits

    Hi all. Being a newbie, I'm sure this topic must have been raised in the past. As a new BT customer, I was paying Monthly Direct Debits of £23.50 to cover my contract for Unlimited Evening and Weekend Plan plus BT Total Broadband Option 1. After 6 mo

  • Apple you have to explain this please.

    This makes no sense. TC is forever making huge backups, 3.5 - 4 gb backups when the only thing open is mail. I have excluded everything but Documents, Mail, iCal, Music, Pictures and Movies. Those are the only things to backup. So today. I took some

  • OS 10.4.8 disables firewire connections

    I have been unable to connect my La Cie firewire hard drive to my 1ghz emac since updating to 10.4.8 and having searched extensively through many post have found this to be a pretty common problem across the board. All the turn off and disconnect eve