My Oracle Support Banner

Large Memory Usage for Large Queries Using RBO and CURSOR_SHARING=FORCE or SIMILAR (Doc ID 462925.1)

Last updated on AUGUST 27, 2010

Applies to:

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


One may notice that large queries with many literals in predicates using IN LISTs or OR clauses consume excessive memory. These queries can take up to several hundred of megabytes and they can lead to ORA-04031 errors.
This situation appears only under very particular circumstances:
1. 9.2 environment (to be more precise, an environment that can use RBO)
2. very large query using a large number of literals
3. no statistics on the base tables (so that RBO is used for these queries)
Without any of the above, the issue would not reproduce.

Errorstack for the ORA-04031 that is generated for such a query is:

ksedmp ksdxfdmp ksdxcb sspuser sigreturn kghsrch kghfnd kghprmalo kghalp kksalc qknAllocate qknsiAllocate qkaix qkatab qkajoi qkaqkn qkadrv opitca kkssbt kksfbc kkspfda kpodny kpoal8 opiodr
ttcpip opitsk opiino opiodr opidrv sou2o main


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

Platforms: 1-914CU;

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.