I haven’t had a long parse problem for a while but the last time I did, it
sounds like similar circumstances:
If the SQL is always different (and not different in a way that
FORCE_MATCHING_SIGNATURE accounts for), then I think you’re going to have to
manually hint the code or the view for specific operations or limitations at
least against the problem.
If the SQL is different but only via FORCE_MATCHING_SIGNATURE then a SQL
Profile can be your vehicle to deliver such hints.
SQL Plan Baselines are not much use against long parse problems because they do
the parse anyway. And if your problem SQL is always different, also no use.
From: oracle-l-bounce@xxxxxxxxxxxxx <oracle-l-bounce@xxxxxxxxxxxxx> on behalf
of Lothar Flatz <l.flatz@xxxxxxxxxx>
Sent: Monday, January 17, 2022 12:59:14 PM
To: oracle-l@xxxxxxxxxxxxx <oracle-l@xxxxxxxxxxxxx>
Subject: Long Parse Time for a big Statement
At one customer site we see generated statements, actually reports. The
parsetime for such a statement is over an hour, if it finishes at all.
It is possible we see "ORA-04031:" when we run out of memory in the
How big these statements are is hard to tell, since it depends on
formatting. With sql developer formatting i get in one typical example >
The statements are constructed relatively simple.
It seems to be a kind of change report where columns from different
tables are retrieved.
At the beginning is a big case statement where a meaningful name is
generated for a value followed by this values. I counted 7400 case
entries as per statement in one case.
I addition we have a number of big inlists.
All this is running against a union view of 55 Tables.
In other words: If i want to stress the parser I would construct a
statement exactly like this.
However, one hour seems to be a unrealistically long parse time.
Even though that statement needs to be rewritten, but this will take time.
I want to know if there is any quick fix like increasing the shared pool
a lot. (Which I can't test unfortunately any time soon due lack of memory).
Any ideas how to speed up the parse time?
Database version is 19.7. Shared Pool size is 20GB