Tablespace usage in Oracle 11g

Hi Guys,
Not sure if this has been asked before.
I have created a couple of table spaces in my database and one of these tables is holding all my data. For that table space, I have added at least 8 data files so far and it seems that Oracle uses the free space very quickly. I would like to know following things
1. Is there anyway to know that usage of data files with respect to table stored in it? In other words - would I be able to know if Table-A stored in datafile 1?
2. Is there anyway to reuse the old data files?
3. I am not sure if it is an Oracle instance, but it seems to be that Oracle 11g uses the free space very quickly (I can understand that it depends on the data) so just curious to know if there is anyway to minimize the usage.
Any information on this would be useful and appreciated.
Thanks
Regards
Jiggy

Is there anyway to know that usage of data files with respect to table stored in it? In other words - would I be able to know if Table-A stored in datafile 1? The tables are actually stored in the tablespaces itself , spanned to multiple datafiles. Query dba_segments and dba_extents to find out that in which tablespace and datafile(s) , your tables are spread across.
Is there anyway to reuse the old data files?In what way? If it is a Locally Managed Tablespace, Oracle would reuse the space becoming free automatically within the tablespace for the subsequent data.
I am not sure if it is an Oracle instance, but it seems to be that Oracle 11g uses the free space very quickly (I can understand that it depends on the data) so just curious to know if there is anyway to minimize the usage. No such thing at least in my knowledge. Space being used would solely depend on the incoming data and not on the release of the db.
Aman....

