After checking with Oracle support, it looks like it's an Oracle BUG, in fact Bug 17633803 According to Oracle, BUG is fixed in Oracle 12.1.0.2. For us we have upgraded to 12.1.0.2 resolved the issue. Another workaround is to use alter session set "_optimizer_unnest_scalar_sq"= FALSE; OR use /*+ no_unnest */ hints in the SQL having the problem.