0

I'm really stuck on this. I have a SQL that when I execute an Explain on it, it shows a very fast execution.

When the application runs the SQL, it takes another Explain plan and very expensive set of Cartesian Products

This is an Oracle 12C database.

Any ideas would be greatly appreciated.

  • 3
    Is the `sql_id` the same? Or is there really some difference between the two (possibly one is using bind variables and the other is using literals)? Are there differences in the NLS settings, the optimizer settings, or something else between the sessions? Are you actually running the query in your IDE and experiencing the faster performance or are you just running an `explain plan`? – Justin Cave Aug 31 '15 at 20:26
  • Check `show parameter OPTIMIZER_MODE` maybe IDE changes it to FIRST_ROWS 50|100 . – Arkadiusz Łukasiewicz Sep 01 '15 at 08:47

0 Answers0