8i to 10g upgrade time

Hi All,
I will be using DBUA tool to upgrade from my database from 8.1.7 to 10g. Typically, how much time does it take to upgrade one database.
Thank you.
Regards,
bhasi

Hi Xaheer and others,
sorry to correct you but it depends NOT on the size of the database. It won't matter if your database is 2Gb or 2Tb of size. We don't touch the data during an upgrade (we had to do this only once when "migratiing" from Oracle7 to Oracle8).
It depends mainly on:
1) The number of objects requireing change - and therefore on the number of installed components
2) The number of invalid objects needing recompilation (see (1) ...)
3) Valid and non-stale data dictionary statistics!!! Create them right before the upgrade
4) If you have a very (!!!) high number of synonyms when upgrading to 10g/11g from 8i/9i
5) At a very low rate (if you increase compatible) of the number of data files and the size of the redologs
And unfortunately there's no way of predicting the time it'll take - if you have just an Oracle Server and a JServer installed, then it should complete on a fairly new system in about 30-45 minutes for 9i to 10g. But this is just an estimate.
For an upgrade to 10.2 you'll have to be at least on 8.1.7.4 patch set - please make sure you'll apply the latest patch set 10.2.0.4 BEFORE you upgrade.
Kind regards
Mike
Edited by: Mike Dietrich on Dec 16, 2008 2:31 PM

