2 Replies Latest reply on May 5, 2015 8:28 AM by Siddharth Mishra

    Oracle Optimizer bug

    Siddharth Mishra

      I ran a query in Oracle SQL Developer reading exadata database.

      I am running a query which is taking 2 hours to run.

      The query is as follows:



      The plan for the query and the predicate information are also attached.


      Predicate Information.JPG


      The problem: optimizer is identifying a join to be merge join cartesian. (operation 12)

      But if we remove the filter conditions (mark lewis and account filter from the where clause), the query completes in 2 mins (and with cartesian join).


      If i use inline query it does not throw any issues and runs swiftly.

      Any ideas on why this is happening will be appreciated.