SUB-OPTIMAL PLAN FOR JDBC GENERATED SQL USING ALL_CONSTRAINTS AND ALL_CONS_COLUMNS
(Doc ID 796359.1)
Last updated on MARCH 27, 2019
Applies to:Oracle Database - Enterprise Edition - Version 10.2.0.1 to 18.104.22.168 [Release 10.2 to 11.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.
This problem can occur on any platform.
JDBC auto generated SQL accesses ALL_CONSTRAINTS and ALL_CONS_COLUMNS runs a sub-optimal execution plan and takes long time. The studied case showed the SQL is generated by getImportedKeys() method of DatabaseMetaData class. This SQL or similar SQLs can be generated by other methods which get information about constraints:
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