RE: Long Parse Time for a big Statement

From: Dominic Brooks <dombrooks_at_hotmail.com>
Date: Mon, 17 Jan 2022 13:09:18 +0000
Message-ID: <AS8P193MB1750FAA62DC5C5E54567B8C2A1579_at_AS8P193MB1750.EURP193.PROD.OUTLOOK.COM>



I haven’t had a long parse problem for a while but the last time I did, it sounds like similar circumstances: https://orastory.wordpress.com/2013/04/05/ors-in-lists-and-lnnvl/

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.

https://jonathanlewis.wordpress.com/2013/05/13/parse-time/

Cheers,
Dominic



From: oracle-l-bounce_at_freelists.org <oracle-l-bounce_at_freelists.org> on behalf of Lothar Flatz <l.flatz_at_bluewin.ch> Sent: Monday, January 17, 2022 12:59:14 PM To: oracle-l_at_freelists.org <oracle-l_at_freelists.org> Subject: Long Parse Time for a big Statement

Hi,

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 shared pool.
How big these statements are is hard to tell, since it depends on formatting. With sql developer formatting i get in one typical example > 130000 lines.
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

Thanks

Lothar
--


https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.freelists.org%2Fwebpage%2Foracle-l&amp;data=04%7C01%7C%7C96674485a64d4592ba0a08d9d9b92f94%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637780211666471976%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=CtX9wuajfri7mBfrPqlPpELBoW2cXh5QPpTPDJDwPj0%3D&amp;reserved=0

--

http://www.freelists.org/webpage/oracle-l Received on Mon Jan 17 2022 - 14:09:18 CET

Original text of this message