ANSI SQL Statement Running Slow in 12C
(Doc ID 2255117.1)
Last updated on MARCH 18, 2022
Applies to:
Oracle Database Cloud Schema Service - Version N/A and laterOracle 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
Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Information in this document applies to any platform.
Symptoms
- After upgrading the database from 11.2.0.4 to 12.1.0.2, 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 = '11.2.0.4' 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.
Changes
Database upgrade from 11.2 to 12c including 12.2 and 18.1.
Cause
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
Symptoms |
Changes |
Cause |
Solution |
References |