Table statistics

Greetings All,
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
Windows 2008 R2I had 18 unexplained columns appear on a table in one of the schemas. The column names are like SYS_000080$, SYS_000079$, ...
Anybody know if gathering statistics on the table will add columns to the table being analyzed, then dropped when stats have been collected?
I'm thinking (read as HOPE) that the gathering of statistics on this table was interrupted, hence leaving the extra columns.
Below is the SQL used to gather the stats.
       dbms_stats.gather_schema_stats (
                                ownname => 'schema_name_here',
                     estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE,
                            method_opt => 'FOR ALL COLUMNS SIZE AUTO',
                                  cascade => TRUE,
                                   options => 'GATHER',
                                   degree => 6);Can anyone confirm my suspicion please?
Thanks for your time,
Bob

Snyds wrote:
I posted the SQL used to gather the statistics. Not sure what else you expect for post sql.
The results:
There are 18 (new/additional) columns that have been appended to the end of the table. All of these new columns begin with "SYS_000" and end with 2 more digits and the dollar sign (i.e. SYS_00070$, SYS_00079$, SYS_00078$, and so on). These new columns are not consecutive, in that SYS_00079$ may not be the column after the column called SYS_00078$. There are gaps in the numeric protion on nthe new column names. These new columns, that begin with SYS_0000, do not belong on the table.
I don't know what other results you expect to see.
Bobwhat exactly is the SQL that displays SYS_00070$, SYS_00079$, SYS_00078$?
Do you understand that Oracle will generate object names for things like INDEX or CONSTRAINT?

