ANSI SQL Statement Running Slow in 12C
(Doc ID 2255117.1)
Last updated on JULY 16, 2019
Applies to:Oracle Database - Standard Edition - Version 18.104.22.168 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Service - Version N/A and later
Information in this document applies to any platform.
- After upgrading the database from 22.214.171.124 to 126.96.36.199, the ANSI version of SQL statements take long time to complete
- Optimizer chooses inefficient plan in 12c for SQLs having ANSI joins and scalar subqueries.
- The non-ANSI version of the same SQL statements take only less than a second to complete with following plans:
- Setting OPTIMIZER_FEATURES_ENABLE = '188.8.131.52' resolves the issue with performance for the ANSI query.
- Setting _OPTIMIZER_UNNEST_SCALAR_SQ to FALSE also gives good plan but push predicate does not happen.
Database upgrade from 11.2 to 12c including 12.2 and 18.1.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document