ORA-04031 Executing SQL with long "IN" list

(Doc ID 135011.1)

Last updated on NOVEMBER 28, 2016

Applies to:

Oracle Server - Enterprise Edition - Version: and later   [Release: and later ]
Information in this document applies to any platform.


Sql statement with very long in list generates ora-4031.
This happens for CBO optimizer only.
The sql statement had a RULE hint as in
select /*+ RULE */ ...

ORA-04031: unable to allocate 64 bytes of shared memory ("shared pool","select
/*+ RULE */ * from We...","sql area","optdef : apanlg")

in 9.2:
ORA-4031: unable to allocate 68 bytes of shared memory ("shared pool","SELECT
PLAN_N , SSN_N, TXN_S...","sql area","optdef : apanlg")


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