Similar Messages

  • Error while executing the table statistics using Brtools

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

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

  • Import Table Statistics to another table

    Hi,
    Just like to know if I can use dbms_stats.import_table_stats to import table statistics to another table?
    Scenario:
    I exported the table statistics of the table (T1) using the command below.
    exec dbms_stats.export_table_stats('<user>','T1',NULL,'<stat table>');
    PL/SQL procedure successfully completed.
    And then, I have another table named T2, T1 and T2 are identical tables. T2 does not have statistics (I intentionally did not run gather statistics). I am wondering
    if I can import table statistics from T1 to T2 using dbms_stats package?.
    For what I understand, statistics can be imported back at the same table which is T1 but not for another table using dbms_stat package. If I am wrong, anyone can correct me.
    Thanks

    hi
    just try ;-) you lose nothing probably,
    check afterwards last_analyzed value for that table in user_tables
    if something is wrong, run regular stats

  • Table Statistics Gathering Query

    Hey there,
    I'm currently getting trained in Oracle and one of the questions posed to me were create a table, insert a million rows into it and try to find the number of rows in it. I've tried the following steps to solve this,
    First table creation
    SQL> create table t1(id number);
    Table created.Data insertion
    SQL> insert into t1 select level from dual connect by level < 50000000;
    49999999 rows created.Gathering statistics
    SQL> exec dbms_stats.gather_table_stats('HR','T1');
    PL/SQL procedure successfully completed.Finally counting the number of rows
    SQL> select num_rows from user_tables where table_name='T1';
      NUM_ROWS
      49960410
    SQL> select count(*) from t1;
      COUNT(*)
      49999999My database version is,
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - ProductionI would like to know why there are two different results for the same table when using "num_rows" from the view "user_tables" and the aggregate function "count()" over the same table. Please do keep in mind that i'm studying oracle and this is from a conceptual point of view only. I would like to know how gathering the table statistics works using dbms_stats package works.
    Thank You,
    Vishal

    vishm8 wrote:
    Gathering statistics
    SQL> exec dbms_stats.gather_table_stats('HR','T1');
    PL/SQL procedure successfully completed.I would like to know why there are two different results for the same table when using "num_rows" from the view "user_tables" and the aggregate function "count()" over the same table. Please do keep in mind that i'm studying oracle and this is from a conceptual point of view only. I would like to know how gathering the table statistics works using dbms_stats package works.
    Thank You,
    VishalBecause you aren't specifying a value for estimate_percent in the procedure call (to gather_table_stats) Oracle will pick an estimate value for you. If you want to sample the entire table you would need to explicitly specify that in your procedure call.
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e16760/d_stats.htm#ARPLS68582

  • Table statistics delete

    Hi
    Is there any command to delete gathered statistics of a table
    suppose : I have gather table statistics as under
    exec dbms_stats.gather_table_stats('TEST1','EMP');
    now I want to delete the statistics from the above table EMP
    Regards
    Jewel

    The package dbms_stats is fully documented in the Oracle supplied package and type reference manual for your unknown version of Oracle.
    It has a call to delete statistics.
    As per forums etiquette, please do the obvious first and consult documentation.
    Sybrand Bakker
    Senior Oracle DBA

  • IMPDP take too much time at TABLE STATISTICS

    Hi experts.
    on of my database is taking taking to much time during IMPDP at TABLE STATISTICS. it take alomost 20 mints to import TABLE STATISTICS while on the other hand all other objects are imported within 5 to 7 minits.
    my database version is 10.2.0.1 and O/S Red Hat Enterprise Linux AS release 3 (Taroon Update 5)
    please guide how i can fix this issue
    thanx in Advance.
    regards

    please guide how i can fix this issueSeems to be a bug. Upgrade to 10.2.0.4.0 or 10.2.0.5.0 and check again.
    Ronny Egner
    My Blog: http://blog.ronnyegner-consulting.de

  • Table Statistics failed during Import

    Hi All,
    I am trying to import an existing schema in Oracle 10g.
    I am using the impdp utility.
    The export dump consists of the complete schema (metadata and data).
    But it failed with the following logs.
    Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    ORA-39125: Worker unexpected fatal error in KUPW$WORKER.PUT_DDLS while calling DBMS_METADATA.CONVERT []
    ORA-06502: PL/SQL: numeric or value error
    LPX-00007: unexpected end-of-file encountered
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.KUPW$WORKER", line 6235
    ----- PL/SQL Call Stack -----
    object line object
    handle number name
    1945A21C 14916 package body SYS.KUPW$WORKER
    1945A21C 6300 package body SYS.KUPW$WORKER
    1945A21C 12279 package body SYS.KUPW$WORKER
    1945A21C 3279 package body SYS.KUPW$WORKER
    1945A21C 6889 package body SYS.KUPW$WORKER
    1945A21C 1262 package body SYS.KUPW$WORKER
    1CD814AC 2 anonymous block
    Job "THHIS"."SYS_IMPORT_FULL_02" stopped due to fatal error at 11:47:38
    I had then used the parameter EXCLUDE=STATISTICS and then the import was successful.
    I would like to the significance of this STATISTICS.
    I mean would EXCLUDE=STATISTICS always be ok?
    I have exported and imported the scheme as a user and not as sysdba. Does this make any difference?
    any suggestion would be highly appreciated.
    Thanks,
    Tanuja

    Hi,
    See related threads here:
    ORA-39125 & DBMS_METADATA
    Error ORA-39125 and ORA-04063 during export for transportable tablespace
    ORA-39125: Worker unexpected fatal error in string while calling string [string]
    Cause: An unhandled exception was detected internally within the worker process for the Data Pump job while calling the specified external routine. This is an internal error. Additional information may be supplied.
    Action: If problem persists, contact Oracle Customer Support.
    Hope this helps . . .
    Donald K. Burleson
    Oracle Press author
    Author of "Oracle Tuning: The Definitive Reference"
    http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm

  • Re: Unable to see Table statistics on when I click on the Table

    I have lost the ability to see table statistics when I click on the table. I use to be able to click on the table name under the connection window and would get a display of The columns, data, constraints, index,dependencies etc..... Now It does not seem to work any more I tried preferences but I don't seem to be able to change the behavior back to the way it was any suggestions.

    I upgraded to 1.2 and it solved the problem. I would however love to know the settings that control this display.

  • Different Ways To Gather Table Statistics

    Can anyone tell me the difference(s), if any, between these two ways to refresh table stats:
    1. Execute this procedure which includes everything owned by the specified user
    EXEC DBMS_STATS.gather_schema_stats (ownname => 'USERNAME', degree => dbms_stats.auto_degree);
    2. Execute this statement for each table owned by the specifed user
    analyze table USERNAME.TABLENAME compute statistics;
    Generally speaking, is one way better than the other? Do they act differently and how?

    In Oracle's automatic stats collection, not all object are included in stats collection.
    Only those tables, which has stale stats are taken for stats collection. I don't remember on top of my head, but its either 10% or 20% i.e. the tables where more than 10% (or 20%) data has changed are maked as stale. And only those stale objects will be considered for stats collection.
    Do you really think, each and every object/table has to be analyzed every day? How long does it take when you gather stats for all objects?

  • Oracle table statistics

    Dear All Members,
    Is there any way where we can check whether current statistics in table are outdated in oracle? In OTN i found using view "DBA_TAB_MODIFICATIONS" we can gather timestamps of statistics
    But can we use this to compare the quality of statistics in DB tables?
    Regards,
    Shanaka.

    Hi Shanaka,
    As far as I know that the DBA_TAB_MODIFICATIONS table used to collect quality of statistics value by SAP, also. There's only one exception that at the first step, without paying an attention to the DBA_TAB_MODIFICATIONS records, the system creates new statistics by using "-f stats -t all" parameters. At the second and further steps, new stats will be created for the tables that are need to be collected.
    In short, because of the DB20 transaction reflects DBA_TAB_MODIFICATIONS table to store quality of the table stats, both values should be same.
    In addition to the information above, you can read the notes, below;
    Note 588668 - FAQ: Database statistics
    Note 408527 - Checking the statistics using DBA_TAB_MODIFICATIONS,
    Best regards,
    Orkun Gedik

  • Gathering table statistics

    Hi,
    I am trying to gather statistics on a sample table dept.I created a statstable as follows
    begin
    DBMS_STATS.CREATE_STAT_TABLE ( 'scott' ,'dept_stats_tab');
    end;
    But when i open the statstable "Dept_stats_tab" i am not able to understand the meaning of the columns.
    Can anybody let me know the what is purpose of the following cols of statstab
    C1..C5,N1--N12,D1,R1,R2,CH1.
    cheers
    RRK

    You have a valid question but this is what the documentation says...
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_stats.htm#i1035018
    >>
    This procedure creates a table with name stattab in ownname's schema which is capable of holding statistics. The columns and types that compose this table are not relevant as it should be accessed solely through the procedures in this package.
    >>

  • Gather Table Statistics (Stats) Crashing Application

    Hello
    Just started a new place of work which has a 9i database with a VB Front End App.
    Noticed in the Database no stats had been gathered for any objects (ever).
    I decided to run a gather stats procedure on a particular heavily-used table but it caused the application to crash/freeze?
    begin
    dbms_stats.gather_table_stats(OWNNAME=>     , TABNAME=>     ,
    ESTIMATE_PERCENT=> dbms_stats.auto_sample_size,
    METHOD_OPT=> 'FOR ALL COLUMNS SIZE 1', CASCADE=>TRUE);
    end;
    I decided to use auto sample size and decided to also gather stats on indexes (and without CASCADE=FALSE) but appeared to crash the application. The job itself worked fine.
    Anyone ever encountered such issue? Could there be any reason for this (i.e. no stats ever gathered)?
    Thanks
    Edited by: user636420 on Jan 22, 2010 9:22 AM

    I have found something interesting..........
    Prior to Oracle 10g, Oracle's default optimizer mode was called “choose.” In the choose optimizer mode, Oracle will execute the rule-based optimizer if there are no statistics present for the table; it will execute the cost-based optimizer if statistics are present. The danger with using the choose optimizer mode is that problems can occur in cases where one Oracle table in a complex query has statistics and the other tables do not.
    This probably explains the fact that I am gathering statistics for 1 table and not the others.
    Just checked the explain plan for a particular SQL query and it's using CHOOSE optimizer mode.
    Edited by: user636420 on Jan 22, 2010 9:35 AM

  • Gather table Statistics

    i need collect the statistics for few tables from a schema. i am doing the following:
    i am creating a table to save the statistics.
    begin
    dbms_stats.create_stat_table(ownname =>'TEST',
    statab =>'TEST_ORD',);
    end;
    and then i am gathering the table stats for a particular table as follows:
    exec dbms_stats.gather_table_stats(
    ownname => 'BNS',
    estimate_percent =>'10,
    statown =>'TEST',
    tabname =>'ORDERS',
    stattab =>'TEST_ORD',
    statid =>'CR');
    my question is how can do for multiple tables ? the reason is i have to create a Job to run this script automatically daily.
    can i put this into a procedure? or any other ideas?
    Appreciate all your help!

    In many environments the default job does a pretty good job of generating statistics, but I have to agree that there are environments where the default job does not produce very good statistics which is why I mentioned the ability to lock statistics. For anyone who has not had to deal with statistics much you can generate a workable set of statistics manually and then lock them in place so the provided automatich statistics generation task does not re-generate a specific set of statistics.
    Also by default the 10g task collects histograms. If histograms were not in use in 9i then removing the histograms often 'fixes' most of the query performance issues encounted upon upgrading to 10g in these cases. 11g adds the ability set dbms_stats parameters at the table level and have those settings retained for use with future stats collection.
    Yes cron assumes a UNIX (or Linux) platform but Windows also has a job scheduler available. I am not sure what difference RAC would make. We use cron tasks against RAC all the time. We do normally just run the tasks against the local instance.
    Nicely organized script/code library.
    HTH -- Mark D Powell --

  • Export tables statistics in oracle 10g.

    hi,
    I want to create stats table in different schema that holds the object statistics of another schema, is it possible?
    dbms_Stats.create_Stat_tabe('user1','user1table);
    dbms_stats.export_Schema_stats('user2','user1.user1table);
    its giving error when i try to do this.
    any idea plz?
    thanks in advance.

    its giving error when i try to do this. ERROR? What Error? I don't see any error.
    ALWAYS
    Post Operating System (OS) name & version for DB server system.
    Post results of
    SELECT * from v$version

  • Oracle 9 table statistics doesn't work

    Hy to everybody.
    Hy have a query on 3 big tables (10 millions of rows for each one).
    i perform always the statistics of these 3 tables with
    ANALYZE table TABLE1 estimate statistics sample 1 percent;
    but if i make the select statement without hint, it takes 20 minutes.
    If i put the hints of full
    select /* FULL (TABLE1) FULL(TABLE2) FULL(TABLE3) */+
    it takes 2 minutes.
    Why oracle can't understand that is better to not use indexes to perform this query, but i have to tell him to go in full?
    Thanks in advance!

    user13012184 wrote:
    Why oracle can't understand that is better to not use indexes to perform this query, but i have to tell him to go in full?Probably because you are using the wrong command to gather statistics.
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_46a.htm#SQLRF01105
    Oracle Corporation strongly recommends that you use the DBMS_STATS package rather than ANALYZE to collect optimizer statistics. That package lets you collect statistics in parallel, collect global statistics for partitioned objects, and fine tune your statistics collection in other ways. Further, the cost-based optimizer, which depends upon statistics, will eventually use only statistics that have been collected by DBMS_STATS. See Oracle9i Supplied PL/SQL Packages and Types Reference for more information on this package.

Maybe you are looking for

  • ITunes is missing the first track of most albums

    For some time now, iTunes has been losing the first track of my albums and playlists. Not all of them, but many. I can't figure out a pattern...digital downloads, CD uploads, everything. There are a bunch of Track 1s for unknown albums listed in my L

  • What driver do I need to connect to Brother MFC-9325CW

    what driver do I need to connect t0 Brother MFC-9325CW?

  • Managed system configuration, step:Check Prerequisites

    hi firends, We've updated our SLM system up to SP13 and import finished success. When we starts managed system conf from menu SOLMAN_SETUP - Managed System Configuration - Configure System - Check Prerequisites, execution return error that system pre

  • SXPG_COMMAND_EXECUTE failed for BRBACKUP

    Dear All, OS : AIX,  DB :Oracle , SAP ECC6.0 i got an error and  online backup has  scheduled in DB13 ( Production Server) when its  reach the backup time its showins error Status : not Available JOB LOG: 30.11.2009     17:26:56     Job started 30.11

  • Macbook air adapter heats up really bad ! please help

    Hello Folks !! This is Jan and i purchased macbook air 11 inch 64 gb ultrathin laptop 2 months back. i use this laptop for watching youtube videos or occasional skype chat with family and friends and each day i dont use my laptop for more than 4 hour