ALL_% performance issue in 10G

Hi,
I'm working in 10.2.0.3 and we have a huge difference in performance (compared to Oracle9) whenever we use all_% views.
Any explaination/fix?
Kind Regards,
Ffrank

It is unclear what the purpose or meaning of the copy/paste of the note is.
In 10g, the default value for optimizer_mode has changed. This change requires that statistics be collected the dictionary segments. Examples of these segments are TAB$, OBJ$, SEG$, etc. Statistics on these segments are collected automatically by the 10g maintenance auto stats job (if you haven't disabled it). The V$ and X$ views (these are not physical tables, but rather views into memory structures, but they are called fixed tables) also need statistics collected on them (but just once for a representative workload).
GATHER_FIXED_OBJECTS_STATS collects stats on V$ and X$ fixed tables.
GATHER_DICTIONARY_STATS collects stats on the SYS and SYSTEM segments.
As I mentioned, one needs statistics for both groups.
Given the original post mentioned a large number of objects, chances are the TAB$, SEG$, etc stats are non representative.
I would recommend that you check out
Upgrading from Oracle Database 9i to 10g: What to expect from the Optimizer
http://www.oracle.com/technology/products/bi/db/10g/pdf/twp_bidw_optimizer_10gr2_0208.pdf
This is discussed on page 7 & 8 (Statistics on Dictionary Tables & Statistics on Fixed Objects)
As you can see, ALL_TABLES is composed of fixed tables and sys segments.
SQL> explain plan for select * from all_tables;
Explained.
SQL>  select * from table(dbms_xplan.display(format=>'basic'));
| Id  | Operation                    | Name       |
|   0 | SELECT STATEMENT             |            |
|   1 |  FILTER                      |            |
|   2 |   HASH JOIN RIGHT OUTER      |            |
|   3 |    TABLE ACCESS FULL         | SEG$       |
|   4 |    HASH JOIN RIGHT OUTER     |            |
|   5 |     TABLE ACCESS FULL        | USER$      |
|   6 |     HASH JOIN RIGHT OUTER    |            |
|   7 |      INDEX FAST FULL SCAN    | I_OBJ1     |
|   8 |      HASH JOIN               |            |
|   9 |       TABLE ACCESS FULL      | USER$      |
|  10 |       HASH JOIN              |            |
|  11 |        TABLE ACCESS FULL     | OBJ$       |
|  12 |        HASH JOIN RIGHT OUTER |            |
|  13 |         INDEX FAST FULL SCAN | I_OBJ2     |
|  14 |         HASH JOIN            |            |
|  15 |          MERGE JOIN CARTESIAN|            |
|  16 |           HASH JOIN          |            |
|  17 |            FIXED TABLE FULL  | X$KSPPI    |
|  18 |            FIXED TABLE FULL  | X$KSPPCV   |
|  19 |           BUFFER SORT        |            |
|  20 |            TABLE ACCESS FULL | TS$        |
|  21 |          TABLE ACCESS FULL   | TAB$       |
|  22 |   NESTED LOOPS               |            |
|  23 |    INDEX RANGE SCAN          | I_OBJAUTH1 |
|  24 |    FIXED TABLE FULL          | X$KZSRO    |
|  25 |   FIXED TABLE FULL           | X$KZSPR    |
32 rows selected.--
Regards,
Greg Rahn
http://structureddata.org

Similar Messages

  • DB Performance Issues after 10g Upgrade in EBS Instance

    We have upgraded our Database from 9i to 10g as first part of EBS 11.5.9 to 11.5.10.2 upgrade. Currently our production is running on 11.5.9 apps with 10g DB.
    Facing performance problems now. one of the them is, one Valueset query not using funcion based index while fired from the front end. but the same query when collected from SQL trace tkprofed file and executed from SQL Plus, it uses all proper indexes. We are not getting the cause of this.
    Had anyone faced same kind of issues before. please suggest.
    thanks,
    Raj.

    Make sure you have all of the recommended performance patches for 11.5.9, and gather stats for SYS and SYSTEM in the following manner:
    Oracle E-Business Suite Recommended Performance Patches
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=244040.1
    Collecting Statistics with Oracle Apps 11i
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=368252.1
    execute dbms_stats.unlock_schema_stats('SYS');
    execute dbms_stats.unlock_schema_stats('SYSTEM');
    exec dbms_stats.gather_schema_stats('SYSTEM',options=>'GATHER', estimate_percent => 100, method_opt => 'FOR ALL COLUMNS SIZE AUTO', cascade => TRUE);
    exec dbms_stats.gather_schema_stats('SYS',options=>'GATHER', estimate_percent => 100, method_opt => 'FOR ALL COLUMNS SIZE AUTO', cascade => TRUE);
    exec dbms_stats.gather_fixed_objects_stats();
    commit;
    exec dbms_stats.DELETE_TABLE_STATS('SYS','X$KCCRSR');
    exec dbms_stats.LOCK_TABLE_STATS('SYS','X$KCCRSR');
    commit;
    The last 3 commands resolve problems with RMAN, in case you are using it.
    Rman Backup is Very Slow selecting from V$RMAN_STATUS
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=375386.1
    Poor performance when accessing V$RMAN_BACKUP_JOB_DETAILS
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=420200.1
    Troubleshooting Oracle Applications Performance Issues
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=169935.1
    Debugging General Performance Issues with Oracle Apps
    http://blogs.oracle.com/schan/newsItems/departments/optimizingPerformance/2007/05/18#a1548
    Performance Tuning the Apps Database Layer
    http://blogs.oracle.com/schan/newsItems/departments/optimizingPerformance/2007/05/17#a1562
    Preventing Apps 11i Performance Issues in Four Steps
    http://blogs.oracle.com/schan/newsItems/departments/optimizingPerformance/2007/05/21#a1566

  • Performance issue after 10G upgrade.

    All,
    We recently upgraded to 10G (Version:10.2.0.3.0) after which the below query causing the problem. This query is written in a pl/sql package called by a Perl program. The Perl program is running forever without completion during some attempts and sometimes it is completing very fast. We did some kind of debugging and found that everytime the program is getting stucked up at this below given query and not at all proceeding from here even if we leave it for 2 - 3 days. During a successful attempt it completes in 3 - 4 hrs. This query is taking 2 explain plan as given below and it seems one of them is best and the other one is worst. Plan 2 is best and plan 1 is worst.
    Is there any suggestion in fixing this and the reason why two explain plans are picking up?....Num of records on the tables is as given below...
    Can you please provide me some detailed information as i'm a beginner in these performance tuning concepts?
    Your help will be much appreciated..
    Tables     No. of records
    ult_cust_master     551925
    us_state_county     3223
    customer     1559
    turfbuilder_group2_empcnt_tmp     44K
    ult_cust_sale     2430143
    ucsi_item     9714371
    SELECT cust.cust_num, cust.cust_name, cust.emp_count, cust.sic1,
           cust.s1_description, NVL (cust_sale.qty, 0) qty,
           NVL (cust_sale.mot_amt, 0) mot_amt,
           NVL (cust_sale.cust_amt, 0) cust_amt, cust.min_sale_dt,
           cust.max_sale_dt, cust.cust_status
      FROM (SELECT DISTINCT ucm.cust_num, f.cust_name cust_name,
                            NVL (te.tet_emp_count, 0) emp_count, b.min_sale_dt,
                            b.max_sale_dt, f.cust_status, sc1.sic1,
                            sc1.s1_description
                       FROM ult_cust_master ucm,
                            us_state_county u,
                            customer f,
                            (SELECT   div_cd, ctry_cd, cust_num,
                                      MIN (ucs_dt) min_sale_dt,
                                      MAX (ucs_dt) max_sale_dt
                                 FROM ult_cust_sale
                                WHERE div_cd = :b4
                                  AND ctry_cd = :b3
                                  AND rec_status = 'A'
                             GROUP BY div_cd, ctry_cd, cust_num) b,
                            sic1 sc1,
                            (SELECT tet_code, tet_vm_code, tet_type,
                                    tet_emp_count
                               FROM turfbuilder_group2_empcnt_tmp
                              WHERE tet_type = 'D') te
                      WHERE f.div_cd = ucm.div_cd
                        AND f.ctry_cd = ucm.ctry_cd
                        AND f.cust_num = ucm.cust_num
                        AND b.div_cd = ucm.div_cd
                        AND b.ctry_cd = ucm.ctry_cd
                        AND b.cust_num = ucm.cust_num
                        AND te.tet_code(+) = ucm.cust_num
                        AND te.tet_vm_code = sc1.sic1
                        AND f.div_cd = :b4
                        AND f.ctry_cd = :b3
                        AND ucm.ucm_stcnty_fips_cd = u.usc_st_cnty_cd
                        AND UPPER (u.usc_state_abbrev) NOT IN ('PR', 'VI')
                        AND ucm.rec_status = 'A'
                        AND u.rec_status = 'A'
                        AND sc1.rec_status = 'A'
                        AND f.cust_imp21_dealer_fg = 'Y'
                        AND NVL (f.cust_test_dealer_fg, 'N') <> 'Y') cust,
           (SELECT   c.cust_num cust_num, sc2.sic1,
                     SUM (DECODE (a.ucsii_unit_fg,
                                  'Y', a.ucsii_qty * 1,
                                  a.ucsii_qty * 0
                         ) qty,
                     SUM (a.ucsii_qty * a.ucsii_mot_unit_pr) mot_amt,
                     SUM (a.ucsii_qty * a.ucsii_ult_unit_pr) cust_amt
                FROM ucsi_item a,
                     ult_cust_sale b,
                     ult_cust_master c,
                     sic2 sc2,
                     us_state_county u
               WHERE a.div_cd = b.div_cd
                 AND a.ctry_cd = b.ctry_cd
                 AND a.cust_num = b.cust_num
                 AND a.ucm_mailbox_num = b.ucm_mailbox_num
                 AND a.ucm_seq = b.ucm_seq
                 AND a.ucs_seq = b.ucs_seq
                 AND c.div_cd = b.div_cd
                 AND c.ctry_cd = b.ctry_cd
                 AND c.cust_num = b.cust_num
                 AND c.ucm_mailbox_num = b.ucm_mailbox_num
                 AND c.ucm_seq = b.ucm_seq
                 AND SUBSTR (c.ucm_sic_cd, 1, 2) = sc2.sic2
                 AND c.ucm_stcnty_fips_cd = u.usc_st_cnty_cd
                 AND a.ucsii_in_apmr_fg = 'Y'
                 AND a.ucsii_audit_data_cd = 'G'
                 AND a.ucsii_contract_id IN
                        ('BRANDED',
                         'CTR',
                         'WARIS',
                         'RADIUS',
                         'BRNDCONV',
                         'BRNDTRNK'
                 AND (   (a.ucsii_unit_fg = 'Y')
                      OR (a.ucsii_unit_fg = 'N' AND a.ucsii_item_num LIKE '%.%')
                 AND c.div_cd = :b4
                 AND c.ctry_cd = :b3
                 AND UPPER (u.usc_state_abbrev) NOT IN ('PR', 'VI')
                 AND u.rec_status = 'A'
                 AND c.rec_status = 'A'
                 AND a.rec_status = 'A'
                 AND sc2.rec_status = 'A'
                 AND b.ua_cd = 'ENDCUST'
                 AND b.rec_status = 'A'
                 AND b.ucs_dt BETWEEN TO_DATE (:b2, 'dd mon yyyy')
                                  AND TO_DATE (:b1, 'dd mon yyyy')
            GROUP BY c.cust_num, sc2.sic1) cust_sale
    WHERE cust.cust_num = cust_sale.cust_num(+) AND cust.sic1 = cust_sale.sic1(+)------------------------------------------------------------------------------------------------------------------------
    {color:blue}
    Execution Plan – 1:
    Plan hash value: 2237978112
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | | | 643 (100)| |
    |* 1 | HASH JOIN OUTER | | 1 | 175 | 643 (2)| 00:00:08 |
    | 2 | VIEW | | 1 | 118 | 74 (5)| 00:00:01 |
    | 3 | HASH UNIQUE | | 1 | 310 | 74 (5)| 00:00:01 |
    | 4 | HASH GROUP BY | | 1 | 310 | 74 (5)| 00:00:01 |
    |* 5 | FILTER | | | | | |
    | 6 | NESTED LOOPS | | 1 | 310 | 73 (3)| 00:00:01 |
    | 7 | NESTED LOOPS | | 1 | 278 | 70 (2)| 00:00:01 |
    | 8 | NESTED LOOPS | | 1 | 187 | 69 (2)| 00:00:01 |
    | 9 | NESTED LOOPS | | 1 | 148 | 68 (2)| 00:00:01 |
    | 10 | NESTED LOOPS | | 1 | 100 | 52 (2)| 00:00:01 |
    |* 11 | TABLE ACCESS FULL | TURFBUILDER_GROUP2_EMPCNT_TMP | 1 | 52 | 51 (2)| 00:00:01 |
    |* 12 | TABLE ACCESS BY INDEX ROWID| SIC1 | 1 | 48 | 1 (0)| 00:00:01 |
    |* 13 | INDEX UNIQUE SCAN | SYS_C001278 | 1 | | 1 (0)| 00:00:01 |
    |* 14 | TABLE ACCESS BY INDEX ROWID | ULT_CUST_MASTER | 517 | 24816 | 16 (0)| 00:00:01 |
    |* 15 | INDEX RANGE SCAN | XIF9ULT_CUST_MASTER | 505 | | 1 (0)| 00:00:01 |
    |* 16 | TABLE ACCESS BY INDEX ROWID | US_STATE_COUNTY | 1 | 39 | 1 (0)| 00:00:01 |
    |* 17 | INDEX UNIQUE SCAN | XPKSTATE_COUNTY | 1 | | 1 (0)| 00:00:01 |
    |* 18 | TABLE ACCESS BY INDEX ROWID | CUSTOMER | 1 | 91 | 1 (0)| 00:00:01 |
    |* 19 | INDEX UNIQUE SCAN | XPKCUSTOMER | 1 | | 1 (0)| 00:00:01 |
    |* 20 | INDEX RANGE SCAN | XIE1ULT_CUST_SALE | 13514 | 422K| 2 (0)| 00:00:01 |
    | 21 | VIEW | | 1 | 57 | 569 (2)| 00:00:07 |
    | 22 | HASH GROUP BY | | 1 | 209 | 569 (2)| 00:00:07 |
    |* 23 | FILTER | | | | | |
    |* 24 | TABLE ACCESS BY INDEX ROWID | UCSI_ITEM | 1 | 74 | 1 (0)| 00:00:01 |
    | 25 | NESTED LOOPS | | 1 | 209 | 568 (1)| 00:00:07 |
    | 26 | NESTED LOOPS | | 1 | 135 | 567 (1)| 00:00:07 |
    |* 27 | HASH JOIN | | 1491 | 110K| 118 (3)| 00:00:02 |
    |* 28 | TABLE ACCESS FULL | SIC2 | 83 | 996 | 2 (0)| 00:00:01 |
    | 29 | TABLE ACCESS BY INDEX ROWID | ULT_CUST_MASTER | 186 | 9858 | 13 (0)| 00:00:01 |
    | 30 | NESTED LOOPS | | 1500 | 96000 | 115 (2)| 00:00:02 |
    |* 31 | TABLE ACCESS FULL | US_STATE_COUNTY | 8 | 88 | 9 (12)| 00:00:01 |
    |* 32 | INDEX RANGE SCAN | TEST | 186 | | 1 (0)| 00:00:01 |
    |* 33 | TABLE ACCESS BY INDEX ROWID | ULT_CUST_SALE | 1 | 59 | 1 (0)| 00:00:01 |
    |* 34 | INDEX RANGE SCAN | XIE1ULT_CUST_SALE | 1 | | 1 (0)| 00:00:01 |
    |* 35 | INDEX RANGE SCAN | XPKUCSI_ITEM | 1 | | 1 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - access("CUST"."CUST_NUM"="CUST_SALE"."CUST_NUM" AND "CUST"."SIC1"="CUST_SALE"."SIC1")
    5 - filter((:B3=:B3 AND :B4=:B4))
    11 - filter("TET_TYPE"='D')
    12 - filter("SC1"."REC_STATUS"='A')
    13 - access("TET_VM_CODE"="SC1"."SIC1")
    14 - filter("UCM"."REC_STATUS"='A')
    15 - access("UCM"."DIV_CD"=:B4 AND "UCM"."CTRY_CD"=:B3 AND "TET_CODE"="UCM"."CUST_NUM")
    filter(("UCM"."DIV_CD"=:B4 AND "UCM"."CTRY_CD"=:B3))
    16 - filter((UPPER("U"."USC_STATE_ABBREV")<>'PR' AND UPPER("U"."USC_STATE_ABBREV")<>'VI' AND
    "U"."REC_STATUS"='A'))
    17 - access("UCM"."UCM_STCNTY_FIPS_CD"="U"."USC_ST_CNTY_CD")
    18 - filter(("F"."CUST_IMP21_DEALER_FG"='Y' AND NVL("F"."CUST_TEST_DEALER_FG",'N')<>'Y'))
    19 - access("F"."DIV_CD"=:B4 AND "F"."CTRY_CD"=:B3 AND "F"."CUST_NUM"="UCM"."CUST_NUM")
    filter(("F"."DIV_CD"=:B4 AND "F"."CTRY_CD"=:B3))
    20 - access("DIV_CD"=:B4 AND "CTRY_CD"=:B3 AND "CUST_NUM"="UCM"."CUST_NUM" AND "REC_STATUS"='A')
    filter(("DIV_CD"=:B4 AND "CTRY_CD"=:B3 AND "REC_STATUS"='A'))
    23 - filter(TO_DATE(:B2,'dd mon yyyy')<=TO_DATE(:B1,'dd mon yyyy'))
    24 - filter((("A"."UCSII_UNIT_FG"='Y' OR ("A"."UCSII_ITEM_NUM" LIKE '%.%' AND "A"."UCSII_UNIT_FG"='N')) AND
    "A"."UCSII_IN_APMR_FG"='Y' AND INTERNAL_FUNCTION("A"."UCSII_CONTRACT_ID") AND "A"."UCSII_AUDIT_DATA_CD"='G'
    AND "A"."REC_STATUS"='A'))
    27 - access("SC2"."SIC2"=SUBSTR("C"."UCM_SIC_CD",1,2))
    28 - filter("SC2"."REC_STATUS"='A')
    31 - filter((UPPER("U"."USC_STATE_ABBREV")<>'PR' AND UPPER("U"."USC_STATE_ABBREV")<>'VI' AND
    "U"."REC_STATUS"='A'))
    32 - access("C"."UCM_STCNTY_FIPS_CD"="U"."USC_ST_CNTY_CD" AND "C"."DIV_CD"=:B4 AND "C"."CTRY_CD"=:B3 AND
    "C"."REC_STATUS"='A')
    33 - filter(("B"."UA_CD"='ENDCUST' AND "C"."UCM_MAILBOX_NUM"="B"."UCM_MAILBOX_NUM"))
    34 - access("B"."DIV_CD"=:B4 AND "B"."CTRY_CD"=:B3 AND "C"."CUST_NUM"="B"."CUST_NUM" AND
    "C"."UCM_SEQ"="B"."UCM_SEQ" AND "B"."UCS_DT">=TO_DATE(:B2,'dd mon yyyy') AND "B"."REC_STATUS"='A' AND
    "B"."UCS_DT"<=TO_DATE(:B1,'dd mon yyyy'))
    filter("B"."REC_STATUS"='A')
    35 - access("A"."DIV_CD"=:B4 AND "A"."CTRY_CD"=:B3 AND "A"."CUST_NUM"="B"."CUST_NUM" AND
    "A"."UCM_MAILBOX_NUM"="B"."UCM_MAILBOX_NUM" AND "A"."UCM_SEQ"="B"."UCM_SEQ" AND "A"."UCS_SEQ"="B"."UCS_SEQ")
    {color}
    {color:green}
    Execution Plan – 2:
    Plan hash value: 2023039777
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | | | | 3341 (100)| |
    |* 1 | HASH JOIN RIGHT OUTER | | 12967 | 2216K| | 3341 (5)| 00:00:41 |
    | 2 | VIEW | | 1 | 57 | | 607 (6)| 00:00:08 |
    | 3 | HASH GROUP BY | | 1 | 209 | | 607 (6)| 00:00:08 |
    |* 4 | FILTER | | | | | | |
    |* 5 | TABLE ACCESS BY INDEX ROWID | UCSI_ITEM | 1 | 74 | | 1 (0)| 00:00:01 |
    | 6 | NESTED LOOPS | | 1 | 209 | | 606 (6)| 00:00:08 |
    | 7 | NESTED LOOPS | | 1 | 135 | | 605 (6)| 00:00:08 |
    |* 8 | HASH JOIN | | 1 | 123 | | 604 (6)| 00:00:08 |
    |* 9 | TABLE ACCESS BY INDEX ROWID| ULT_CUST_SALE | 1214 | 71626 | | 455 (7)| 00:00:06 |
    |* 10 | INDEX SKIP SCAN | XIE1ULT_CUST_SALE | 1 | | | 455 (7)| 00:00:06 |
    | 11 | TABLE ACCESS BY INDEX ROWID| ULT_CUST_MASTER | 245 | 12985 | | 17 (0)| 00:00:01 |
    | 12 | NESTED LOOPS | | 1971 | 123K| | 148 (2)| 00:00:02 |
    |* 13 | TABLE ACCESS FULL | US_STATE_COUNTY | 8 | 88 | | 9 (12)| 00:00:01 |
    |* 14 | INDEX RANGE SCAN | TEST | 245 | | | 1 (0)| 00:00:01 |
    |* 15 | TABLE ACCESS BY INDEX ROWID | SIC2 | 1 | 12 | | 1 (0)| 00:00:01 |
    |* 16 | INDEX UNIQUE SCAN | XPKSIC2 | 1 | | | 1 (0)| 00:00:01 |
    |* 17 | INDEX RANGE SCAN | XPKUCSI_ITEM | 1 | | | 1 (0)| 00:00:01 |
    | 18 | VIEW | | 12967 | 1494K| | 2732 (5)| 00:00:33 |
    | 19 | HASH UNIQUE | | 12967 | 3254K| 6936K| 2732 (5)| 00:00:33 |
    |* 20 | HASH JOIN | | 12967 | 3254K| | 1998 (6)| 00:00:24 |
    | 21 | VIEW | | 410 | 16400 | | 1781 (5)| 00:00:22 |
    | 22 | HASH GROUP BY | | 410 | 13120 | | 1781 (5)| 00:00:22 |
    |* 23 | FILTER | | | | | | |
    |* 24 | INDEX RANGE SCAN | XIE1ULT_CUST_SALE | 1963K| 59M| | 1781 (5)| 00:00:22 |
    |* 25 | HASH JOIN | | 4792 | 1015K| | 215 (7)| 00:00:03 |
    |* 26 | TABLE ACCESS FULL | SIC1 | 11 | 528 | | 2 (0)| 00:00:01 |
    |* 27 | HASH JOIN | | 4792 | 790K| | 212 (6)| 00:00:03 |
    |* 28 | TABLE ACCESS BY INDEX ROWID | CUSTOMER | 1003 | 79237 | | 4 (0)| 00:00:01 |
    |* 29 | INDEX RANGE SCAN | XIF317CUSTOMER | 1371 | | | 1 (0)| 00:00:01 |
    |* 30 | HASH JOIN | | 4794 | 421K| | 207 (6)| 00:00:03 |
    | 31 | TABLE ACCESS BY INDEX ROWID | ULT_CUST_MASTER | 245 | 8820 | | 17 (0)| 00:00:01 |
    | 32 | NESTED LOOPS | | 1971 | 136K| | 148 (2)| 00:00:02 |
    |* 33 | TABLE ACCESS FULL | US_STATE_COUNTY | 8 | 280 | | 9 (12)| 00:00:01 |
    |* 34 | INDEX RANGE SCAN | TEST | 245 | | | 1 (0)| 00:00:01 |
    |* 35 | TABLE ACCESS FULL | TURFBUILDER_GROUP2_EMPCNT_TMP | 8914 | 165K| | 58 (14)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - access("CUST"."CUST_NUM"="CUST_SALE"."CUST_NUM" AND "CUST"."SIC1"="CUST_SALE"."SIC1")
    4 - filter(TO_DATE(:B2,'dd mon yyyy')<=TO_DATE(:B1,'dd mon yyyy'))
    5 - filter((("A"."UCSII_UNIT_FG"='Y' OR ("A"."UCSII_ITEM_NUM" LIKE '%.%' AND "A"."UCSII_UNIT_FG"='N')) AND
    "A"."UCSII_IN_APMR_FG"='Y' AND INTERNAL_FUNCTION("A"."UCSII_CONTRACT_ID") AND "A"."UCSII_AUDIT_DATA_CD"='G' AND
    "A"."REC_STATUS"='A'))
    8 - access("C"."DIV_CD"="B"."DIV_CD" AND "C"."CTRY_CD"="B"."CTRY_CD" AND "C"."CUST_NUM"="B"."CUST_NUM" AND
    "C"."UCM_MAILBOX_NUM"="B"."UCM_MAILBOX_NUM" AND "C"."UCM_SEQ"="B"."UCM_SEQ")
    9 - filter("B"."UA_CD"='ENDCUST')
    10 - access("B"."DIV_CD"=:B4 AND "B"."CTRY_CD"=:B3 AND "B"."UCS_DT">=TO_DATE(:B2,'dd mon yyyy') AND
    "B"."REC_STATUS"='A' AND "B"."UCS_DT"<=TO_DATE(:B1,'dd mon yyyy'))
    filter(("B"."UCS_DT">=TO_DATE(:B2,'dd mon yyyy') AND "B"."REC_STATUS"='A' AND "B"."UCS_DT"<=TO_DATE(:B1,'dd
    mon yyyy')))
    13 - filter((UPPER("U"."USC_STATE_ABBREV")<>'PR' AND UPPER("U"."USC_STATE_ABBREV")<>'VI' AND "U"."REC_STATUS"='A'))
    14 - access("C"."UCM_STCNTY_FIPS_CD"="U"."USC_ST_CNTY_CD" AND "C"."DIV_CD"=:B4 AND "C"."CTRY_CD"=:B3 AND
    "C"."REC_STATUS"='A')
    15 - filter("SC2"."REC_STATUS"='A')
    16 - access("SC2"."SIC2"=SUBSTR("C"."UCM_SIC_CD",1,2))
    17 - access("A"."DIV_CD"=:B4 AND "A"."CTRY_CD"=:B3 AND "A"."CUST_NUM"="B"."CUST_NUM" AND
    "A"."UCM_MAILBOX_NUM"="B"."UCM_MAILBOX_NUM" AND "A"."UCM_SEQ"="B"."UCM_SEQ" AND "A"."UCS_SEQ"="B"."UCS_SEQ")
    20 - access("B"."DIV_CD"="UCM"."DIV_CD" AND "B"."CTRY_CD"="UCM"."CTRY_CD" AND "B"."CUST_NUM"="UCM"."CUST_NUM")
    23 - filter((:B3=:B3 AND :B4=:B4))
    24 - access("DIV_CD"=:B4 AND "CTRY_CD"=:B3 AND "REC_STATUS"='A')
    filter(("DIV_CD"=:B4 AND "CTRY_CD"=:B3 AND "DIV_CD"=:B4 AND "CTRY_CD"=:B3 AND "REC_STATUS"='A'))
    25 - access("TET_VM_CODE"="SC1"."SIC1")
    26 - filter("SC1"."REC_STATUS"='A')
    27 - access("F"."DIV_CD"="UCM"."DIV_CD" AND "F"."CTRY_CD"="UCM"."CTRY_CD" AND "F"."CUST_NUM"="UCM"."CUST_NUM")
    28 - filter(("F"."DIV_CD"=:B4 AND "F"."CUST_IMP21_DEALER_FG"='Y' AND NVL("F"."CUST_TEST_DEALER_FG",'N')<>'Y'))
    29 - access("F"."CTRY_CD"=:B3)
    30 - access("TET_CODE"="UCM"."CUST_NUM")
    33 - filter((UPPER("U"."USC_STATE_ABBREV")<>'PR' AND UPPER("U"."USC_STATE_ABBREV")<>'VI' AND "U"."REC_STATUS"='A'))
    34 - access("UCM"."UCM_STCNTY_FIPS_CD"="U"."USC_ST_CNTY_CD" AND "UCM"."DIV_CD"=:B4 AND "UCM"."CTRY_CD"=:B3 AND
    "UCM"."REC_STATUS"='A')
    35 - filter("TET_TYPE"='D')
    {color}
    Edited by: user3030284 on Oct 28, 2008 9:42 PM

    <p>
    {size:12}
    All,
    </p>
    <p>
    We recently upgraded to 10G (Version:10.2.0.3.0) after which the below query causing the problem. This query is written in a pl/sql package called by a Perl program. The Perl program is running forever without completion during some attempts and sometimes it is completing very fast. We did some kind of debugging and found that everytime the program is getting stucked up at this below given query and not at all proceeding from here even if we leave it for 2 - 3 days. During a successful attempt it completes in 3 - 4 hrs. This query is taking 2 explain plan as given below and it seems one of them is best and the other one is worst. Plan 2 is best and plan 1 is worst.
    Is there any suggestion in fixing this and the reason why two explain plans are picking up?....Num of records on the tables is as given below...
    Can you please provide me some detailed information as i'm a beginner in these performance tuning concepts?
    Your help will be much appreciated..
    </p>
    <p>
    Tables No. of records
    ult_cust_master 551925
    us_state_county 3223
    customer 1559
    turfbuilder_group2_empcnt_tmp 44K
    ult_cust_sale 2430143
    ucsi_item 9714371
    {size}
    </p>
    <p>
    <br /></p><br /><p><br />/* Formatted on 2007/09/30 20:37 (Formatter Plus v4.8.5) */ <br /></p><br /><p><br />SELECT cust.cust_num, cust.cust_name, cust.emp_count, cust.sic1, <br /></p><br /><p><br />cust.s1_description, NVL (cust_sale.qty, 0) qty, <br /></p><br /><p><br />NVL (cust_sale.mot_amt, 0) mot_amt, <br /></p><br /><p><br />NVL (cust_sale.cust_amt, 0) cust_amt, cust.min_sale_dt, <br /></p><br /><p><br />cust.max_sale_dt, cust.cust_status <br /></p><br /><p><br />FROM (SELECT DISTINCT ucm.cust_num, f.cust_name cust_name, <br /></p><br /><p><br />NVL (te.tet_emp_count, 0) emp_count, b.min_sale_dt, <br /></p><br /><p><br />b.max_sale_dt, f.cust_status, sc1.sic1, <br /></p><br /><p><br />sc1.s1_description <br /></p><br /><p><br />FROM ult_cust_master ucm, <br /></p><br /><p><br />us_state_county u, <br /></p><br /><p><br />customer f, <br /></p><br /><p><br />(SELECT div_cd, ctry_cd, cust_num, <br /></p><br /><p><br />MIN (ucs_dt) min_sale_dt, <br /></p><br /><p><br />MAX (ucs_dt) max_sale_dt <br /></p><br /><p><br />FROM ult_cust_sale <br /></p><br /><p><br />WHERE div_cd = :b4 <br /></p><br /><p><br />AND ctry_cd = :b3 <br /></p><br /><p><br />AND rec_status = 'A' <br /></p><br /><p><br />GROUP BY div_cd, ctry_cd, cust_num) b, <br /></p><br /><p><br />sic1 sc1, <br /></p><br /><p><br />(SELECT tet_code, tet_vm_code, tet_type, <br /></p><br /><p><br />tet_emp_count <br /></p><br /><p><br />FROM turfbuilder_group2_empcnt_tmp <br /></p><br /><p><br />WHERE tet_type = 'D') te <br /></p><br /><p><br />WHERE f.div_cd = ucm.div_cd <br /></p><br /><p><br />AND f.ctry_cd = ucm.ctry_cd <br /></p><br /><p><br />AND f.cust_num = ucm.cust_num <br /></p><br /><p><br />AND b.div_cd = ucm.div_cd <br /></p><br /><p><br />AND b.ctry_cd = ucm.ctry_cd <br /></p><br /><p><br />AND b.cust_num = ucm.cust_num <br /></p><br /><p><br />AND te.tet_code(+) = ucm.cust_num <br /></p><br /><p><br />AND te.tet_vm_code = sc1.sic1 <br /></p><br /><p><br />AND f.div_cd = :b4 <br /></p><br /><p><br />AND f.ctry_cd = :b3 <br /></p><br /><p><br />AND ucm.ucm_stcnty_fips_cd = u.usc_st_cnty_cd <br /></p><br /><p><br />AND UPPER (u.usc_state_abbrev) NOT IN ('PR', 'VI') <br /></p><br /><p><br />AND ucm.rec_status = 'A' <br /></p><br /><p><br />AND u.rec_status = 'A' <br /></p><br /><p><br />AND sc1.rec_status = 'A' <br /></p><br /><p><br />AND f.cust_imp21_dealer_fg = 'Y' <br /></p><br /><p><br />AND NVL (f.cust_test_dealer_fg, 'N') &lt;&gt; 'Y') cust, <br /></p><br /><p><br />(SELECT c.cust_num cust_num, sc2.sic1, <br /></p><br /><p><br />SUM (DECODE (a.ucsii_unit_fg, <br /></p><br /><p><br />'Y', a.ucsii_qty * 1, <br /></p><br /><p><br />a.ucsii_qty * 0 <br /></p><br /><p><br />) <br /></p><br /><p><br />) qty, <br /></p><br /><p><br />SUM (a.ucsii_qty * a.ucsii_mot_unit_pr) mot_amt, <br /></p><br /><p><br />SUM (a.ucsii_qty * a.ucsii_ult_unit_pr) cust_amt <br /></p><br /><p><br />FROM ucsi_item a, <br /></p><br /><p><br />ult_cust_sale b, <br /></p><br /><p><br />ult_cust_master c, <br /></p><br /><p><br />sic2 sc2, <br /></p><br /><p><br />us_state_county u <br /></p><br /><p><br />WHERE a.div_cd = b.div_cd <br /></p><br /><p><br />AND a.ctry_cd = b.ctry_cd <br /></p><br /><p><br />AND a.cust_num = b.cust_num <br /></p><br /><p><br />AND a.ucm_mailbox_num = b.ucm_mailbox_num <br /></p><br /><p><br />AND a.ucm_seq = b.ucm_seq <br /></p><br /><p><br />AND a.ucs_seq = b.ucs_seq <br /></p><br /><p><br />AND c.div_cd = b.div_cd <br /></p><br /><p><br />AND c.ctry_cd = b.ctry_cd <br /></p><br /><p><br />AND c.cust_num = b.cust_num <br /></p><br /><p><br />AND c.ucm_mailbox_num = b.ucm_mailbox_num <br /></p><br /><p><br />AND c.ucm_seq = b.ucm_seq <br /></p><br /><p><br />AND SUBSTR (c.ucm_sic_cd, 1, 2) = sc2.sic2 <br /></p><br /><p><br />AND c.ucm_stcnty_fips_cd = u.usc_st_cnty_cd <br /></p><br /><p><br />AND a.ucsii_in_apmr_fg = 'Y' <br /></p><br /><p><br />AND a.ucsii_audit_data_cd = 'G' <br /></p><br /><p><br />AND a.ucsii_contract_id IN <br /></p><br /><p><br />('BRANDED', <br /></p><br /><p><br />'CTR', <br /></p><br /><p><br />'WARIS', <br /></p><br /><p><br />'RADIUS', <br /></p><br /><p><br />'BRNDCONV', <br /></p><br /><p><br />'BRNDTRNK' <br /></p><br /><p><br />) <br /></p><br /><p><br />AND ( (a.ucsii_unit_fg = 'Y') <br /></p><br /><p><br />OR (a.ucsii_unit_fg = 'N' AND a.ucsii_item_num LIKE '%.%') <br /></p><br /><p><br />) <br /></p><br /><p><br />AND c.div_cd = :b4 <br /></p><br /><p><br />AND c.ctry_cd = :b3 <br /></p><br /><p><br />AND UPPER (u.usc_state_abbrev) NOT IN ('PR', 'VI') <br /></p><br /><p><br />AND u.rec_status = 'A' <br /></p><br /><p><br />AND c.rec_status = 'A' <br /></p><br /><p><br />AND a.rec_status = 'A' <br /></p><br /><p><br />AND sc2.rec_status = 'A' <br /></p><br /><p><br />AND b.ua_cd = 'ENDCUST' <br /></p><br /><p><br />AND b.rec_status = 'A' <br /></p><br /><p><br />AND b.ucs_dt BETWEEN TO_DATE (:b2, 'dd mon yyyy') <br /></p><br /><p><br />AND TO_DATE (:b1, 'dd mon yyyy') <br /></p><br /><p><br />GROUP BY c.cust_num, sc2.sic1) cust_sale <br /></p><br /><p><br />WHERE cust.cust_num = cust_sale.cust_num(+) AND cust.sic1 = cust_sale.sic1(+) <br /></p><br /><p><br /><strong></strong>
    </p>
    <p>
    {color:green}
    </p>
    <p>
    Explain Plan -- 1:
    </p>
    <p>
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | | | 643 (100)| |
    |* 1 | HASH JOIN OUTER | | 1 | 175 | 643 (2)| 00:00:08 |
    | 2 | VIEW | | 1 | 118 | 74 (5)| 00:00:01 |
    | 3 | HASH UNIQUE | | 1 | 310 | 74 (5)| 00:00:01 |
    | 4 | HASH GROUP BY | | 1 | 310 | 74 (5)| 00:00:01 |
    |* 5 | FILTER | | | | | |
    | 6 | NESTED LOOPS | | 1 | 310 | 73 (3)| 00:00:01 |
    | 7 | NESTED LOOPS | | 1 | 278 | 70 (2)| 00:00:01 |
    | 8 | NESTED LOOPS | | 1 | 187 | 69 (2)| 00:00:01 |
    | 9 | NESTED LOOPS | | 1 | 148 | 68 (2)| 00:00:01 |
    | 10 | NESTED LOOPS | | 1 | 100 | 52 (2)| 00:00:01 |
    |* 11 | TABLE ACCESS FULL | TURFBUILDER_GROUP2_EMPCNT_TMP | 1 | 52 | 51 (2)| 00:00:01 |
    |* 12 | TABLE ACCESS BY INDEX ROWID| SIC1 | 1 | 48 | 1 (0)| 00:00:01 |
    |* 13 | INDEX UNIQUE SCAN | SYS_C001278 | 1 | | 1 (0)| 00:00:01 |
    |* 14 | TABLE ACCESS BY INDEX ROWID | ULT_CUST_MASTER | 517 | 24816 | 16 (0)| 00:00:01 |
    |* 15 | INDEX RANGE SCAN | XIF9ULT_CUST_MASTER | 505 | | 1 (0)| 00:00:01 |
    |* 16 | TABLE ACCESS BY INDEX ROWID | US_STATE_COUNTY | 1 | 39 | 1 (0)| 00:00:01 |
    |* 17 | INDEX UNIQUE SCAN | XPKSTATE_COUNTY | 1 | | 1 (0)| 00:00:01 |
    |* 18 | TABLE ACCESS BY INDEX ROWID | CUSTOMER | 1 | 91 | 1 (0)| 00:00:01 |
    |* 19 | INDEX UNIQUE SCAN | XPKCUSTOMER | 1 | | 1 (0)| 00:00:01 |
    |* 20 | INDEX RANGE SCAN | XIE1ULT_CUST_SALE | 13514 | 422K| 2 (0)| 00:00:01 |
    | 21 | VIEW | | 1 | 57 | 569 (2)| 00:00:07 |
    | 22 | HASH GROUP BY | | 1 | 209 | 569 (2)| 00:00:07 |
    |* 23 | FILTER | | | | | |
    |* 24 | TABLE ACCESS BY INDEX ROWID | UCSI_ITEM | 1 | 74 | 1 (0)| 00:00:01 |
    | 25 | NESTED LOOPS | | 1 | 209 | 568 (1)| 00:00:07 |
    | 26 | NESTED LOOPS | | 1 | 135 | 567 (1)| 00:00:07 |
    |* 27 | HASH JOIN | | 1491 | 110K| 118 (3)| 00:00:02 |
    |* 28 | TABLE ACCESS FULL | SIC2 | 83 | 996 | 2 (0)| 00:00:01 |
    | 29 | TABLE ACCESS BY INDEX ROWID | ULT_CUST_MASTER | 186 | 9858 | 13 (0)| 00:00:01 |
    | 30 | NESTED LOOPS | | 1500 | 96000 | 115 (2)| 00:00:02 |
    |* 31 | TABLE ACCESS FULL | US_STATE_COUNTY | 8 | 88 | 9 (12)| 00:00:01 |
    |* 32 | INDEX RANGE SCAN | TEST | 186 | | 1 (0)| 00:00:01 |
    |* 33 | TABLE ACCESS BY INDEX ROWID | ULT_CUST_SALE | 1 | 59 | 1 (0)| 00:00:01 |
    |* 34 | INDEX RANGE SCAN | XIE1ULT_CUST_SALE | 1 | | 1 (0)| 00:00:01 |
    |* 35 | INDEX RANGE SCAN | XPKUCSI_ITEM | 1 | | 1 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - access("CUST"."CUST_NUM"="CUST_SALE"."CUST_NUM" AND "CUST"."SIC1"="CUST_SALE"."SIC1")
    5 - filter((:B3=:B3 AND :B4=:B4))
    11 - filter("TET_TYPE"='D')
    12 - filter("SC1"."REC_STATUS"='A')
    13 - access("TET_VM_CODE"="SC1"."SIC1")
    14 - filter("UCM"."REC_STATUS"='A')
    15 - access("UCM"."DIV_CD"=:B4 AND "UCM"."CTRY_CD"=:B3 AND "TET_CODE"="UCM"."CUST_NUM")
    filter(("UCM"."DIV_CD"=:B4 AND "UCM"."CTRY_CD"=:B3))
    16 - filter((UPPER("U"."USC_STATE_ABBREV")&lt;&gt;'PR' AND UPPER("U"."USC_STATE_ABBREV")&lt;&gt;'VI' AND
    "U"."REC_STATUS"='A'))
    17 - access("UCM"."UCM_STCNTY_FIPS_CD"="U"."USC_ST_CNTY_CD")
    18 - filter(("F"."CUST_IMP21_DEALER_FG"='Y' AND NVL("F"."CUST_TEST_DEALER_FG",'N')&lt;&gt;'Y'))
    19 - access("F"."DIV_CD"=:B4 AND "F"."CTRY_CD"=:B3 AND "F"."CUST_NUM"="UCM"."CUST_NUM")
    filter(("F"."DIV_CD"=:B4 AND "F"."CTRY_CD"=:B3))
    20 - access("DIV_CD"=:B4 AND "CTRY_CD"=:B3 AND "CUST_NUM"="UCM"."CUST_NUM" AND "REC_STATUS"='A')
    filter(("DIV_CD"=:B4 AND "CTRY_CD"=:B3 AND "REC_STATUS"='A'))
    23 - filter(TO_DATE(:B2,'dd mon yyyy')&lt;=TO_DATE(:B1,'dd mon yyyy'))
    24 - filter((("A"."UCSII_UNIT_FG"='Y' OR ("A"."UCSII_ITEM_NUM" LIKE '%.%' AND "A"."UCSII_UNIT_FG"='N')) AND
    "A"."UCSII_IN_APMR_FG"='Y' AND INTERNAL_FUNCTION("A"."UCSII_CONTRACT_ID") AND "A"."UCSII_AUDIT_DATA_CD"='G'
    AND "A"."REC_STATUS"='A'))
    27 - access("SC2"."SIC2"=SUBSTR("C"."UCM_SIC_CD",1,2))
    28 - filter("SC2"."REC_STATUS"='A')
    31 - filter((UPPER("U"."USC_STATE_ABBREV")&lt;&gt;'PR' AND UPPER("U"."USC_STATE_ABBREV")&lt;&gt;'VI' AND
    "U"."REC_STATUS"='A'))
    32 - access("C"."UCM_STCNTY_FIPS_CD"="U"."USC_ST_CNTY_CD" AND "C"."DIV_CD"=:B4 AND "C"."CTRY_CD"=:B3 AND
    "C"."REC_STATUS"='A')
    33 - filter(("B"."UA_CD"='ENDCUST' AND "C"."UCM_MAILBOX_NUM"="B"."UCM_MAILBOX_NUM"))
    34 - access("B"."DIV_CD"=:B4 AND "B"."CTRY_CD"=:B3 AND "C"."CUST_NUM"="B"."CUST_NUM" AND
    "C"."UCM_SEQ"="B"."UCM_SEQ" AND "B"."UCS_DT"&gt;=TO_DATE(:B2,'dd mon yyyy') AND "B"."REC_STATUS"='A' AND
    "B"."UCS_DT"&lt;=TO_DATE(:B1,'dd mon yyyy'))
    filter("B"."REC_STATUS"='A')
    35 - access("A"."DIV_CD"=:B4 AND "A"."CTRY_CD"=:B3 AND "A"."CUST_NUM"="B"."CUST_NUM" AND
    "A"."UCM_MAILBOX_NUM"="B"."UCM_MAILBOX_NUM" AND "A"."UCM_SEQ"="B"."UCM_SEQ" AND "A"."UCS_SEQ"="B"."UCS_SEQ")
    </p>
    <p>
    {color}
    </p>
    <p>
    {color:blue}
    </p>
    <p>
    Explain Plan -- 2:
    </p>
    <p>
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | | | | 3341 (100)| |
    |* 1 | HASH JOIN RIGHT OUTER | | 12967 | 2216K| | 3341 (5)| 00:00:41 |
    | 2 | VIEW | | 1 | 57 | | 607 (6)| 00:00:08 |
    | 3 | HASH GROUP BY | | 1 | 209 | | 607 (6)| 00:00:08 |
    |* 4 | FILTER | | | | | | |
    |* 5 | TABLE ACCESS BY INDEX ROWID | UCSI_ITEM | 1 | 74 | | 1 (0)| 00:00:01 |
    | 6 | NESTED LOOPS | | 1 | 209 | | 606 (6)| 00:00:08 |
    | 7 | NESTED LOOPS | | 1 | 135 | | 605 (6)| 00:00:08 |
    |* 8 | HASH JOIN | | 1 | 123 | | 604 (6)| 00:00:08 |
    |* 9 | TABLE ACCESS BY INDEX ROWID| ULT_CUST_SALE | 1214 | 71626 | | 455 (7)| 00:00:06 |
    |* 10 | INDEX SKIP SCAN | XIE1ULT_CUST_SALE | 1 | | | 455 (7)| 00:00:06 |
    | 11 | TABLE ACCESS BY INDEX ROWID| ULT_CUST_MASTER | 245 | 12985 | | 17 (0)| 00:00:01 |
    | 12 | NESTED LOOPS | | 1971 | 123K| | 148 (2)| 00:00:02 |
    |* 13 | TABLE ACCESS FULL | US_STATE_COUNTY | 8 | 88 | | 9 (12)| 00:00:01 |
    |* 14 | INDEX RANGE SCAN | TEST | 245 | | | 1 (0)| 00:00:01 |
    |* 15 | TABLE ACCESS BY INDEX ROWID | SIC2 | 1 | 12 | | 1 (0)| 00:00:01 |
    |* 16 | INDEX UNIQUE SCAN | XPKSIC2 | 1 | | | 1 (0)| 00:00:01 |
    |* 17 | INDEX RANGE SCAN | XPKUCSI_ITEM | 1 | | | 1 (0)| 00:00:01 |
    | 18 | VIEW | | 12967 | 1494K| | 2732 (5)| 00:00:33 |
    | 19 | HASH UNIQUE | | 12967 | 3254K| 6936K| 2732 (5)| 00:00:33 |
    |* 20 | HASH JOIN | | 12967 | 3254K| | 1998 (6)| 00:00:24 |
    | 21 | VIEW | | 410 | 16400 | | 1781 (5)| 00:00:22 |
    | 22 | HASH GROUP BY | | 410 | 13120 | | 1781 (5)| 00:00:22 |
    |* 23 | FILTER | | | | | | |
    |* 24 | INDEX RANGE SCAN | XIE1ULT_CUST_SALE | 1963K| 59M| | 1781 (5)| 00:00:22 |
    |* 25 | HASH JOIN | | 4792 | 1015K| | 215 (7)| 00:00:03 |
    |* 26 | TABLE ACCESS FULL | SIC1 | 11 | 528 | | 2 (0)| 00:00:01 |
    |* 27 | HASH JOIN | | 4792 | 790K| | 212 (6)| 00:00:03 |
    |* 28 | TABLE ACCESS BY INDEX ROWID | CUSTOMER | 1003 | 79237 | | 4 (0)| 00:00:01 |
    |* 29 | INDEX RANGE SCAN | XIF317CUSTOMER | 1371 | | | 1 (0)| 00:00:01 |
    |* 30 | HASH JOIN | | 4794 | 421K| | 207 (6)| 00:00:03 |
    | 31 | TABLE ACCESS BY INDEX ROWID | ULT_CUST_MASTER | 245 | 8820 | | 17 (0)| 00:00:01 |
    | 32 | NESTED LOOPS | | 1971 | 136K| | 148 (2)| 00:00:02 |
    |* 33 | TABLE ACCESS FULL | US_STATE_COUNTY | 8 | 280 | | 9 (12)| 00:00:01 |
    |* 34 | INDEX RANGE SCAN | TEST | 245 | | | 1 (0)| 00:00:01 |
    |* 35 | TABLE ACCESS FULL | TURFBUILDER_GROUP2_EMPCNT_TMP | 8914 | 165K| | 58 (14)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - access("CUST"."CUST_NUM"="CUST_SALE"."CUST_NUM" AND "CUST"."SIC1"="CUST_SALE"."SIC1")
    4 - filter(TO_DATE(:B2,'dd mon yyyy')&lt;=TO_DATE(:B1,'dd mon yyyy'))
    5 - filter((("A"."UCSII_UNIT_FG"='Y' OR ("A"."UCSII_ITEM_NUM" LIKE '%.%' AND "A"."UCSII_UNIT_FG"='N')) AND
    "A"."UCSII_IN_APMR_FG"='Y' AND INTERNAL_FUNCTION("A"."UCSII_CONTRACT_ID") AND "A"."UCSII_AUDIT_DATA_CD"='G' AND
    "A"."REC_STATUS"='A'))
    8 - access("C"."DIV_CD"="B"."DIV_CD" AND "C"."CTRY_CD"="B"."CTRY_CD" AND "C"."CUST_NUM"="B"."CUST_NUM" AND
    "C"."UCM_MAILBOX_NUM"="B"."UCM_MAILBOX_NUM" AND "C"."UCM_SEQ"="B"."UCM_SEQ")
    9 - filter("B"."UA_CD"='ENDCUST')
    10 - access("B"."DIV_CD"=:B4 AND "B"."CTRY_CD"=:B3 AND "B"."UCS_DT"&gt;=TO_DATE(:B2,'dd mon yyyy') AND
    "B"."REC_STATUS"='A' AND "B"."UCS_DT"&lt;=TO_DATE(:B1,'dd mon yyyy'))
    filter(("B"."UCS_DT"&gt;=TO_DATE(:B2,'dd mon yyyy') AND "B"."REC_STATUS"='A' AND "B"."UCS_DT"&lt;=TO_DATE(:B1,'dd
    mon yyyy')))
    13 - filter((UPPER("U"."USC_STATE_ABBREV")&lt;&gt;'PR' AND UPPER("U"."USC_STATE_ABBREV")&lt;&gt;'VI' AND "U"."REC_STATUS"='A'))
    14 - access("C"."UCM_STCNTY_FIPS_CD"="U"."USC_ST_CNTY_CD" AND "C"."DIV_CD"=:B4 AND "C"."CTRY_CD"=:B3 AND
    "C"."REC_STATUS"='A')
    15 - filter("SC2"."REC_STATUS"='A')
    16 - access("SC2"."SIC2"=SUBSTR("C"."UCM_SIC_CD",1,2))
    17 - access("A"."DIV_CD"=:B4 AND "A"."CTRY_CD"=:B3 AND "A"."CUST_NUM"="B"."CUST_NUM" AND
    "A"."UCM_MAILBOX_NUM"="B"."UCM_MAILBOX_NUM" AND "A"."UCM_SEQ"="B"."UCM_SEQ" AND "A"."UCS_SEQ"="B"."UCS_SEQ")
    20 - access("B"."DIV_CD"="UCM"."DIV_CD" AND "B"."CTRY_CD"="UCM"."CTRY_CD" AND "B"."CUST_NUM"="UCM"."CUST_NUM")
    23 - filter((:B3=:B3 AND :B4=:B4))
    24 - access("DIV_CD"=:B4 AND "CTRY_CD"=:B3 AND "REC_STATUS"='A')
    filter(("DIV_CD"=:B4 AND "CTRY_CD"=:B3 AND "DIV_CD"=:B4 AND "CTRY_CD"=:B3 AND "REC_STATUS"='A'))
    25 - access("TET_VM_CODE"="SC1"."SIC1")
    26 - filter("SC1"."REC_STATUS"='A')
    27 - access("F"."DIV_CD"="UCM"."DIV_CD" AND "F"."CTRY_CD"="UCM"."CTRY_CD" AND "F"."CUST_NUM"="UCM"."CUST_NUM")
    28 - filter(("F"."DIV_CD"=:B4 AND "F"."CUST_IMP21_DEALER_FG"='Y' AND NVL("F"."CUST_TEST_DEALER_FG",'N')&lt;&gt;'Y'))
    29 - access("F"."CTRY_CD"=:B3)
    30 - access("TET_CODE"="UCM"."CUST_NUM")
    33 - filter((UPPER("U"."USC_STATE_ABBREV")&lt;&gt;'PR' AND UPPER("U"."USC_STATE_ABBREV")&lt;&gt;'VI' AND "U"."REC_STATUS"='A'))
    34 - access("UCM"."UCM_STCNTY_FIPS_CD"="U"."USC_ST_CNTY_CD" AND "UCM"."DIV_CD"=:B4 AND "UCM"."CTRY_CD"=:B3 AND
    "UCM"."REC_STATUS"='A')
    35 - filter("TET_TYPE"='D')
    </p>
    <p>
    {color}
    </p>

  • Database migrated from Oracle 10g to 11g Discoverer report performance issu

    Hi All,
    We are now getting issue in Discoverer Report performance as the report is keep on running when database got upgrade from 10g to 11g.
    In database 10g the report is working fine but the same report is not working fine in 11g.
    The query i have changed as I have passed the date format TO_CHAR("DD-MON-YYYY" and removed the NVL & TRUNC function from the existing query.
    The report is now working fine in Database 11g backhand but when I am using the same query in Discoverer it is not working and report is keep on running.
    Please advise.
    Regards,

    Pl post exact OS, database and Discoverer versions. After the upgrade, have statistics been updated ? Have you traced the Discoverer query to determine where the performance issue is ?
    How To Find Oracle Discoverer Diagnostic and Tracing Guides [ID 290658.1]
    How To Enable SQL Tracing For Discoverer Sessions [ID 133055.1]
    Discoverer 11g: Performance degradation after Upgrade to Database 11g [ID 1514929.1]
    HTH
    Srini

  • 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 issues executing process flows after upgrading db to 10G

    We have installed OWF 2.6.2, and initially our database was at 9.2. Last week we updated our database to 10g, and process flow executions are taking a lot longer, from 1 minute to 15 minutes.
    Any ideas anyone what could be the cause of this performance issue?
    Thanks,
    Yanet

    Hi,
    Oracle10g database behaves differently on the statistics of tables and indexes. So check these and check wether the mappings are updating these statistics at the right moments with respect to the ETL-proces and with the right interval.
    Also, check your generated sources on how statistics are gathered (dmbs_stats.gather....). Does the index that might play a vital role in Oracle9i get new statistics, or only the table? Or only the table where doubled in amount of rows by this mapping?
    You can always take matter into your own hands, by letting OWB NOT generate the source for gathering statistics, and call your own procedure in a post-mapping.
    Regards,
    André

  • Performance issue with form after 10g upgrade

    Hi Team,
    Last week we have upgraded our systems to 10g database.
    Ever since we did an upgrade there is a huge performance issues with the custom forms and this is causing a major setback to our business. Before the upgrade the forms were running with our any performance issues.
    Can anyone please help me in finding out the reason behind the performance issue(May be a tar or performance tuning).
    Many Thanks in Advance.
    Regards
    Kumar

    Like Jan said,
    You must supply more information so we can help you, like where the degradation happens?, in processing? in navigation? in forms loading?? where?
    You may also do a little test. Create a one button form, just a canvas and a button, you can include a message in when-button-pressed trigger.
    run it and see what happens.
    Tony

  • Performance issues with LOV bindings in 3-tier BC4J architecture

    We are running BC4J and JClient (Jdeveloper 9.0.3.4/9iAS 9.0.2) in a 3-tier architecture, and have problems with the performance.
    One of our problems are comboboxes with LOV bindings. The view objects that provides data for the LOV bindings contains simple queries from tables with only 4-10 rows, and there are no view links or entity objects to these views.
    To create the LOV binding and to set the model for the combobox takes about 1 second for each combobox.
    We have tried most of tips in http://otn.oracle.com/products/jdev/tips/muench/jclientperf/index.html, but they do not seem to help on our problem.
    The performance is OK (if not great) when the same code is running as 2-tier.
    Does anyone have any good suggestions?

    I can recommend that you look at the following two bugs in Metalink: Bug 2640945 and Bug 3621502
    They are related to the disabling of the TCP socket-level acknowledgement which slows down remote communications for EJB components using ORMI (the protocol used by Oracle OC4J) to communicate between remote EJB client and server.
    A BC4J Application Module deployed as an EJB suffers this same network latency penalty due to the TCP acknowledgement.
    A customer sent me information (that you'll see there as a part of Bug# 3621502) like this on a related issue:
    We found our application runs very slow in 3-Tier mode (JClient, BC4J deployed
    as EJB Session Bean on 9iAS server 9.0.2 enterprise edition). We spent a lot
    of time to tune up our codes but that helped very little. Eventually, we found
    the problem seemed to happen on TCP level. There is a 200ms delay in TCP
    level. After we read some documents about Nagle Algorithm,  we disabled a
    registry key (TcpDelAckTicks) in windows2000  on both client and server. This
    makes our program a lot faster.
    Anyway, we think we should provide our clients a better solution other than
    changing windows registry for them, for example, there may be a way to disable
    that Nagle's algorithm through java.net.Socket.setTcpNoDelay(true), in BC4J,
    or anywhere in our codes. We have not figured out yet.
    Bug 2640945 was fixed in Oracle Application Server 10g (v9.0.4) and it now disables this TCP Acknowledgement on the server side in that release. In the BugDB, I see backport patches available for earlier 9.0.3 and 9.0.2 releases of IAS as well.
    Bug 3621502 is requesting that that same disabling also be performed on the client side by the ORMI code. I have received a test patch from development to try out, but haven't had the chance yet.
    The customer's workaround in the interim was to disable this TCP Acknowledgement at the OS level by modifying a Windows registry setting as noted above.
    See Also http://support.microsoft.com/default.aspx?kbid=328890
    "New registry entry for controlling the TCP Acknowledgment (ACK) behavior in Windows XP and in Windows Server 2003" which documents that the registry entry to change disable this acknowledgement has a different name in Windows XP and Windows 2003.
    Hope this info helps. It would be useful to hear back from you on whether this helps your performance issue.

  • Performance issues ..with apex in reports version 3.1

    Hello All,
    I am using apex 3.1 oracle 10g.
    I am facing with performance issues with apex . I am generating iteractive reports with apex and the number of records are huge - running in 30 to 40 thousands of records and the reports is taking almost 30 minutes.
    How I can improve the performance of this kind of report. I am using apex collections.
    How apex works in terms of retrieving the records -?
    Please let me know .
    Thanks/kumar
    Edited by: kumar73 on Jun 18, 2010 10:21 AM

    Hello Tony ,
    The following are the sequence of steps to run the test case.
    Note:- All the schemas , tables and variables are populated from database.
    From Schema and Relations tab choose the following:
    1)     Select P3I2008Q4 as schema.
    2)     Choose Relation as query path.
    3)     Select ECLA, ECLB, MTAB as relations.
    From Variables choose the following:
    4)     Choose the variables AGE_SEXA,CLODESCA,ALCNO from ECLA relation.
    5)     Choose the variables AGE_SEXB, ALCNO, CLODESCB from ECLB relation.
    6)     Choose the variables EXPNAME, ALCNO, COST_, COST from MTAB relation.
    From Conditions: Click the Run Report button this generated standard report ( Total no of records in report – 30150 )
    Click on Interactive report button –to generate an interactive report. ( Error occurred )
    We are using return sql statement in generationg the standard report and collections for interactive report.
    thanks/kumar

  • Using Reference Cursor Performance Issue in Report

    Hi,
    Are reference cursor supposed to be faster than a normal query? The reason why I am asking is because I am using a reference cusor query in the data model and it has a performance issue on the report, it's taking quite a while to run than If I just run the same reference cursor query in sql*plus. The difference is significantly big. Any input is very much appreciated!
    Thanks,
    Marilyn

    From the metalink bug 4372868 on 9.0.4.x. It was fixed on 10.1.2.0.2 and does not have a backport for any 9.0.4 version.
    Also the 9.0.4 version is already desupported. Please see the note:
    Note 307042.1
    Topic: Desupport Notices - Oracle Products
    Title: Oracle Reports 10g 9.0.4 & 9.0.4.x
    Action plan:
    If you are still on 9.0.4 and later version of oracle reports and have no plan yet to migrate to 10.1.2.0.2 version use the same query you are using in your reference cursor and use it as a plain SQL query in your reports data model.

  • Performance issue in oracle 11.1.0.7 version

    Hi ,
    In production environment we have some cronjobs are scheduled, they will run every Saturday. One of the cronjob is taking more time to finish the job.
    Previous oracle version is 10.2.0.4, that time it was taking 36hrs to complete it. After upgrading to 11gr1, now it's taking 47hrs some time 50hrs to finish.
    I have asked my production DBA take AWR report after finish the cronjob.
    Now he sent the AWR report, but i don't know how to read it. Can you please help me to read the AWR reports, and i need to give some recommendations to reduce the overall running time.
    I don't know how to attach the AWR report here.
    Please help me on this.
    Thanks
    Shravan Kumar

    Hi,
    Now he sent the AWR report, but i don't know how to read it. Can you please help me to read the AWR reports, and i need to give some recommendations to reduce the overall running time.An't you a DBA? Probably you should seek help of you DBA to read the AWR and mean while you should also have AWR of 10g where this job was running previously so that you can compare the things.
    Did you do a testing before upgrade? you SHOULD have done a thorough testing of your applications/reports before the upgrade and resolve the performance issues before the production upgrade.
    Mean while you do investigation, you can set optimizer_features_enable=10.2.0.4 for only cron job session to check whether you job returns to same 26 hours time
    alter session set optimizer_features_enable='10.2.0.4';Salman

  • Sale Order Performance Issue.

    Hi,
    We are using EBS 12.0.6 and Database is 10g (10.2.3).
    We are facing performance issue with "Order management Sale Order Form",
    When user click on "Line Items" Tab of "Sale Order Form" and
    In "Main" Tab entring the "Ordered Item" then press tab and entring the "Qty" of item, its takes time 20 to 30 Second for one item if its related Items exists.
    We have 150 entiries against one sale order. Users are facing 20-30 second delay on each entry.
    Please advise how to improve the performance when related Itms exists?
    Thanks,
    Edited by: user12007410 on Feb 4, 2010 12:00 AM

    Pl create a trace file as outlined in MOS Doc 564817.1 (How To Create Forms And Database Level Trace For Receiving Transactions) to help pinpoint what SQL is causing the issue. Then open an SR as this may be a known issue for which a patch exists.
    Pl also verify that database statistics are current - see MOS Doc 169935.1 (Troubleshooting Oracle Applications Performance Issues) - section on "Statistics Gathering"
    HTH
    Srini

  • 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

  • DB Performance issue

    Hi DB Gurus,
    Our application is inserting 60-70K records in a table in each transaction. When multiple sessions are open on this table user face performance issues like application response is too slow.
    Regarding this table:
    1.Size = 56424 Mbytes!
    2.Count = 188,858,094 rows!
    3.Years of data stored = 4 years
    4.Average growth = 10 million records per month, 120 million each year! (has grown 60 million since end of June 2007)
    5.Storage params = 110 extents, Initial=40960, Next=524288000, Min Extents=1, Max Extents=505
    6.There are 14 indexes on this table all of which are in use.
    7. Data is inserted through bulk insert
    8. DB: Oracle 10g
    Sheer size of this table (56G) and its rate of growth may be the culprits behind performance issue. But to ascertain that, we need to dig out more facts so that we can decide conclusively how to mail this issue.
    So my questions are:
    1. What other facts can be collected to find out the root cause of bad performance?
    2. Looking at given statistics, is there a way to resolve the performance issue - by using table partition or archiving or some other better way is there?
    We've already though of dropping some indexes but it looks difficult since they are used in reports based on this table (along with other tables)
    3. Any guess what else can be causing this issue?
    4. How many records per session can be inserted in a table? Is there any limitation?
    Thanks in advance!!

    Run STATSPACK and check what it says are the issues. Try and find the particular INSERT statement in the list of all SQL. Look at all the sections of the report, including block contention, which may show you are waiting for data blocks or index blocks, etc, or even things like latch contention too. Make sure you run it when the INSERT is happening during one of your busy periods.
    Given that you are using Oracle 10g, I assume you are using all the automatic settings now:
    o Local Tablespace Management
    o Automatic Segment Space Management
    o Automatic Undo Management
    If not, you should be. Prior to all this, Oracle always inserted into the last block in a table, which could become a bottleneck point. And space allocation of new blocks was also a problem. When these settings were introduced it alleviated most of these problems, and meant that Oracle could scale far better on such INSERT intensive workloads. If you are not using these for some reason or other, then you need to look at the number of FREELISTS you have on the table, and the setting of INITRANS.
    Also, how many columns does this table have? And how big is an average row. And what is your block size? You can get these from the data dictionary:
    select count (*) from user_tab_columns where table_name = '<tablename>' ;
    select avg_row_len from user_tables where table_name = '<tablename>' ;
    show parameter db_block_size
    Replace <tablename> with the name of your table, in uppercase.
    I ask because a very large row in a small data block will always fill the block quickly and cause new blocks to be allocated. If so, you may just have to live with this.
    And I would be suspicious about all 14 indexes being needed. Are they all single column indexes, or do you have any multi-column indexes? Do any of them share the same leading columns? Again, if you need all 14 indexes, then you must suffer the overhead of maintaining these indexes. But unless you have something like 50 columns in this table, I would guess that there is some overlap between these indexes.
    John

  • Crystal Reports 11g Performance Issue

    We just upgraded our database to Oracle 11g from Oracle 10g and we are having significant performance issues with Crystal Reports.
    Our DEV and TEST environments are on 11g and are very slow to connect to the database and attach to specific tables.  It is unusable.  Our PROD environment is still 10g and works fine.  
    We  have tested with both the lastest version -  Crystal Reports 2008 V1  and  Crystal Reports XI R2 SP6.  We have also tested on several different machines.
    We are using Oracle 10g ODBC drivers.
    Does anyone have any recommendations?

    You could also try our Data direct drivers we have available on our WEB site using this [link|https://smpdl.sap-ag.de/~sapidp/012002523100008666562008E/cr_datadirect53_win32.zip].
    Those drivers are the most recent and do support 11g. It also has a wired driver that doesn't require the client to be installed.
    Also, highly recommended that when you do update the Oracle client to uninstall 10 first. There have been issues with CR and Oracle mixing the Oracle dependencies and causing problems.
    Thank you
    Don

Maybe you are looking for

  • Two instances can not simlutaneouly work together on Windows Server 2003 R2

    Hi Gurus, I installed Netweaver on a server which is already having ECC 6.0 which we are using on insctance 10 but i can work only one at a time if one is Up and running the other one should be down this is what am facing. I have the developer trace

  • Upgrade to CS4 web premium . . . or wait for CS5 ?

    The question I have for anyone who may have some insight:  Is there anything groundbreaking in the works for Dreamweaver, Photoshop or Illustrator in CS5 which is due to be released in about 6 months ? We have CS3 Web Standard, and now want to upgrad

  • Reconcilation

    Hello All, I am running the two reports mentioed below S_ALR_87012082 ( Vendor Balances in local currency) S_ALR_87012277 ( G/L Account Balances) But when i compare both of these reports for eg choosing one of the Vendor reonciliatoin Account i see s

  • Photo Viewing Size?

    How do you view a photo at 100% size like you can do in Photoshop? The zoom slider is cool but it does not give you any info as to what magnification size the image is at. Can anyone help? Thanks, Martin.

  • OSX 10.6.8 issues with hp photosmart D110

    I used to be able to print and scan from my iMac  running 10.6.8  to the hp photosmart d110. Now, it doesn't show up as a bonjour device. When I ping it, I get access denied. Still air prints from iPhone and iPad. Works with win 7 machine. Any ideas