SUB-OPTIMAL PLAN FOR JDBC GENERATED SQL USING ALL_CONSTRAINTS AND ALL_CONS_COLUMNS (Doc ID 796359.1)

Last updated on NOVEMBER 28, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.3 [Release 10.2 to 11.2]
Information in this document applies to any platform.
This problem can occur on any platform.

Symptoms

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:

 

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms