Identifying the parsing of the query (merged by MC) [message #658789] |
Tue, 27 December 2016 05:46 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/ddaec7c9b7a301f4a3bd588d31872015?s=64&d=mm&r=g) |
saipradyumn
Messages: 419 Registered: October 2011 Location: Hyderabad
|
Senior Member |
|
|
Hi All,
How can I know the parsing type of the query. If the same query with different bind variables are executing more than onetime I want to check the weather it is going for HARD/SOFT Parsing
Pleae help me .
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: How to identify the parsing of the query [message #658842 is a reply to message #658841] |
Wed, 28 December 2016 07:41 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68733 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
I gave you 3 (or 4) ways to fix the problem, they are in the order they have to be analyzed/used, why do you pick up the later which is in addition between parentheses which means should be used ONLY when all other ways failed.
First, analyzes the code to be sure they do not ask for parsing.
For instance, be sure the code is like:
prepare
bind
loop
execute
end loop
close
and not
loop
prepare
bind
execute
close
end loop
where "loop" may be procedure calls and not real loop in the code.
Each "prepare" asks for a parse.
Each "close" tells Oracle it can unload the statement from the SGA.
Note that database size is irrelevant.
[Updated on: Wed, 28 December 2016 07:47] Report message to a moderator
|
|
|
|
Re: Identifying the parsing of the query (merged by MC) [message #658875 is a reply to message #658873] |
Thu, 29 December 2016 06:36 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68733 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
You think wrong, you have to first go to 1 and 2. You have no procedure in JDBC? You have no loop? If you always used the same call with the same variables in the same environment then you'd have only 1 version.
You have not so you have to first know why.
Quote:Even though we are using bind variables why are those queries going for hard parse.
Different variable types, different environments, different users and usage of synonyms...
|
|
|