Similar Messages

  • Regarding the timestamp usage in oracle 11g

    Hi All,
    I am using the following query in 11g.
    SELECT DISTINCT TO_DATE(SHIP_DTTM,'mm/dd/yyyy') FROM PS_IN_DEMAND WHERE SHIP_DTTM BETWEEN TO_DATE(fromdate,'mm/dd/yyyy') AND TO_DATE(todate,'mm/dd/yyyy')
    The error i am getting is
    System.Data.Odbc.OdbcException: ERROR [22007] [Microsoft][ODBC driver for Oracle][Oracle]ORA-01858: a non-numeric character was found where a numeric was expected
    at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
    at System.Data.Odbc.OdbcDataReader.Read()
    at System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping)
    at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
    at System.Data.Common.DataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
    After my analysys i am getting the problem with the column SHIP_DTTM column and its datatype is Timestamp.
    Please help me out in resolving this issue.
    Thanks in advance

    Hi,
    This is an Oracle Database specific error, ORA-01858.
    You posted on the wrong forum, this is the Berkeley DB (Core) forum.
    Your question should probably be best posted on General Database Discussions.
    Regards,
    Andrei

  • Query not considering function based index in oracle 11g

    I have a query which used Function Based Index when run in oracle 9i but when I run the same query
    without any changes, it does not consider index. Below is the query:
    SELECT distinct patient_role.domain_key, patient_role.patient_role_key,
    patient_role.emergency_contact_name,
    patient_role.emergency_contact_phone, patient_role.emergency_contact_note,
    patient_role.emergency_contact_relation_id,
    patient_role.financial_class_desc_id, no_known_allergies, patient_role.CREATED_BY,
    patient_role.CREATED_TIMESTAMP,
    patient_role.CREATED_TIMESTAMP_TZ, patient_role.UPDATED_BY, patient_role.UPDATED_TIMESTAMP,
    patient_role.UPDATED_TIMESTAMP_TZ,
    patient_role.discontinued_date
    FROM encounter, patient_role
    WHERE patient_role.patient_role_key = encounter.patient_role_key
    AND UPPER(TRIM(leading :SYS_B_0 from encounter.account_number)) = UPPER(TRIM(leading :SYS_B_1 from
    :SYS_B_2))
    AND patient_role.discontinued_date IS null
    AND encounter.discontinued_date IS null ;
    Index definition:
    CREATE INDEX "user1"."IX_TRIM_ACCOUNT_NUMBER" ON "user1."ENCOUNTER" (UPPER(TRIM(LEADING
    '0' FROM "ACCOUNT_NUMBER")), "PATIENT_ROLE_KEY", "DOMAIN_KEY", "DISCONTINUED_DATE")
    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
    BUFFER_POOL DEFAULT)
    TABLESPACE "user1"
    Database : Oracle 11g (11.2.0.3)
    O/S : Linux 64 bit (the query does not consider index even on windows os)
    Any suggestions?
    -Onkar
    Edited by: onkar.nath on Jul 2, 2012 3:32 PM

    Onkar,
    I don't appreciate you posting this question in several forums at the same time.
    If I would know you also posted this on Asktom, I wouldn't even have bothered.
    As to your 'issue':
    First of all: somehow cursor_sharing MUST have been set to FORCE. Oracle is a predictable system, not a fruitmachine.
    Your statement the '0' is replaced by a bind variable anyway is simply false. If you really believe it is not false, SUBMIT a SR.
    But your real issue is not Oracle: it is your 'application', which is a mess anyway. Allowing for alphanumeric numbers is a really bad idea.
    Right now you are already putting workaround on workaround on workaround on workaround.
    Issue is the application: it is terminal., and you either need to kill it, or to replace it.
    Sybrand Bakker
    Senior Oracle DBA

  • OEM 12c and Oracle 11g DB installation

    Question:  is OEM 12c certified for usage on Oracle 11g DB installation

    Answer - requirements are documented - Installing Enterprise Manager System
    HTH
    Srini

  • Oracle 11g R1 tablespace query ?

    Currently within our 9i environment, a decision was made to split the data / index table into individual tablespaces (Data Large/Medium/Small/Etc). Each of these tablesspaces are not spilt over physical disc but are part of a single disk array. We are now conducting an upgrade to Oracle 11g R1 (using a single array), and the question has arisen regarding keeping the same tablespace structure as we currently use in 9i. The question that I have is should we carry on using this format, or should we place all tables/indexes into a single tablespace (Data/Index). From an OS point of view, I can’t see any benefit from doing this, but from an Oracle point of view, it might. What are everybody’s thoughts.

    hi,
    Its your convienent to keep into a same tablespace or diff.. if you face i/o probs or performance problem then you can store the datas in diff tbls according to that.
    without knowing the DB usage and performance .. we can't say anything.. its your choice ..
    regards,
    Deepak

  • Create tablespace in Oracle 11g

    Windows 2008 R2 (64-bit OS)
    Oracle 11g R2 Standard Edition ONE(64-bit database)
    I use the following Oracle command to create tablespace in 11g.
    CREATE TABLESPACE TEST_TBS
    DATAFILE
    'C:\ORACLE\ORADATA\TEST_TBS01.DBF' SIZE 5M
    AUTOEXTEND ON NEXT 5M
    MAXSIZE 50000M;
    - The above command works fine.
    Is there any better commands i need to be using in creating a tablespace w.r.t. performance and management.

    TSharma wrote:
    it is recommended to have small sized blocks for OLTP, and big sized for DSS. The reasons:
    You can try different block sizes in tablespaces...
    On OLTP, a smaller block size reduces contention:
    1. Reduces the possibility of concurrent transaction and locks on the same block.
    2. Provides a better locking mechanism
    3. Less transacction locks possibilities at the block header.
    DSS benefit from big blocks mainly because of IO:
    1. Retrieves in less IO operations more data, which is critical for FTS and index scans.
    2. A higher row density means less IO
    3. Indexes retrieve information on a block per block basis, with big blocks indexes are retrieved with less IO
    4. Reduces the chances of chained rows.
    Check the following link for examples and details information.If johnpau needs a 50G file he has no choice: 16K blocks is the only option.
    But that advice about different blocksizes is very twentieth century. Nowadays, it doesn't matter.

  • Oracle 11g R1: How to create indexes automatically in tablespaces?

    Hello,
    Obviously, due to maintenance and performance reasons it is better to put indexes in own tablespaces, separated from the data.
    I would like to know now whether there is a way under Oracle 11g R1 to create every index automatically in a tablespace?..or the indexes can only be created manually?
    Unfortunately i wasn't able to find any hint in the documentation or by googlin' it.
    Thanks in advance.
    Regards,
    Lars

    Hi Lars
    I wouldn't be quite so sure having a separate tablespace just for indexes is better for either performance or maintenance reasons if I were you ...
    For your enjoyment, some reasons why this simply is not true:
    http://richardfoote.wordpress.com/2008/04/16/separate-indexes-from-tables-some-thoughts-part-i-everything-in-its-right-place/
    http://richardfoote.wordpress.com/2008/04/18/separate-indexes-from-tables-some-thoughts-part-ii-there-there/
    http://richardfoote.wordpress.com/2008/04/28/indexes-in-their-own-tablespace-availabilty-advantages-is-there-anybody-out-there/
    http://richardfoote.wordpress.com/2008/05/02/indexes-in-their-own-tablespace-recoverability-advantages-get-back/
    Cheers
    Richard Foote
    http://richardfoote.wordpress.com/

  • UNDOTBS1 and SYSAUX Tablespace Filename Mismatch in Oracle 11g XE

    Hi,
    We have installed Oracle 11g XE 32 bit on Windows and found that Tablespace name and filenames are mismatched for UNDOTBS1, SYSAUX.
    If you run following query:
    SELECT TABLESPACE_NAME, FILE_NAME FROM DBA_DATA_FILES; You will get below output:
    TABLESPACE_NAME                    FILE_NAME
    ============================================================================
    USERS                C:\ORACLE\ORACLE11GXE\APP\ORACLE\ORADATA\XE\USERS.DBF
    UNDOTBS1           C:\ORACLE\ORACLE11GXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
    SYSAUX                C:\ORACLE\ORACLE11GXE\APP\ORACLE\ORADATA\XE\UNDOTBS1.DBF
    SYSTEM                C:\ORACLE\ORACLE11GXE\APP\ORACLE\ORADATA\XE\SYSTEM.DBFNotice the difference between UNDOTBS1 and SYSAUX.
    UNDOTBS1 tablespace has filename SYSAUX.DBF while
    SYSAUX tablespace has filename UNDOTBS1.DBF
    Is this a bug or just a wrong name mapping?
    Will this affects the internal behavior of tablespace as well for undo tablespace and APEX Installation?
    Regards,
    Sohil Bhavsar.

    Error: ORA-03297 ... related to this mismatch of UNDOTBS1 with SYSAUXActually its related to trying to resize a file smaller than the existing extents in use, so yes, restores aren't the only place that could cause confusion from the "incorrect" datafile names.
    Fixing it could be done in one pass if you don't mind adjusting filenames so they don't clash, i.e. shut down your database instance and move the files at the OS, startup mount and rename the files in the database.
    Don't use the services applet, the instance has to be shutdown with sqlplus, leave the database service running. If you try to open the database with OS files renamed but not corrected in the instance, the database won't open if there are troubles with the undo datafile.
    sqlplus /nolog
    conn /as sysdba;
      ... connected ...
    col name format a60
    col tsname format a10
    set lines 120
    select t.name tsname,  d.name, d.BYTES / 1024 / 1024 mb from v$tablespace t, v$datafile d where t.ts#  = d.ts#;
    system .../system.dbf  <n>
    shutdown immediate;
    ... database closed ...
    exit
    cd <datafile directory> 
    move sysaux.dbf undotbs01.dbf
    move UNDOTBS1.DBF sysaux.dbf
    # or use file explore GUI after shutdown
    sqlplus /nolog
    conn /as sysdba;
      ... connected to idle instance ...
    startup mount;
      ... SGA, instance size info ...
    alter database rename file 'C:\...<full path>\SYSAUX.DBF' to 'C:\...<full path>\UNDOTBS01.DBF';
    alter database rename file 'C:\...<full path>\UNDOTBS1.DBF' to 'C:\...<full path>\SYSAUX.DBF';
    select t.name tsname,  d.name, d.BYTES / 1024 / 1024 mb from v$tablespace t, v$datafile d where t.ts#  = d.ts#;
    ... make sure you get what was asked for ...
    TSNAME     NAME                                                       MB
    SYSTEM     C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSTEM.DBF              360
    SYSAUX     C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF              660
    UNDOTBS1   C:\ORACLEXE\APP\ORACLE\ORADATA\XE\UNDOTBS01.DBF            25
    USERS      C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF               100
    alter database open;
      ... database altered ... 

  • Forcing usage of HTTP/1.0 (EPG & Oracle 11g)

    Hi all,
    We've installed APEX 4 w/ EPG on Oracle 11g Database. End users use a squid proxy, which convert any HTTP request using HTTP/1.0.
    The problem is: when users attend to display a page in the application they have to wait 60 seconds before getting any result. We've found out that squid sends his requests with HTTP/1.0, then XMLDB reads the request, and sends the response using HTTP/1.1. The proxy seems not to understand the response quickly.
    The question is: is it possible to force XMLDB to treat and answer to any request using HTTP/1.0? The end users environment does not allow to upgrade the proxy or change anything.
    Our database environment is:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    Regards,
    Matthieu

    Fiddled around a bit on the www. Version 3.1 should (reads a bit like more or less, but test and you will see) support HTTP1.1 (http://wiki.squid-cache.org/Features/HTTP11)
    Also read up a bit on the development cycle and support of Squid. I have this stuff working, the functionality via Apache and hadn't had any issues. Maybe you should ask your customer and/or at least address why the use a product with such an unstable support. As said Apache has no issues (I used 11.2.0.1 database/Apex 3.21 for one of our customer setups).
    Not sure if you can "downgrade" the HTTP level of the Oracle XDB Protocol Listener functionality. Have you tried with a 10.2.0.3 database or higher 10.*2*.0.x. version?

  • Regarding installation and usage of oracle forms 11g on windows 7

    dear all,
    i am new to the oracle forms and reports feature. i tried installing forms and reports following certain steps which i could find from the internet, but it could not be installed.
    i ended up crashing my system.can anyone of you help me in providing the step by step installation of oracle 11g forms and reports on windows 7 64 bit.
    regards,
    sreejith

    When I was cleaning my email account i noticed message from OTN forum. I forgot to reply :/
    I followed instructions from the message above and it worked. Oracle XE + PPRD (only forms to save disk space and RAM) + weblogic, i have also installed APEX 3.2.1. It all works at my win 7 system
    There where one bug in forms builder database connector, solution was to replace it with the file from SQL*Plus (AFAIR it was tnsnames.ora file)
    So thank you Chris999, you helped me a lot.

  • Oracle 11g - Memory used for sorting

    Hi everyone,
    I would like to know how I could analyze memory used for sorting in Oracle 11g. When I run the below query, it returns 1531381.
    select value from v$sysstat where name like 'sorts (memory)';But when I check sort_area_size parameter from v$parameter, it returns 65536. Does it mean my database is using more memory for sorting than sort_area_size. Or is the way I interpret v$sysstat view and sort_area_size wrong? What is the best way to monitor the memory usage for sorting? Thanks in advance.
    Regards,
    K.H
    Edited by: K Hein on Apr 5, 2012 8:16 PM

    check the valuse of pga_aggregate_target
    http://docs.oracle.com/cd/B19306_01/server.102/b14237/initparams157.htm
    Note:
    Oracle does not recommend using the SORT_AREA_SIZE parameter unless the instance is configured with the shared server option. Oracle recommends that you enable automatic sizing of SQL working areas by setting PGA_AGGREGATE_TARGET instead. SORT_AREA_SIZE is retained for backward compatibility.
    What is the best way to monitor the memory usage for sorting? try v$sort_usage
    or v$tempseg_usage
    col sid_serial for a44
    col size for a22
    col SID_SERIAL for a22
    SELECT b.tablespace,
            ROUND(((b.blocks*p.value)/1024/1024),2)||' MB' "SIZE",
            a.sid||','||a.serial# SID_SERIAL,
            a.username,a.osuser,
            a.program
       FROM sys.v_$session a,
            sys.v_$sort_usage b,
            sys.v_$parameter p
      WHERE p.name  = 'db_block_size'
        AND a.saddr = b.session_addr
    ORDER BY b.blocks;

  • What are the privileges required for explain plan in Oracle 11g database

    I am facing the problem in doing a explain plan for a view in Oracle 11g database. When I select from the view like this:
    select * from zonewisearpu
    It does a select on the view but when I give explain plan like
    explain plan for
    select * from zonewisearpu
    I get the error like insufficient privileges.
    Please let me know if things are getting missed out as I guess system level privileges are required to execute this.
    I hope, my question is clear.
    It’s a humble request to revert urgently if possible as I need to complete a task and do not know the way out.
    Regards

    975148 wrote:
    Thanks for your reply. I have found out that an explain plan is possible on the user's own objects and is not possible on the granted objects from a different schema. For eg, if I do a explain plan on a view querying on tables from a different view, it would not allow the explain plan to proceed. This could mean that explain plan needs different privileges than just a select.
    Requesting for a revert to this.
    Here is a simple test case that I have perfomed
    SQL> create user test1 identified by test1;
    User created.
    SQL> create user test2 identified by test1;
    User created.
    SQL> grant connect, resource to test1,test2;
    Grant succeeded.
    SQL> create table test1.tab1 as select * from v$session;
    Table created.
    SQL> connect test2/test1
    Conencted.
    SQL> show user
    USER is "TEST2"
    SQL>
    SQL> explain plan for
      2  select sid,serial#,status,username from test1.tab1 where username<> '';
    Explained.
    SQL>
    So, as can be seen I am able to do a explain plan from user test2 for tables belong to user test1.
    As far as privileges are concerned, following is the list
    SQL> select * from dba_role_privs where grantee in ('TEST1','TEST2') order by 1;
    GRANTEE                        GRANTED_ROLE                   ADM DEF
    TEST1                          CONNECT                        NO  YES
    TEST1                          RESOURCE                       NO  YES
    TEST2                          CONNECT                        NO  YES
    TEST2                          RESOURCE                       NO  YES
    SQL>
    SQL> select grantee,owner,table_name,privilege from dba_tab_privs where grantee in ('TEST1','TEST2') order by 1;
    GRANTEE    OWNER      TABLE_NAME           PRIVILEGE
    TEST2      TEST1      TAB1                 SELECT
    SQL>
    SQL>  select * from dba_sys_privs where grantee in ('TEST1','TEST2') order by 1;
    GRANTEE    PRIVILEGE                      ADM
    TEST1      UNLIMITED TABLESPACE           NO
    TEST2      UNLIMITED TABLESPACE           NO
    SQL>

  • Table space not reduce after delete in oracle 11G

    Hi Team,
    I have a DB 11.1.0.7 on unix.
    I have execute delete tables on tablespace, but this not reduce.
    Thanks

    935299 wrote:
    What segment space management type is defined for the tablespace in question?
    MANUAL
    Then you should check out the documentation some more.
    But even if you shrink the table segement what is that going to do for the data file size?
    I don't undertand you.
    ThanksYour thread is titled "Table space not reduce after delete in oracle 11G" which implies to me that you are interested in reducing the size of a tablespace (which really means reducing the size of the underlying datafile(s)).
    So, if you shrink the size of the sys.aud$ table, will that cause the datafile(s) to become smaller? Will it accomplish your goal? What else, if anything, needs to happen?

  • Oracle 11g Migration performance issue

    Hello,
    There a performance issue with Migration from Oracle 10g(10.2.0.5) to Oracle 11g(11.2.0.2).
    Its very simple statement hanging for more than a day and later found that query plan is very very bad. Example of the query is given below:
    INSERT INTO TABLE_XYZ
    SELECT F1,F2,F3
    FROM TABLE_AB, TABLE_BC
    WHERE F1=F4;
    While looking at cost in Explain plan :
    on 10g --> 62567
    0n 11g --> 9879652356776
    Strange thing is that
    Scenario 1: if I issue just query as shown below, will display rows immediately :
    SELECT F1,F2,F3
    FROM TABLE_AB, TABLE_BC
    WHERE F1=F4;
    Scenario 2: If I create a table as shown below, will work correctly.
    CREATE TABLE TABLE_XYZ AS
    SELECT F1,F2,F3
    FROM TABLE_AB, TABLE_BC
    WHERE F1=F4;
    What could be the issue here with INSERT INTO <TAB> SELECT <COL> FROM <TAB1>?

    Table:
    CREATE TABLE AVN_WRK_F_RENEWAL_TRANS_T
    "PKSRCSYSTEMID" NUMBER(4,0) NOT NULL ENABLE,
    "PKCOMPANYCODE" VARCHAR2(8 CHAR) NOT NULL ENABLE,
    "PKBRANCHCODE" VARCHAR2(8 CHAR) NOT NULL ENABLE,
    "PKLINEOFBUSINESS" NUMBER(4,0) NOT NULL ENABLE,
    "PKPRODUCINGOFFICELIST" VARCHAR2(2 CHAR) NOT NULL ENABLE,
    "PKPRODUCINGOFFICE" VARCHAR2(8 CHAR) NOT NULL ENABLE,
    "PKEXPIRYYR" NUMBER(4,0) NOT NULL ENABLE,
    "PKEXPIRYMTH" NUMBER(2,0) NOT NULL ENABLE,
    "CURRENTEXPIRYCOUNT" NUMBER,
    "CURRENTRENEWEDCOUNT" NUMBER,
    "PREVIOUSEXPIRYCOUNT" NUMBER,
    "PREVIOUSRENEWEDCOUNT" NUMBER
    SEGMENT CREATION IMMEDIATE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
    INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT
    TABLESPACE "XYZ" ;
    Explain Plan(With Insert Statement and Query):_
    INSERT STATEMENT, GOAL = ALL_ROWS               Cost=9110025395866     Cardinality=78120     Bytes=11952360
    LOAD TABLE CONVENTIONAL     Object owner=ODS     Object name=AVN_WRK_F_RENEWAL_TRANS               
    NESTED LOOPS OUTER               Cost=9110025395866     Cardinality=78120     Bytes=11952360
    TABLE ACCESS FULL     Object owner=ODS     Object name=AVN_WRK_F_RENEWAL_TRANS_1ST     Cost=115     Cardinality=78120     Bytes=2499840
    VIEW PUSHED PREDICATE     Object owner=ODS          Cost=116615788     Cardinality=1     Bytes=121
    SORT GROUP BY               Cost=116615788     Cardinality=3594     Bytes=406122
    VIEW     Object owner=SYS     Object name=VW_DAG_1     Cost=116615787     Cardinality=20168     Bytes=2278984
    SORT GROUP BY               Cost=116615787     Cardinality=20168     Bytes=4073936
    NESTED LOOPS OUTER               Cost=116614896     Cardinality=20168     Bytes=4073936
    VIEW     Object owner=SYS          Cost=5722     Cardinality=20168     Bytes=2157976
    NESTED LOOPS               Cost=5722     Cardinality=20168     Bytes=2097472
    HASH JOIN               Cost=924     Cardinality=1199     Bytes=100716
    NESTED LOOPS                         
    NESTED LOOPS               Cost=181     Cardinality=1199     Bytes=80333
    TABLE ACCESS BY INDEX ROWID     Object owner=ODS     Object name=INWARDSPOLICYDETAILS     Cost=159     Cardinality=1199     Bytes=39567
    INDEX RANGE SCAN     Object owner=ODS     Object name=IX_INWPOLDTLS_SYSCOMPANYBRANCH     Cost=7     Cardinality=1199     
    INDEX UNIQUE SCAN     Object owner=ODS     Object name=PK_AVN_D_MASTERPOLICYDETAILS     Cost=0     Cardinality=1     
    TABLE ACCESS BY INDEX ROWID     Object owner=ODS     Object name=AVN_D_MASTERPOLICYDETAILS     Cost=1     Cardinality=1     Bytes=34
    TABLE ACCESS FULL     Object owner=ODS     Object name=INWARDSPOLICYLOBMAPPING     Cost=741     Cardinality=288498     Bytes=4904466
    VIEW PUSHED PREDICATE     Object owner=ODS          Cost=4     Cardinality=1     Bytes=20
    FILTER                         
    SORT AGGREGATE                    Cardinality=1     Bytes=21
    TABLE ACCESS BY GLOBAL INDEX ROWID     Object owner=ODS     Object name=AVN_F_TRANSACTIONS     Cost=4     Cardinality=1     Bytes=21
    INDEX RANGE SCAN     Object owner=ODS     Object name=PK_AVN_F_TRANSACTIONS     Cost=3     Cardinality=1     
    VIEW PUSHED PREDICATE     Object owner=ODS          Cost=5782     Cardinality=1     Bytes=95
    SORT GROUP BY               Cost=5782     Cardinality=2485     Bytes=216195
    VIEW     Object owner=SYS     Object name=VW_DAG_0     Cost=5781     Cardinality=2485     Bytes=216195
    SORT GROUP BY               Cost=5781     Cardinality=2485     Bytes=278320
    HASH JOIN               Cost=5780     Cardinality=2485     Bytes=278320
    VIEW     Object owner=SYS     Object name=VW_GBC_15     Cost=925     Cardinality=1199     Bytes=73139
    SORT GROUP BY               Cost=925     Cardinality=1199     Bytes=100716
    HASH JOIN               Cost=924     Cardinality=1199     Bytes=100716
    NESTED LOOPS                         
    NESTED LOOPS               Cost=181     Cardinality=1199     Bytes=80333
    TABLE ACCESS BY INDEX ROWID     Object owner=ODS     Object name=INWARDSPOLICYDETAILS     Cost=159     Cardinality=1199     Bytes=39567
    INDEX RANGE SCAN     Object owner=ODS     Object name=IX_INWPOLDTLS_SYSCOMPANYBRANCH     Cost=7     Cardinality=1199     
    INDEX UNIQUE SCAN     Object owner=ODS     Object name=PK_AVN_D_MASTERPOLICYDETAILS     Cost=0     Cardinality=1     
    TABLE ACCESS BY INDEX ROWID     Object owner=ODS     Object name=AVN_D_MASTERPOLICYDETAILS     Cost=1     Cardinality=1     Bytes=34
    TABLE ACCESS FULL     Object owner=ODS     Object name=INWARDSPOLICYLOBMAPPING     Cost=741     Cardinality=288498     Bytes=4904466
    VIEW     Object owner=SYS     Object name=VW_GBF_16     Cost=4854     Cardinality=75507     Bytes=3850857
    SORT GROUP BY               Cost=4854     Cardinality=75507     Bytes=2340717
    VIEW     Object owner=ODS          Cost=4207     Cardinality=75507     Bytes=2340717
    SORT GROUP BY               Cost=4207     Cardinality=75507     Bytes=1585647
    PARTITION HASH ALL               Cost=3713     Cardinality=75936     Bytes=1594656
    TABLE ACCESS FULL     Object owner=ODS     Object name=AVN_F_TRANSACTIONS     Cost=3713     Cardinality=75936     Bytes=1594656
    Explain Plan(Only Query):_
    SELECT STATEMENT, GOAL = ALL_ROWS               Cost=62783     Cardinality=89964     Bytes=17632944
    HASH JOIN OUTER               Cost=62783     Cardinality=89964     Bytes=17632944
    TABLE ACCESS FULL     Object owner=ODS     Object name=AVN_WRK_F_RENEWAL_TRANS_1ST     Cost=138     Cardinality=89964     Bytes=2878848
    VIEW     Object owner=ODS          Cost=60556     Cardinality=227882     Bytes=37372648
    HASH GROUP BY               Cost=60556     Cardinality=227882     Bytes=26434312
    VIEW     Object owner=SYS     Object name=VW_DAG_1     Cost=54600     Cardinality=227882     Bytes=26434312
    HASH GROUP BY               Cost=54600     Cardinality=227882     Bytes=36005356
    HASH JOIN OUTER               Cost=46664     Cardinality=227882     Bytes=36005356
    VIEW     Object owner=SYS          Cost=18270     Cardinality=227882     Bytes=16635386
    HASH JOIN               Cost=18270     Cardinality=227882     Bytes=32587126
    HASH JOIN               Cost=12147     Cardinality=34667     Bytes=2912028
    HASH JOIN               Cost=10076     Cardinality=34667     Bytes=2322689
    TABLE ACCESS FULL     Object owner=ODS     Object name=AVN_D_MASTERPOLICYDETAILS     Cost=137     Cardinality=34667     Bytes=1178678
    TABLE ACCESS FULL     Object owner=ODS     Object name=INWARDSPOLICYDETAILS     Cost=9934     Cardinality=820724     Bytes=27083892
    TABLE ACCESS FULL     Object owner=ODS     Object name=INWARDSPOLICYLOBMAPPING     Cost=741     Cardinality=866377     Bytes=14728409
    VIEW     Object owner=ODS          Cost=5195     Cardinality=227882     Bytes=13445038
    HASH GROUP BY               Cost=5195     Cardinality=227882     Bytes=4785522
    PARTITION HASH ALL               Cost=3717     Cardinality=227882     Bytes=4785522
    TABLE ACCESS FULL     Object owner=ODS     Object name=AVN_F_TRANSACTIONS     Cost=3717     Cardinality=227882     Bytes=4785522
    VIEW     Object owner=ODS          Cost=26427     Cardinality=227882     Bytes=19369970
    HASH GROUP BY               Cost=26427     Cardinality=227882     Bytes=18686324
    VIEW     Object owner=SYS     Object name=VW_DAG_0     Cost=26427     Cardinality=227882     Bytes=18686324
    HASH GROUP BY               Cost=26427     Cardinality=227882     Bytes=25294902
    HASH JOIN               Cost=20687     Cardinality=227882     Bytes=25294902
    VIEW     Object owner=SYS     Object name=VW_GBC_15     Cost=12826     Cardinality=34667     Bytes=2080020
    HASH GROUP BY               Cost=12826     Cardinality=34667     Bytes=2912028
    HASH JOIN               Cost=12147     Cardinality=34667     Bytes=2912028
    HASH JOIN               Cost=10076     Cardinality=34667     Bytes=2322689
    TABLE ACCESS FULL     Object owner=ODS     Object name=AVN_D_MASTERPOLICYDETAILS     Cost=137     Cardinality=34667     Bytes=1178678
    TABLE ACCESS FULL     Object owner=ODS     Object name=INWARDSPOLICYDETAILS     Cost=9934     Cardinality=820724     Bytes=27083892
    TABLE ACCESS FULL     Object owner=ODS     Object name=INWARDSPOLICYLOBMAPPING     Cost=741     Cardinality=866377     Bytes=14728409
    VIEW     Object owner=SYS     Object name=VW_GBF_16     Cost=7059     Cardinality=227882     Bytes=11621982
    HASH GROUP BY               Cost=7059     Cardinality=227882     Bytes=6836460
    VIEW     Object owner=ODS          Cost=5195     Cardinality=227882     Bytes=6836460
    HASH GROUP BY               Cost=5195     Cardinality=227882     Bytes=4785522
    PARTITION HASH ALL               Cost=3717     Cardinality=227882     Bytes=4785522
    TABLE ACCESS FULL     Object owner=ODS     Object name=AVN_F_TRANSACTIONS     Cost=3717     Cardinality=227882     Bytes=4785522

  • Oracle 11g performace issue

    hi all,
    am using oracle 11g enterprise edition., i didn't ran any query but in ADDR report it was running some sytem based query(SYS,DBSNMP,SYSMAN etc)
    but in previous 10g it was working fine.. can anyone tell me how to stop those query..
    this is the query was running most frequently :
    select end_time, wait_class#, (time_waited_fg)/(intsize_csec/100), (time_waited)/(intsize_csec/100), 0
    from v$waitclassmetric union all
    select fg.end_time, -1, fg.value, bg.value, dbtime.value
    from v$sysmetric fg, v$sysmetric bg, v$sysmetric dbtime
    where bg.metric_name = 'Background CPU Usage Per Sec' and bg.group_id = 2 and fg.metric_name = 'CPU Usage Per Sec' and fg.group_id = 2 and dbtime.metric_name = 'Average Active Sessions' and dbtime.group_id = 2 and bg.end_time = fg.end_time and fg.end_time = dbtime.end_time order by end_time,wait_class#
    UPDATE MGMT_JOB_EXECUTION SET STEP_STATUS=:B2 WHERE STEP_ID=:B1

    Velsjeya wrote:
    hi all,
    am using oracle 11g enterprise edition., i didn't ran any query but in ADDR report it was running some sytem based query(SYS,DBSNMP,SYSMAN etc)
    but in previous 10g it was working fine.. can anyone tell me how to stop those query..
    this is the query was running most frequently :
    select end_time, wait_class#, (time_waited_fg)/(intsize_csec/100), (time_waited)/(intsize_csec/100), 0
    from v$waitclassmetric union all
    select fg.end_time, -1, fg.value, bg.value, dbtime.value
    from v$sysmetric fg, v$sysmetric bg, v$sysmetric dbtime
    where bg.metric_name = 'Background CPU Usage Per Sec' and bg.group_id = 2 and fg.metric_name = 'CPU Usage Per Sec' and fg.group_id = 2 and dbtime.metric_name = 'Average Active Sessions' and dbtime.group_id = 2 and bg.end_time = fg.end_time and fg.end_time = dbtime.end_time order by end_time,wait_class#
    UPDATE MGMT_JOB_EXECUTION SET STEP_STATUS=:B2 WHERE STEP_ID=:B1Why are you so concerned about background queries? Do you really think these queries uses high resource and have high elapsed time then you custom queries? The god way to diagnose a performance problem is to identify most resource intensive/time consuming program/module/code rather then running after background queries. Yes sometimes background queries too run slowly in rear cases and then you need to run dbms_stats.gather_dictionary_stats or dbms_stats.gather_fixed_objects_stats (https://blogs.oracle.com/optimizer/entry/fixed_objects_statistics_and_why)

Maybe you are looking for