Difference in select for update of - in Oracle Database 10g and 11g

Hi, I found out that Oracle Database 10g and 11g treat the following PL/SQL block differently (I am using scott schema for convenience):
DECLARE
  v_ename bonus.ename%TYPE;
BEGIN
  SELECT b.ename
    INTO v_ename
    FROM bonus b
    JOIN emp e ON b.ename = e.ename
    JOIN dept d ON d.deptno = e.deptno
   WHERE b.ename = 'Scott'
     FOR UPDATE OF b.ename;
END;
/While in 10g (10.2) this code ends successfully (well NO_DATA_FOUND exception is raised but that is expected), in 11g (11.2) it raises exception "column ambiguously defined". And that is definitely not expected. It seems like it does not take into account table alias because I found out that when I change the column in FOR UPDATE OF e.empno (also does not work) to e.mgr (which is unique) it starts working. So is this some error in 11g? Any thoughts?
Edited by: Libor Nenadál on 29.4.2010 21:46
It seems that my question was answered here - http://stackoverflow.com/questions/2736426/difference-in-select-for-update-of-in-oracle-database-10g-and-11g

The behaviour seems like it really is a bug and can be avoided using non-ANSI syntax. (It makes me wonder why Oracle maintains two query languages while dumb me thinks that this is just a preprocessor matter and query engine could be the same).