Similar Messages

  • Report giving error after 10g upgrade

    We have a custom report which is erroring out after 10g upgrade. Following is the log file-->
    **Starts**24-APR-2009 04:11:21
    ORACLE error 3113 in FDPSTP
    Cause: FDPSTP failed due to ORA-03113: end-of-file on communication channel
    The SQL statement being executed at the time of the error was: SELECT R.Conc_Login_Id, R.Request_Id, R.Phase_Code, R.Status_Code, P
    APP-FND-01564: ORACLE error 1000 in AFPGRG
    Cause: AFPGRG failed due to ORA-01000: maximum open cursors exceeded.
    The SQL statement being executed at the time of the error was: &SQLSTMT and was executed from the file &ERRFILE.
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    ORACLE error 3114 in AFPRSR-Resubmit_Time
    Cause: AFPRSR-Resubmit_Time failed due to ORA-03114: not connected to ORACLE
    The SQL statement being executed at the time of the error was: SELECT R.Conc_Login_Id, R.Request_Id, R.Phase_Code, R
    SELECT R.Conc_Login_Id, R.Request_Id, R.Phase_Code, R.Status_Code, P.A
    Routine AFPPRD has encountered a fatal error. ORA-03114: not connected to ORACLE
    Contact your system administrator or support representative.
    Shutting down Concurrent Manager : 24-APR-2009 04:11:51
    ORA-01041: internal error. hostdef extension doesn't exist
    ORACLE error 3114 in AFPRSR-Resubmit_Time
    Cause: AFPRSR-Resubmit_Time failed due to ORA-03114: not connected to ORACLE
    The SQL statement being executed at the time of the error was: SELECT R.Conc_Login_Id, R.Request_Id, R.Phase_Code, R
    List of errors encountered:
    _ 1 _
    Routine AFPCMT encountered an ORACLE error. ORA-01041: internal error.
    hostdef extension doesn't exist
    Review your error messages for the cause of the error. (=<POINTER>)
    _ 2 _
    Routine AFPPRD has encountered a fatal error. ORA-03114: not connected
    to ORACLE
    Contact your system administrator or support representative.
    _ 3 _
    Routine AFPPRD has encountered a fatal error. ORA-03114: not connected
    to ORACLE
    Contact your system administrator or support representative.
    However the alert log has following-->
    Errors in file /u07/fatstdb/10g/admin/FATST_fatstdb/udump/fatst_ora_10468.trc:
    ORA-07445: exception encountered: core dump [qercoStart()+156] [SIGSEGV] [Address not mapped to object] [0x00000087D] [] []
    I already increased the cursors from 700 to 900
    How to fix it?

    Hi,
    However the alert log has following-->
    Errors in file /u07/fatstdb/10g/admin/FATST_fatstdb/udump/fatst_ora_10468.trc:
    ORA-07445: exception encountered: core dump [qercoStart()+156] [SIGSEGV] [Address not mapped to object] [0x00000087D] [] []Refer to the lookup to get more details about this error.
    Note: 153788.1 - Troubleshoot an ORA-600 or ORA-7445 Error Using the Error Lookup Tool
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=153788.1
    I already increased the cursors from 700 to 900
    How to fix it?Is it possible to increase OPEN_CURSORS to a higher value? Enable trace on this concurrent program, and see if this collects more details about the error.
    Regards,
    Hussein

  • Regarding 10g upgrade exam

    Dear Sir,
    I m shreyas desai from mumbai. I became 9i OCP (DBA track) on 12th sept,2009.
    Now i want to give 10g upgrade exam (1z0-040). But i didn't submitted hands-on form / didn't done any course from oracle uni. Am i able to take and give the next exam?
    How can i obtain OCP Credential?
    Thanks & Regards,
    shreyas desai

    user6727772 wrote:
    Dear Sir,
    I m shreyas desai from mumbai. I became 9i OCP (DBA track) on 12th sept,2009.
    Now i want to give 10g upgrade exam (1z0-040). But i didn't submitted hands-on form / didn't done any course from oracle uni. Am i able to take and give the next exam?
    How can i obtain OCP Credential?
    Thanks & Regards,The first thing to note is that from your email I challenge you that you are not actually a 9i DBA OCP even though you are representing yourself as one.
    Can you confirm you have received a 9i DBA Certification Success Kit from Oracle?
    If the answer is yes you have received a success kit from Oracle:
    - all well and good (and accept my apologies).
    - Taking the 1z0-040 DBA 10g upgrade exam will get your Oracle 10g OCP Certification.
    If the answer is no, and you have merely passed 1z0-007+1z0-0031+1z0-032+1z0-033 then perhaps you need to re-read the certification agreement you agreed when you took your exams:
    1) Reference: [http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=138]
    2) Reference: [http://www.oracle.com/global/us/education/downloads/certification/certagreement.pdf]
    In particular breach of * especially 3.2 (iii) * representing yourself as OCP when not could actually result in Oracle nullifying all your exam passes and OCA certification and possibily preventing you from taking further exams.
    My guess is you may have been through a WDP program and able to submit that as your 9i online course.
    Please note if you have not received a Certification Success Kit and have and/or have not taken a hands on course there is nothing stopping you taking 1z0-040 any time you can schedule a sitting. However under NO CIRCUMSTANCES can you represent yourself as an OCP without having received the success kit (or meeting all requirements) or the consequences can be considerable.
    Regards - bigdelboy

  • Firmware upgrade times out (BEFW11S4 v4)

    Hi, my firmware upgrade times out everytime and i've read that the only way to get past this is by flash-upgrading the router through this web address ftp.linksys.com/pub/network but the link doesn't work for me and says '550 failed to change directory'. Is there another link i can try or another solution?
    Previous thread: http://forums.linksysbycisco.com/linksys/board/message?board.id=Wireless_Routers&thread.id=122275

    Download Firmware 314 KB...
    Download TFTP Utility...
    After downloading the Firmware rename the file(like - befw11s4)...
    Follow these steps to upgrade the firmware on the device : -
    Double click the TFTP.exe file and click run.
    For Server- Enter the IP Address of the router that you assigned.  By default, the router is 192.168.1.1...
    For Password- Enter the password you assigned the router. By default, the router’s password is “admin”.
    For File- Click the triple “…” button and browse for the .bin firmware file...
    Click Upgrade button to start upgrading.  A progress bar should show up to show the progress.
    Once the Upgrade is done press and hold the reset button for 30 seconds...Release the reset button...Unplug the power cable from your router, wait for 30 seconds and re-connect the power cable...Now re-configure your router...

  • ISE 1.2 upgrade time

    If someone has done a 1.2 upgrade, can you let me know about how long it took?
    Thanks!
    Sent from Cisco Technical Support iPhone App

    Upgrade Time Estimation
    The following table provides an estimate of the amount of time it might take to upgrade to Release 1.2. Actual time taken for upgrade varies depending on a number of factors. Your production network continues to function without any downtime during the upgrade process. The data presented here is from a deployment with 44 Cisco ISE nodes (2 Administration nodes, 2 Monitoring nodes, and 40 Policy Service nodes). This deployment comprises 100,000 endpoints; 12,500 users; 25,000 guest users; 100 user groups (with 5 attributes per user). The Profiling service was enabled and the following probes were turned on: DHCP, HTTP, RADIUS, Network Scan (NMAP), DNS, SNMPQUERY.
    Type   of Deployment
    Node   Persona
    Time   Taken for Upgrade
    Standalone   (2000 endpoints)
    Administration,   Policy Service, Monitoring
    1 hour 20   minutes
    Distributed   (12,500 users and 25,000 endpoints)
    Secondary Administration
    7 hours
    Monitoring
    4 hours
    Policy Service
    1.5 hours
    Administration,   Monitoring
    2 hours
    Factors That Affect Upgrade Time
    Number      of endpoints in your network
    Number      of users and guest users in your network
    Profiling      service, if enabled

  • Collection of stats prior to 10g upgrade for dictionary tables

    Collection of stats prior to 10g upgrade for dictionary tables is required? I thought if you are upgrading from 9i to 10g the stats in 9i become stale in 10g.
    I read a document that says you need to collect stats prior to upgrade and import them once your upgrade is done. Can someone guide me?

    I don't know where did you get these? There's some optimizer improvement and new feature in 10g. Collecting stats before upgrade and import later is unheard of.
    I suggest you check this article
    Choosing An Optimal Stats Gathering Strategy
    http://structureddata.org/2008/03/26/choosing-an-optimal-stats-gathering-strategy/
    and the white paper mentioned,
    White Paper entitled Upgrading from Oracle Database 9i to 10g: What to expect from the Optimizer.

  • Heavu CPU Utilization of Dictionary Query - After 9i to 10g Upgrade

    Hi Friends,
    We have migrated our production DB from Oracle 9i(Windows) to Oracle 10g(AIX) and after that a heavy cpu utilization query is coming frequently and hence many timeouts are happening in the application.
    Application is connecting to the database through Java Application (JDBC).
    Once the application service is started, below query is invoked and CPU takes around 20% continuously.
    The interesting thing is this query is not owned by the application schema but by SYS and it's invoked from Application Schema.
    We have raised an SR but still no luck.
    Any help will be very much appreciated.
    SELECT -- Packaged procedures with no arguments package_name AS procedu
    re_cat, owner AS procedure_schem, object_name AS procedure_name, NULL
    , NULL, NULL, 'Packaged procedure' AS remarks, 1 AS procedure_type
    FROM all_arguments WHERE argument_name IS NULL AND data_type IS NULL AN
    D package_name LIKE :3 ESCAPE '/' AND owner LIKE :4 ESCAPE '/' AND obje
    ct_name LIKE :5 ESCAPE '/' UNION ALL SELECT -- Packaged procedures with a
    rguments package_name AS procedure_cat, owner AS procedure_schem, obj
    ect_name AS procedure_name, NULL, NULL, NULL, 'Packaged procedure'
    AS remarks, 1 AS procedure_type FROM all_arguments WHERE argument_name IS
    NOT NULL AND position = 1 AND position = sequence AND package_name L
    IKE :3 ESCAPE '/' AND owner LIKE :4 ESCAPE '/' AND object_name LIKE :5
    ESCAPE '/' UNION ALL SELECT -- Packaged functions package_name AS proce
    dure_cat, owner AS procedure_schem, object_name AS procedure_name, NU
    LL, NULL, NULL, 'Pa
    Regards,
    Savad

    Pl do not post duplicate threads - Heavy CPU Utilization of Dictionary Query - After 9i to 10g Upgrade
    Srini

  • 10g Upgrade on HPIA64 - missing OR510264.SAR  file

    1) Upgrading from 9.2.0.6 to 10.2.0.2 on HPIA64,
    do I first get the OR#10264.SAR files (as below) and apply them to get  Oracle 10.2.0.1.
    Then do I apply the 10.2.0.2 patchset?
    2) Where do I get OR510264.SAR
    To get the HPIA64 10g upgrade files, I go to...
    http://service.sap.com/swdc
    Download
    Installations and Upgrades
    Entry by Application Group
    SAP NetWeaver
    SAP NETWEAVER
    SAP NETWEAVER 2004S
    Installation and Upgrade
    HP-UX
    ORACLE
    Then I download these 7 files.
    DVD ORACLE RDBMS 10.2 HPUX_PARISC_64 1 of 7
    DVD ORACLE RDBMS 10.2 HPUX_PARISC_64 2 of 7
    DVD ORACLE RDBMS 10.2 HPUX_PARISC_64 3 of 7
    DVD ORACLE RDBMS 10.2 HPUX_PARISC_64 4 of 7
    DVD ORACLE RDBMS 10.2 HPUX_PARISC_64 5 of 7
    DVD ORACLE RDBMS 10.2 HPUX_PARISC_64 6 of 7
    DVD ORACLE RDBMS 10.2 HPUX_PARISC_64 7 of 7
    Then on Windows, run the application 51031671_part1.exe to extract these SAR files.
    OR110264.SAR
    OR210264.SAR
    OR310264.SAR
    OR410264.SAR
    OR510264.SAR
    But OR510264.SAR is missing.

    try this:
    https://websmp208.sap-ag.de/installations
    My Company's Application Components
    SAP NETWEAVER
    SAP NETWEAVER 7.0 (2004S)
    Installation and Upgrade
    HP-UX
    Oracle
    go get:
           EXE       51031671_1       DVD ORACLE RDBMS 10.2 HPUX_IA64 1 of 7        Info       683594       10.04.2006
              RAR      51031671_2      DVD ORACLE RDBMS 10.2 HPUX_IA64 2 of 7       Info      683594      10.04.2006
              RAR      51031671_3      DVD ORACLE RDBMS 10.2 HPUX_IA64 3 of 7       Info      683594      10.04.2006
              RAR      51031671_4      DVD ORACLE RDBMS 10.2 HPUX_IA64 4 of 7       Info      683594      10.04.2006
              RAR      51031671_5      DVD ORACLE RDBMS 10.2 HPUX_IA64 5 of 7       Info      683594      10.04.2006
              RAR      51031671_6      DVD ORACLE RDBMS 10.2 HPUX_IA64 6 of 7       Info      683594      10.04.2006
              RAR      51031671_7      DVD ORACLE RDBMS 10.2 HPUX_IA64 7 of 7       Info      616287      10.04.2006
    download all of them, you should get 7 files

  • 10g upgrade

    recently i did an upgrade od DB from 9.2.0.5 to 10.2.0.2
    everything was carried out as per the metalink note..however wen i ran the script:
    SQL> Select substr(owner,1,12) owner,
    2 substr(object_name,1,30) object,
    3 substr(object_type,1,30) type, status
    4 from dba_objects where status <>'VALID'
    i got around 34 objects whuch mainly had synonyms and views invalid..
    also some db-links have become invalid...
    can u kindly let me know wat should be the possible action for this?/
    thanks
    Nk

    yes i tried and i think now only 1 oject is invalid after running the utlrp script
    i was just checking the log i found this:
    pls check the link part:: wat should be done for the link:;
    Miscellaneous Warnings
    WARNING: --> Passwords exist in some database links.
    .... Passwords will be encrypted during the upgrade.
    .... Downgrade of database links with passwords is not supported.
    WARNING: --> Deprecated CONNECT role granted to some user/roles.
    .... CONNECT role after upgrade has only CREATE SESSION privilege.
    WARNING: --> Database contains stale optimizer statistics.
    .... Refer to the 10g Upgrade Guide for instructions to update
    .... statistics prior to upgrading the database.
    .... Component Schemas with stale statistics:
    .... SYS
    WARNING: --> Database contains INVALID objects prior to upgrade.
    .... USER INFORMATICA has 10 INVALID objects.
    .... USER MEADMIN has 23 INVALID objects.
    .... USER SYS has 1 INVALID objects.
    Message was edited by:
    user565186

  • 10G upgrade exam

    Hi All,
    I am preparing for Oracle9i DBA OCPs to Oracle Database 10g upgrade exam 1Z0-040.
    If anyone have sample practice questions/dumps for the same kindly send me at [email protected]
    Thanks in Advanced,
    Bhupinder

    Earlier, there use to be some kind of test dumps available for 9i and other exams. What I heared from few people that they follow the same for 10g upgrade and they failed. Because, the pattern has changed and hardly a couple of questions have come. My recommendation would be read oracle docs for 10g new features, make practice and SYBEX 10g upgrade book might also helpfull.
    Just reading dump and appearing exam could lead you to pass exam, but, ultimately, gaining nothing. Make practice and appear for the exam.
    Jaffar

  • Finally Upgrade Time- Help Me Decide..

    Hi Everyone..
    I have been waiting patiently for my Upgrade Notice.  Yeah, finally time.  I currently have a LG env3. This will be my first droid phone, so wanting some feedback on which one to chose...  just some background I have a Galaxy Tab..
    Sales Reps are pushing the 4G, Thunderbolt and Droid Charge, honestly, my town probably won't even get this ability until later this year and 3G is fine with me... I don't need to have access to the internet during the day, since I am at work  for 8 hours and cellphones must be turned off. 
    I see that there are many to chose, Costco is having a special on Fascinate right now, bundle package with desk dock, car dock and battery charger..  It looks alot like HTC Incredible...  but I can't find any smoking deals on that right now. 
    What other phones are comparable or should I consider ?  I don't know much about Motorolas...
    I see battery life has been an issue for some phones, has that been resolved?  That will matter to me, as I want a phone there and ready when I need it.  
    For a first time droid user, savvy enough but still can learn new tricks, which one would you recommend... You have, you know the pros and cons... guide me in my decision...

    Yay, upgrade time!  
    mdram4x4 is right ... trying them out in a store will help you decide. I went into a Verizon store last week to look at the iPhone, and ended up narrowing it down to the Thunderbolt and the Incredible 2. Ha ha.
    I chose the Inc 2 because my area won't have LTE for a while, I wanted global capabilities and the 4-inch screen is large enough for me. I'm very happy with my decision. The battery life is really good and it's plenty fast on 3G.
    Good luck deciding. Come back and let us know what you got.

  • Sampe 10g Upgrade Certification Questions

    Anyone know where to find a good souce for 10g upgrade cert exam (free or not)?
    Thanks,
    Mike

    Hi, Also you can get technical information about the upgrade to 10g into Oracle Press books,
    http://www.oraclepressbooks.com/
    In fact, is recommended that you practice and get experience into the new version before that you take the exam, you should not study only the question for take the exam, in the real world you must use the concepts and experience for resolve the issues or problems.
    Regards.
    Serch-Net.

  • 9i 10g upgrade execution plan differences.

    Hi all,
    I am tring to find execution plan differences after I upgrade production system from 9i to 10gR2. So I have restored only needed tablespaces from my production system (9i) to a new machine and then upgraded thiat Oracle server to 10GR2. At this new server I run a script to get new execution plans of 10g. What suprises me is that query plans of 10g is different and most of new plans choose to access tables via indexes instead of full table scans stated in the original plans taken from 9i. My idea about those differences is that the optimizer takes some values for its cost formula from other system tables that I do not have in 10g server.I guess I am missing something which is not documented in upgrade book.
    any idea?
    Regards.

    9i database is my production database and I regularly run cron jobs for missing or stale statistics on all tables. So there is no possibility to hit a problem on object level statistics. I guess that I am missing something about system level statistics which are the part of the formula (single block read time etc) for cost calculating. So I tried to use setting some statastics via dbms_stat.set_system_statistics procedure, but it did not work.
    Any idea?
    Regards.
    ALPER ÖNEY

  • 10g Upgrade Order (DEV - QAS - PRD)

    If I am upgrading Oracle 9.2.0.6 to 10.2.0.2, what issues will I face if I upgrade the landscape in the order of DEV, QAS, PRD.
    I will wait a week between upgrades.
    Will transports fail?
    Will SAP face any issues having different Oracle versions?
    Do I have to upgrade DEV, QAS, PRD at the same time?

    -> transports will not fail as long as the sap release will not change...
    -> normally all sap systems should run smoothly on supported database platforms...10g should be no problem...the three system reside on different hosts?
    to be sure (sap states that different kernel releases within one system landscape can lead to problems) try to keep the time between QAS and PRD very short and avoid transporting...
    -> no, you don't have to upgrade all systems at the same time...a week between DEV and QAS is enough
    GreetZ, AH

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

Maybe you are looking for

  • Editable alv: add custom validation and display "errors" in protocol list

    Hi, What I want to do: PAI validation of editable alv with displaying error's in the protocol list by adding custom entries to the existing protocol object. What is my problem: After registering "data_changed event", the protocol list don't appear. M

  • Material blocked at delivery

    Hi Experts I have a issue where while creating the delivery the material is blocked and delivery quantity will set 0 and find the the schedule lines and the material is available Please help me to know what could be the reasond blocking of the materi

  • WMA to MP3 Help

    Hey All + Apple,                          I have in excess of 1000 songs still in .wma format from my Windows days. I crossed over to the dark side and now realize that my Mac wont automatically convert my wma songs like the Windows version of iTunes

  • Selections on query designer

    Hello gurus, I have a question about query designer. I have various selections  (cost centre) on  structure. And i want under each selection the detail os costs for each cost centre. i have: structure:          selection 1 (cc = 1100001)          sel

  • HTTP trigger - Calling failed - 9.0.2.10000-71

    Hi, I have created a HTTP trigger in Premium licensed UCCX server (9.0.2.10000-71). When I try to call the URL from java application I am getting HTTP error code as "404". However HTTP trigger calling is working fine in the servers with the version o