Large Memory Usage for Large Queries Using RBO and CURSOR_SHARING=FORCE or SIMILAR
Last updated on AUGUST 27, 2010
Applies to:Oracle Server - Enterprise Edition - Version: 220.127.116.11
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)
4. CURSOR_SHARING on FORCE or SIMILAR.
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
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