Similar Messages

  • Running Oracle database 10g and 11g on same 5 RAC nodes

    Hello Gurus,
    Could any body throw light if I can install and sucessfully run Oracle database 10g and 11g on the same Oracle RAC installation setup.My setup is below
    Number of nodes-5
    OS- windows 2003 or RHEL5
    storage- DELL EMC SAN
    Clusterware- oracle version11g
    File system-Automatic storage management(ASM)
    After I successfully setup clusterware,ASM on the nodes,I would want to install 11g database on all 5 nodes .
    Then Install 10g database on only 3 of the nodes using the same clusterware.
    What are your views on the same.
    Also FYI... as per metalink node 220970.1(RAC: Frequently Asked Questions) one can do such a setup.
    what iam looking for is practical experience if anyone has implemented this in production system,if yes any issues faced and how tough it is to support.
    Thanks,
    Imtiyaz

    You could run an 11g database and 10g database on the same cluster as long as you use Clusterware 11g.
    The administration aspect will drastically change according to the platform you run on. As of now, it appears you don't know whether it will be Linux or Windows.
    It would be practical to support the same database release.

  • Differences between Oracle Discoverer  10g and 11g .

    we would like to know if they are any differences between Oracle Discoverer 10g and 11g and any issues with 10g that are overcome in 11g.
    Please make us aware of any merits in going for 11g over 10g.
    apps version 11.5.10.2
    Regards

    Please see these links for the list of new features, bug fixes, certification, and installation of Discoverer 11g on 11i instance.
    Discoverer 11.1.1.4 Certified with E-Business Suite
    http://blogs.oracle.com/stevenChan/2011/02/discoverer_11114_ebs.html
    EBS Sysadmin Primer: Oracle BI Discoverer 11gR1
    http://blogs.oracle.com/stevenChan/2010/08/discoverer_11gr1_primer.html
    Oracle Business Intelligence Discoverer 11g
    http://www.oracle.com/technetwork/developer-tools/discoverer/overview/index.html
    Oracle Business Intelligence Discoverer 11g documentation
    http://www.oracle.com/technetwork/developer-tools/discoverer/documentation/index.html
    Thanks,
    Hussein

  • Difference Between Oracle Database 10g And Oracle 10g Express Edition

    Can any body Tell me What is The Difference Between Oracle Database 10g And Oracle 10g Express Edition.

    http://www.oracle.com/database/product_editions.html
    This link might help you.

  • Oracle Database 10g and Oracle Client 9i together

    Hi, I've been lost some nights in this problem, in my job I will need migrate my Oracle Database 10g for a new computer, on the other hand, there is a software in this computer wrote in Visual Basic and this running only Oracle 9i Client.
    Is it possible configure my new server for run Oracle Database 10g and Oracle 9i Client together?
    Thanks!
    Emerson

    You can certainly use an Oracle 9i client to connect to an Oracle 10g database. Technically, you may have to apply the 9.2.0.4 patchset to the Oracle client to be completely supported, but that may not be strictly necessary.
    You can also have both a 10g database and a 9i client installed on the same machine in different Oracle Homes. You may have some issues on Windows, however, if you are using software that is not multi-home compliant (i.e. the Microsoft ODBC driver for Oracle) or if you call Oracle command-line utilities (exp, imp, etc) without explicitly setting the PATH first.
    Justin

  • How to SELECT FOR UPDATE with CMP (Oracle)

    The most common database (Oracle) by default uses a scheme that does not fit into any of those isolation levels. A SELECT statement selects data at the start of the transactions, whereas a SELECT ... FOR UPDATE does something quite different. It is essential to do SELECT FOR UPDATEs before updating the row as SELECT does no lock. It's a hack that works well in practice.
    1. Which isolation level is this?
    2. More fundamentally, how an earth is it possible to use this scheme with CMP?! You would have to distinguish load() from loadForUpdate()! Is CMP inconsistent with Oracle?
    This is a pretty big whole in the CMP spec!

    No. thats no goes well.
    Transaction serializable in Oracle uses a optimistic
    concurrency system. And for update is a
    pessimistic concurrency.
    With optimistic: the system is faster but it can fail
    With pessimistic: if doesnt fail (usually;)
    You can solve the proble with many differents systems:
    1. Edit the .xml descriptor files ans change the sql sentences.
    And my prefer one.
    2. Make a new jdbc driver that inherits from the original
    oracledriver.
    The new driver give u in "getConnection()" a new connection class that inherits from the original connection.
    The executestatement and preparestatement adds the
    string "for update" if the stattement was starting by select.
    Configure your container to use the new driver.

  • Difference between oracle bpm 10g and 11g

    Newbie: I am trying to understand 10g. The basic questions I have is
    1)What is the difference between 10g and 11g?
    2)What is the infrastructure & skillset needed for me to do implementation in 10g?
    3)How is migration from 10g to 11g is accomplished?
    Any resource links that would help me to get started with 10g would be appreciated.
    Chaitanya

    Hi,
    Please follow the below mentioned link to find your answer.
    Re: Main differences between oracle bpm 10.3 vs 11g
    Migration from ALBPM 5.7 to BPM 11g
    Bibhu

  • Web Server Options for APEX Installation on Oracle Database 10g

    Hi. We are installation a APEX on a test server that is running Oracle Database 10g 10.2.0.4.0. As I understand it there are two Web Server Options:
    1) Oracle HTTP Server (Apache)
    2) Oracle Application Express Listener
    Do both of these work for Oracle Database 10g 10.2.0.4.0? I thought I remember reading somewhere that only the Oracle Application Express Listener would only work with database version 11 or higher.

    Do both of these work for Oracle Database 10g 10.2.0.4.0?Yes.
    I thought I remember reading somewhere that only the Oracle Application Express Listener would only work with database version 11 or higher. No, that restriction (with the exception of 10g XE) applies to the third web server option which you haven't mentioned: Embedded PL/SQL Gateway (EPG), as discussed in your previous thread: +{thread:id=2201975}+
    System requirements for APEX Listener
    {forum:id=858} forum

  • Can Oracle Database 10g and Oracle Database 10g Express Edition co-exist ?

    I just installed Oracle Database 10g Express Edition. But I also want to access isql*plus for study purposes.
    Can I download/install Oracle Database 10g without removing Oracle Database 10g Express Edition ?

    I decided to download and install Oracle 10g myself and it was pretty quick to install. So I answered my own question : Oracle 10g Express is definitely able to co-exist with Oracle 10g no problem.
    I want to post/share this answer for others who started with Oracle 10g express first - the journey I started.
    The url isql*plus is displayed near the end of the installation together with the enterprise manager url. Pretty cool.
    Now I can learn both Oracle 10g enterprise edition and Oracle 10g Express which is based on apex engine.

  • Oracle Database 10g and jdk 6

    does Oracle Database 10g driver work with java jdk 6
    I am returning a ref cursor from pl-sql to java and when I do
    cs.registerOutParameter(2, OracleTypes.CURSOR);
    it will throw ora 17004, invalid column type 246
    I am trying to migrate my app from jboss to weblogic 10.3.4
    George

    Yes it works. But OJDBC6 also works fine for connecting to 10g, all drivers are backwards compatible.
    it will throw ora 17004, invalid column type 246So you are saying that this is not happening when running Java 1.4? I find that highly doubtful, the driver is not going to change its behavior based on the JDK version.

  • Doubt with Windows and Oracle Forms 10G and 11g

    Hi
    I have some doubts in installing Oracle Client on Windows.
    a)Can we install Oracle Forms 10g and Reports 10g client on Windows 7?
    b)Can we install Oracle Forms 11g and Reports 11g client on Windows XP?
    c)If we have an Oracle Forms 11g and Reports 11g, can it connect to a 10g Server?
    d)If we have an Oracle Forms 10g and Reports 10g Client, can it connect to an 11g Server?
    Please, Can any one help me in this????

    a)yes it can be installed on win7, may have some issues on 64bit systems but they're solvable
    b)11g had some problems with windows 2000, but didn't see mention of any problems on XP
    c)if you mean a database server then yes - i managed to connect 11g to an 8i database, so v10 should not be a problem. If you mean a forms/reports server..well newer forms/reports builder might not want to run old forms/reports and vice versa, but I don't see the point of operating on the same files from different versions. You can still load old form/report source files with a newer builder and recompile them to run on the new server.
    d) the "client" is effectively your web browser with a java plugin, unless I misunderstood your question. What version was a form/report compiled with should not be an issue.

  • Oracle database 10g and symantec ghost

    i'm working on trying to install oracle database 10g on a bunch of computers in a computer lab here at my university. we are using symantec ghost to manage all of these computers. like normal, i installed oracle database 10g enterprise on the build machine. i pushed out a new build to all of the computers but when the ghosted computers attempt to start oracle up to get the database running, it fails. i have been told by the instructor who teaches the course which needs this software that it is probably due to the hostname of the machines changing... does anyone know if there is a way around this problem? i am not familiar with oracle at all so i apologize if i am using any terms incorrectly.
    thanks

    If it failed what error message you have? Without the error message it's hard to comment.
    It seems you not only installed Oracle software, you also created a database.

  • Differences between  Oracle Discoverer 10g and 11g (EBS & Desktop)

    We are in the process of upgrading from Oracle Discoverer 10g testing to Oracle Discoverer 11g.
    We have had several requests (from functional users) for documentation that might reflect the changes in this release level. Does anyone have relevant documentation that might help explain what has changed so that they can be better prepared.

    We are in the process of going from 10 desktop to 11 plus. I do not like it as other end-users I have talked to don't either. In desktop, I could have multiple reports open at one time, move tabs from one report to another so I wouldn't have to rebuild the report again. Also, there are times I have 3 or more sessions of desktop running with multiple reports running in them. In plus, I am limited to one session and one report. That slows down productivity big time. In desktop, exporting crosstabs to excel is more user friendly than plus. For desktop, it will fill in the cells below with the data above it if it changes. In plus, it looks like a pivot table. I have read other posts on how to work around that, but not always functional. Using Dense_Rank() works sometimes depending on how the report is written. IT is researching another way but haven't heard back from the consultants. Or, I will have to modify all my excel files with formulas to do that for me. Also in desktop, I can select all and copy paste the results into excel and all data comes in. The row and column headers, page items and even the title section will paste into excel. Plus only gives you the data, no row or column headers. So I have to export it every time I need the data. I have formatted excel files that all I need to do is copy paste and data flows beautifully. As for organizing and saving reports, desktop is much better. I can save reports out on our network under different folders so I can find them faster by topic. Granted, if that directory is an open one, anyone can change/delete it. In plus, the only advantage of saving it on the database is I can sort and search for reports or users. If you make any changes in plus and then walk away from your desk, plus will shut down after a certain time period. If you didn't save it, you have to start over. Don't know if this is something IT can fix???
    As we see it, plus is a step back in technology. I hope someone can change that opinion. Don't know if we are not getting the best support from whoever is working with us (Oracle or 3rd party) or we are missing something???? If so, please share.
    Thanks.

  • Report performance issue in oracle database 10g to 11g

    Hi All,
    We have one test instance for database 10g where the report is working fine below is the plan for report.
    SELECT STATEMENT
    VIEW APPS
    SORT UNIQUE
    UNION-ALL
    HASH JOIN
    TABLE ACCESS BY INDEX ROWID INV.MTL_SYSTEM_ITEMS_B
    NESTED LOOPS
    MERGE JOIN CARTESIAN
    TABLE ACCESS FULL INV.MTL_PARAMETERS
    BUFFER SORT
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_LOOKUP_VALUES
    INDEX RANGE SCAN APPLSYS.FND_LOOKUP_VALUES_U2
    INDEX RANGE SCAN INV.MTL_SYSTEM_ITEMS_B_XX1
    TABLE ACCESS FULL ONT.OE_ORDER_LINES_ALL
    NESTED LOOPS ANTI
    HASH JOIN
    TABLE ACCESS BY INDEX ROWID MRP.MRP_GROSS_REQUIREMENTS
    INDEX SKIP SCAN MRP.MRP_GROSS_REQUIREMENTS_N2
    TABLE ACCESS BY INDEX ROWID INV.MTL_SYSTEM_ITEMS_B
    NESTED LOOPS
    MERGE JOIN CARTESIAN
    TABLE ACCESS FULL INV.MTL_PARAMETERS
    BUFFER SORT
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_LOOKUP_VALUES
    INDEX RANGE SCAN APPLSYS.FND_LOOKUP_VALUES_U2
    INDEX RANGE SCAN INV.MTL_SYSTEM_ITEMS_B_XX1
    TABLE ACCESS BY INDEX ROWID ONT.OE_ORDER_LINES_ALL
    INDEX RANGE SCAN ONT.OE_ORDER_LINES_N3
    We have one more instance whose database is 11g and the same report is migrated but it is taking too long time to execute the report output. Please advise why it is happening even why the plan is difference.
    SELECT STATEMENT
    VIEW APPS
    SORT UNIQUE
    UNION-ALL
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    INDEX RANGE SCAN INV.MTL_ITEM_CATEGORIES_U1
    INDEX UNIQUE SCAN INV.MTL_CATEGORY_SETS_B_U1
    TABLE ACCESS BY INDEX ROWID INV.MTL_CATEGORIES_B
    INDEX UNIQUE SCAN INV.MTL_CATEGORIES_B_U1
    INDEX UNIQUE SCAN INV.MTL_CATEGORIES_TL_U1
    INDEX UNIQUE SCAN INV.MTL_CATEGORY_SETS_TL_U1
    TABLE ACCESS BY INDEX ROWID INV.MTL_CATEGORY_SETS_TL
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID BOM.BOM_STRUCTURES_B
    INDEX RANGE SCAN BOM.BOM_STRUCTURES_B_N2
    SORT AGGREGATE
    INDEX RANGE SCAN BOM.BOM_OPERATIONAL_ROUTINGS_U2
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID BOM.CST_ITEM_COSTS
    INDEX UNIQUE SCAN BOM.CST_ITEM_COSTS_U1
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID BOM.CST_ITEM_COSTS
    INDEX UNIQUE SCAN BOM.CST_ITEM_COSTS_U1
    SORT AGGREGATE
    FILTER
    NESTED LOOPS
    NESTED LOOPS
    MERGE JOIN CARTESIAN
    NESTED LOOPS
    NESTED LOOPS
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_HEADERS_TL
    INDEX RANGE SCAN QP.QP_LIST_HEADERS_TL_U1
    INDEX UNIQUE SCAN QP.QP_LIST_HEADERS_B_PK
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_HEADERS_B
    BUFFER SORT
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX SKIP SCAN QP.QP_PRICING_ATTRIBUTES_N11
    INDEX UNIQUE SCAN QP.QP_LIST_LINES_PK
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_LINES
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    SORT AGGREGATE
    FILTER
    NESTED LOOPS
    NESTED LOOPS
    MERGE JOIN CARTESIAN
    NESTED LOOPS
    NESTED LOOPS
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_HEADERS_TL
    INDEX RANGE SCAN QP.QP_LIST_HEADERS_TL_U1
    INDEX UNIQUE SCAN QP.QP_LIST_HEADERS_B_PK
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_HEADERS_B
    BUFFER SORT
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX SKIP SCAN QP.QP_PRICING_ATTRIBUTES_N11
    INDEX UNIQUE SCAN QP.QP_LIST_LINES_PK
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_LINES
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    SORT AGGREGATE
    NESTED LOOPS
    TABLE ACCESS BY INDEX ROWID MRP.MRP_ASSIGNMENT_SETS
    INDEX UNIQUE SCAN MRP.MRP_ASSIGNMENT_SETS_U2
    INDEX RANGE SCAN MRP.MRP_SR_ASSIGNMENTS_N3
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID PO.PO_APPROVED_SUPPLIER_LIST
    INDEX RANGE SCAN PO.PO_APPROVED_SUPPLIER_LIST_N1
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID INV.MTL_ONHAND_QUANTITIES_DETAIL
    INDEX RANGE SCAN INV.MTL_ONHAND_QUANTITIES_N6
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID INV.MTL_ONHAND_QUANTITIES_DETAIL
    INDEX RANGE SCAN INV.MTL_ONHAND_QUANTITIES_N6
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID ONT.OE_ORDER_LINES_ALL
    INDEX RANGE SCAN ONT.OE_ORDER_LINES_N3
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID ONT.OE_ORDER_LINES_ALL
    INDEX RANGE SCAN ONT.OE_ORDER_LINES_N3
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    INDEX RANGE SCAN INV.MTL_ITEM_CATEGORIES_U1
    TABLE ACCESS BY INDEX ROWID INV.MTL_CATEGORIES_B
    INDEX UNIQUE SCAN INV.MTL_CATEGORIES_B_U1
    INDEX UNIQUE SCAN INV.MTL_CATEGORY_SETS_TL_U1
    TABLE ACCESS BY INDEX ROWID INV.MTL_CATEGORY_SETS_TL
    HASH JOIN
    NESTED LOOPS
    NESTED LOOPS
    MERGE JOIN CARTESIAN
    TABLE ACCESS FULL INV.MTL_PARAMETERS
    BUFFER SORT
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_LOOKUP_VALUES
    INDEX RANGE SCAN APPLSYS.FND_LOOKUP_VALUES_U2
    INDEX RANGE SCAN INV.MTL_SYSTEM_ITEMS_B_XX1
    TABLE ACCESS BY INDEX ROWID INV.MTL_SYSTEM_ITEMS_B
    TABLE ACCESS FULL ONT.OE_ORDER_LINES_ALL
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    INDEX RANGE SCAN INV.MTL_ITEM_CATEGORIES_U1
    INDEX UNIQUE SCAN INV.MTL_CATEGORY_SETS_B_U1
    TABLE ACCESS BY INDEX ROWID INV.MTL_CATEGORIES_B
    INDEX UNIQUE SCAN INV.MTL_CATEGORIES_B_U1
    INDEX UNIQUE SCAN INV.MTL_CATEGORIES_TL_U1
    INDEX UNIQUE SCAN INV.MTL_CATEGORY_SETS_TL_U1
    TABLE ACCESS BY INDEX ROWID INV.MTL_CATEGORY_SETS_TL
    TABLE ACCESS BY INDEX ROWID BOM.BOM_STRUCTURES_B
    INDEX RANGE SCAN BOM.BOM_STRUCTURES_B_N2
    INDEX RANGE SCAN BOM.BOM_OPERATIONAL_ROUTINGS_U2
    TABLE ACCESS BY INDEX ROWID BOM.CST_ITEM_COSTS
    INDEX UNIQUE SCAN BOM.CST_ITEM_COSTS_U1
    TABLE ACCESS BY INDEX ROWID BOM.CST_ITEM_COSTS
    INDEX UNIQUE SCAN BOM.CST_ITEM_COSTS_U1
    FILTER
    NESTED LOOPS
    NESTED LOOPS
    MERGE JOIN CARTESIAN
    NESTED LOOPS
    NESTED LOOPS
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_HEADERS_TL
    INDEX RANGE SCAN QP.QP_LIST_HEADERS_TL_U1
    INDEX UNIQUE SCAN QP.QP_LIST_HEADERS_B_PK
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_HEADERS_B
    BUFFER SORT
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX SKIP SCAN QP.QP_PRICING_ATTRIBUTES_N11
    INDEX UNIQUE SCAN QP.QP_LIST_LINES_PK
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_LINES
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    FILTER
    NESTED LOOPS
    NESTED LOOPS
    MERGE JOIN CARTESIAN
    NESTED LOOPS
    NESTED LOOPS
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_HEADERS_TL
    INDEX RANGE SCAN QP.QP_LIST_HEADERS_TL_U1
    INDEX UNIQUE SCAN QP.QP_LIST_HEADERS_B_PK
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_HEADERS_B
    BUFFER SORT
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX SKIP SCAN QP.QP_PRICING_ATTRIBUTES_N11
    INDEX UNIQUE SCAN QP.QP_LIST_LINES_PK
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_LINES
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    SORT UNIQUE NOSORT
    NESTED LOOPS
    TABLE ACCESS BY INDEX ROWID MRP.MRP_ASSIGNMENT_SETS
    INDEX UNIQUE SCAN MRP.MRP_ASSIGNMENT_SETS_U2
    INDEX RANGE SCAN MRP.MRP_SR_ASSIGNMENTS_N3
    SORT UNIQUE NOSORT
    TABLE ACCESS BY INDEX ROWID PO.PO_APPROVED_SUPPLIER_LIST
    INDEX RANGE SCAN PO.PO_APPROVED_SUPPLIER_LIST_N1
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID INV.MTL_ONHAND_QUANTITIES_DETAIL
    INDEX RANGE SCAN INV.MTL_ONHAND_QUANTITIES_N6
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID INV.MTL_ONHAND_QUANTITIES_DETAIL
    INDEX RANGE SCAN INV.MTL_ONHAND_QUANTITIES_N6
    SORT AGGREGATE
    INDEX RANGE SCAN MRP.MRP_GROSS_REQUIREMENTS_N1
    SORT AGGREGATE
    INDEX RANGE SCAN MRP.MRP_GROSS_REQUIREMENTS_N1
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    INDEX RANGE SCAN INV.MTL_ITEM_CATEGORIES_U1
    TABLE ACCESS BY INDEX ROWID INV.MTL_CATEGORIES_B
    INDEX UNIQUE SCAN INV.MTL_CATEGORIES_B_U1
    INDEX UNIQUE SCAN INV.MTL_CATEGORY_SETS_TL_U1
    TABLE ACCESS BY INDEX ROWID INV.MTL_CATEGORY_SETS_TL
    NESTED LOOPS ANTI
    HASH JOIN
    TABLE ACCESS BY INDEX ROWID MRP.MRP_GROSS_REQUIREMENTS
    INDEX SKIP SCAN MRP.MRP_GROSS_REQUIREMENTS_N2
    NESTED LOOPS
    NESTED LOOPS
    MERGE JOIN CARTESIAN
    TABLE ACCESS FULL INV.MTL_PARAMETERS
    BUFFER SORT
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_LOOKUP_VALUES
    INDEX RANGE SCAN APPLSYS.FND_LOOKUP_VALUES_U2
    INDEX RANGE SCAN INV.MTL_SYSTEM_ITEMS_B_XX1
    TABLE ACCESS BY INDEX ROWID INV.MTL_SYSTEM_ITEMS_B
    TABLE ACCESS BY INDEX ROWID ONT.OE_ORDER_LINES_ALL
    INDEX RANGE SCAN ONT.OE_ORDER_LINES_N3
    }

    Hi All,
    We have one test instance for database 10g where the report is working fine below is the plan for report.
    SELECT STATEMENT
    VIEW APPS
    SORT UNIQUE
    UNION-ALL
    HASH JOIN
    TABLE ACCESS BY INDEX ROWID INV.MTL_SYSTEM_ITEMS_B
    NESTED LOOPS
    MERGE JOIN CARTESIAN
    TABLE ACCESS FULL INV.MTL_PARAMETERS
    BUFFER SORT
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_LOOKUP_VALUES
    INDEX RANGE SCAN APPLSYS.FND_LOOKUP_VALUES_U2
    INDEX RANGE SCAN INV.MTL_SYSTEM_ITEMS_B_XX1
    TABLE ACCESS FULL ONT.OE_ORDER_LINES_ALL
    NESTED LOOPS ANTI
    HASH JOIN
    TABLE ACCESS BY INDEX ROWID MRP.MRP_GROSS_REQUIREMENTS
    INDEX SKIP SCAN MRP.MRP_GROSS_REQUIREMENTS_N2
    TABLE ACCESS BY INDEX ROWID INV.MTL_SYSTEM_ITEMS_B
    NESTED LOOPS
    MERGE JOIN CARTESIAN
    TABLE ACCESS FULL INV.MTL_PARAMETERS
    BUFFER SORT
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_LOOKUP_VALUES
    INDEX RANGE SCAN APPLSYS.FND_LOOKUP_VALUES_U2
    INDEX RANGE SCAN INV.MTL_SYSTEM_ITEMS_B_XX1
    TABLE ACCESS BY INDEX ROWID ONT.OE_ORDER_LINES_ALL
    INDEX RANGE SCAN ONT.OE_ORDER_LINES_N3
    We have one more instance whose database is 11g and the same report is migrated but it is taking too long time to execute the report output. Please advise why it is happening even why the plan is difference.
    SELECT STATEMENT
    VIEW APPS
    SORT UNIQUE
    UNION-ALL
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    INDEX RANGE SCAN INV.MTL_ITEM_CATEGORIES_U1
    INDEX UNIQUE SCAN INV.MTL_CATEGORY_SETS_B_U1
    TABLE ACCESS BY INDEX ROWID INV.MTL_CATEGORIES_B
    INDEX UNIQUE SCAN INV.MTL_CATEGORIES_B_U1
    INDEX UNIQUE SCAN INV.MTL_CATEGORIES_TL_U1
    INDEX UNIQUE SCAN INV.MTL_CATEGORY_SETS_TL_U1
    TABLE ACCESS BY INDEX ROWID INV.MTL_CATEGORY_SETS_TL
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID BOM.BOM_STRUCTURES_B
    INDEX RANGE SCAN BOM.BOM_STRUCTURES_B_N2
    SORT AGGREGATE
    INDEX RANGE SCAN BOM.BOM_OPERATIONAL_ROUTINGS_U2
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID BOM.CST_ITEM_COSTS
    INDEX UNIQUE SCAN BOM.CST_ITEM_COSTS_U1
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID BOM.CST_ITEM_COSTS
    INDEX UNIQUE SCAN BOM.CST_ITEM_COSTS_U1
    SORT AGGREGATE
    FILTER
    NESTED LOOPS
    NESTED LOOPS
    MERGE JOIN CARTESIAN
    NESTED LOOPS
    NESTED LOOPS
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_HEADERS_TL
    INDEX RANGE SCAN QP.QP_LIST_HEADERS_TL_U1
    INDEX UNIQUE SCAN QP.QP_LIST_HEADERS_B_PK
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_HEADERS_B
    BUFFER SORT
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX SKIP SCAN QP.QP_PRICING_ATTRIBUTES_N11
    INDEX UNIQUE SCAN QP.QP_LIST_LINES_PK
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_LINES
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    SORT AGGREGATE
    FILTER
    NESTED LOOPS
    NESTED LOOPS
    MERGE JOIN CARTESIAN
    NESTED LOOPS
    NESTED LOOPS
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_HEADERS_TL
    INDEX RANGE SCAN QP.QP_LIST_HEADERS_TL_U1
    INDEX UNIQUE SCAN QP.QP_LIST_HEADERS_B_PK
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_HEADERS_B
    BUFFER SORT
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX SKIP SCAN QP.QP_PRICING_ATTRIBUTES_N11
    INDEX UNIQUE SCAN QP.QP_LIST_LINES_PK
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_LINES
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    SORT AGGREGATE
    NESTED LOOPS
    TABLE ACCESS BY INDEX ROWID MRP.MRP_ASSIGNMENT_SETS
    INDEX UNIQUE SCAN MRP.MRP_ASSIGNMENT_SETS_U2
    INDEX RANGE SCAN MRP.MRP_SR_ASSIGNMENTS_N3
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID PO.PO_APPROVED_SUPPLIER_LIST
    INDEX RANGE SCAN PO.PO_APPROVED_SUPPLIER_LIST_N1
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID INV.MTL_ONHAND_QUANTITIES_DETAIL
    INDEX RANGE SCAN INV.MTL_ONHAND_QUANTITIES_N6
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID INV.MTL_ONHAND_QUANTITIES_DETAIL
    INDEX RANGE SCAN INV.MTL_ONHAND_QUANTITIES_N6
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID ONT.OE_ORDER_LINES_ALL
    INDEX RANGE SCAN ONT.OE_ORDER_LINES_N3
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID ONT.OE_ORDER_LINES_ALL
    INDEX RANGE SCAN ONT.OE_ORDER_LINES_N3
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    INDEX RANGE SCAN INV.MTL_ITEM_CATEGORIES_U1
    TABLE ACCESS BY INDEX ROWID INV.MTL_CATEGORIES_B
    INDEX UNIQUE SCAN INV.MTL_CATEGORIES_B_U1
    INDEX UNIQUE SCAN INV.MTL_CATEGORY_SETS_TL_U1
    TABLE ACCESS BY INDEX ROWID INV.MTL_CATEGORY_SETS_TL
    HASH JOIN
    NESTED LOOPS
    NESTED LOOPS
    MERGE JOIN CARTESIAN
    TABLE ACCESS FULL INV.MTL_PARAMETERS
    BUFFER SORT
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_LOOKUP_VALUES
    INDEX RANGE SCAN APPLSYS.FND_LOOKUP_VALUES_U2
    INDEX RANGE SCAN INV.MTL_SYSTEM_ITEMS_B_XX1
    TABLE ACCESS BY INDEX ROWID INV.MTL_SYSTEM_ITEMS_B
    TABLE ACCESS FULL ONT.OE_ORDER_LINES_ALL
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    INDEX RANGE SCAN INV.MTL_ITEM_CATEGORIES_U1
    INDEX UNIQUE SCAN INV.MTL_CATEGORY_SETS_B_U1
    TABLE ACCESS BY INDEX ROWID INV.MTL_CATEGORIES_B
    INDEX UNIQUE SCAN INV.MTL_CATEGORIES_B_U1
    INDEX UNIQUE SCAN INV.MTL_CATEGORIES_TL_U1
    INDEX UNIQUE SCAN INV.MTL_CATEGORY_SETS_TL_U1
    TABLE ACCESS BY INDEX ROWID INV.MTL_CATEGORY_SETS_TL
    TABLE ACCESS BY INDEX ROWID BOM.BOM_STRUCTURES_B
    INDEX RANGE SCAN BOM.BOM_STRUCTURES_B_N2
    INDEX RANGE SCAN BOM.BOM_OPERATIONAL_ROUTINGS_U2
    TABLE ACCESS BY INDEX ROWID BOM.CST_ITEM_COSTS
    INDEX UNIQUE SCAN BOM.CST_ITEM_COSTS_U1
    TABLE ACCESS BY INDEX ROWID BOM.CST_ITEM_COSTS
    INDEX UNIQUE SCAN BOM.CST_ITEM_COSTS_U1
    FILTER
    NESTED LOOPS
    NESTED LOOPS
    MERGE JOIN CARTESIAN
    NESTED LOOPS
    NESTED LOOPS
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_HEADERS_TL
    INDEX RANGE SCAN QP.QP_LIST_HEADERS_TL_U1
    INDEX UNIQUE SCAN QP.QP_LIST_HEADERS_B_PK
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_HEADERS_B
    BUFFER SORT
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX SKIP SCAN QP.QP_PRICING_ATTRIBUTES_N11
    INDEX UNIQUE SCAN QP.QP_LIST_LINES_PK
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_LINES
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    FILTER
    NESTED LOOPS
    NESTED LOOPS
    MERGE JOIN CARTESIAN
    NESTED LOOPS
    NESTED LOOPS
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_HEADERS_TL
    INDEX RANGE SCAN QP.QP_LIST_HEADERS_TL_U1
    INDEX UNIQUE SCAN QP.QP_LIST_HEADERS_B_PK
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_HEADERS_B
    BUFFER SORT
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX SKIP SCAN QP.QP_PRICING_ATTRIBUTES_N11
    INDEX UNIQUE SCAN QP.QP_LIST_LINES_PK
    TABLE ACCESS BY INDEX ROWID QP.QP_LIST_LINES
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    TABLE ACCESS BY INDEX ROWID QP.QP_PRICING_ATTRIBUTES
    INDEX RANGE SCAN QP.QP_PRICING_ATTRIBUTES_N3
    SORT UNIQUE NOSORT
    NESTED LOOPS
    TABLE ACCESS BY INDEX ROWID MRP.MRP_ASSIGNMENT_SETS
    INDEX UNIQUE SCAN MRP.MRP_ASSIGNMENT_SETS_U2
    INDEX RANGE SCAN MRP.MRP_SR_ASSIGNMENTS_N3
    SORT UNIQUE NOSORT
    TABLE ACCESS BY INDEX ROWID PO.PO_APPROVED_SUPPLIER_LIST
    INDEX RANGE SCAN PO.PO_APPROVED_SUPPLIER_LIST_N1
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID INV.MTL_ONHAND_QUANTITIES_DETAIL
    INDEX RANGE SCAN INV.MTL_ONHAND_QUANTITIES_N6
    SORT AGGREGATE
    TABLE ACCESS BY INDEX ROWID INV.MTL_ONHAND_QUANTITIES_DETAIL
    INDEX RANGE SCAN INV.MTL_ONHAND_QUANTITIES_N6
    SORT AGGREGATE
    INDEX RANGE SCAN MRP.MRP_GROSS_REQUIREMENTS_N1
    SORT AGGREGATE
    INDEX RANGE SCAN MRP.MRP_GROSS_REQUIREMENTS_N1
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    INDEX RANGE SCAN INV.MTL_ITEM_CATEGORIES_U1
    TABLE ACCESS BY INDEX ROWID INV.MTL_CATEGORIES_B
    INDEX UNIQUE SCAN INV.MTL_CATEGORIES_B_U1
    INDEX UNIQUE SCAN INV.MTL_CATEGORY_SETS_TL_U1
    TABLE ACCESS BY INDEX ROWID INV.MTL_CATEGORY_SETS_TL
    NESTED LOOPS ANTI
    HASH JOIN
    TABLE ACCESS BY INDEX ROWID MRP.MRP_GROSS_REQUIREMENTS
    INDEX SKIP SCAN MRP.MRP_GROSS_REQUIREMENTS_N2
    NESTED LOOPS
    NESTED LOOPS
    MERGE JOIN CARTESIAN
    TABLE ACCESS FULL INV.MTL_PARAMETERS
    BUFFER SORT
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_LOOKUP_VALUES
    INDEX RANGE SCAN APPLSYS.FND_LOOKUP_VALUES_U2
    INDEX RANGE SCAN INV.MTL_SYSTEM_ITEMS_B_XX1
    TABLE ACCESS BY INDEX ROWID INV.MTL_SYSTEM_ITEMS_B
    TABLE ACCESS BY INDEX ROWID ONT.OE_ORDER_LINES_ALL
    INDEX RANGE SCAN ONT.OE_ORDER_LINES_N3
    }

  • Getting no data when it got changed from Oracle Database 10g to 11G

    Hi All,
    Below decode column is not working in Oracle database 11G but it is working in 10g. Please advise.
    {DECODE('Y',DECODE(cr.segment4,DECODE(cr.segment5,'007','32020','N'),'Y','N')
    ,DECODE(SIGN(DECODE(pacd.line_num_reversed,NULL,pae.raw_cost,( -1*pae.raw_cost ))),-1,DECODE(INSTR(pae.expenditure_type,'Accrual'),0
    ,pae.project_exchange_rate*DECODE(pacd.line_num_reversed,NULL,pae.raw_cost,( -1*pae.raw_cost )),pae.project_exchange_rate*DECODE(pacd.line_num_reversed,NULL,pae.raw_cost,( -1*pae.raw_cost ))*-1),( -1*pae.project_exchange_rate*DECODE(pacd.line_num_reversed,NULL,pae.raw_cost,( -1*pae.raw_cost )) ))
    ,DECODE(dr.segment4,DECODE(dr.segment5,'007','32020','N'),'Y','N'),DECODE(SIGN(DECODE(pacd.line_num_reversed,NULL,pae.raw_cost,( -1*pae.raw_cost ))),1
    ,pae.project_exchange_rate*DECODE(pacd.line_num_reversed,NULL,pae.raw_cost,( -1*pae.raw_cost )),( pae.project_exchange_rate*DECODE(pacd.line_num_reversed,NULL,pae.raw_cost,( -1*pae.raw_cost)) ))) "Amount"
    Regards,

    WRONG FORUM!
    This forum is for sql developer questions only.
    Since this is not a SQL Developer question it should be posted in the SQL and PL/SQL forum
    PL/SQL
    Please mark this question ANSWERED and repost it in the other forum.

Maybe you are looking for