Parallel Query giving wrong result In Oracle version (Bug 25392535)

The database version we have The problem is because we have hit the bug 25392535 in version. Query giving wrong result because of parallelism. In our database default parallelism is enable 2.

SQL> show parameter parallel_threads_per_cpu;


------------------------------------ ----------- ------------------------------

parallel_threads_per_cpu integer 2

The following way you can test your query giving incorrect or correct result.

Option 1: Change Optimizer feature for session

  • Execute the query and the query gives wrong result (I have not share here the complex query executed in my database)

4898 rows selected.

Incorrect Result

  • alter Session Set optimizer_features_enable = '';

  • Re-execute the query again.

5428 rows selected.

Correct Result

Option 2: Disable parallelism for session

[Optional] If you already change the optimizer to '' change it back

alter Session Set optimizer_features_enable = '';

  • Execute the query

4898 rows selected.

Incorrect Result

  • ALTER session disable parallel query;

  • Re-execute your query

5428 rows selected.

Correct Result.


Apply patch 25392535 which is available in MOS see

Please check Oracle Doc ID 2290845.1 and Doc ID 2217465.1 for more information.