Regarding parse_calls in v$sqlarea [message #203904] |
Thu, 16 November 2006 22:17 |
reena_ch30
Messages: 100 Registered: December 2005
|
Senior Member |
|
|
Here is the sample query:-
select count(*) from emp;
COUNT(*)
----------
15
Now i check v$sqlarea
select address, hash_value, parse_calls,sql_text from v$sql where sql_text like '% count(*) from emp%';
Output:-
ADDRESS HASH_VALUE PARSE_CALLS SQL_TEXT
6657AC34 2099331969 1 select count(*) from emp
I execute the query again and check v$sqlarea
O/p
ADDRESS HASH_VALUE PARSE_CALLS SQL_TEXT
6657AC34 2099331969 2 select count(*) from emp
parse calls are increased by 1. why has it reparsed the query? Shouldn't it use the existing parsed sql? Is there any parameter setting to be done for this? Please help.
Thanks
Reena
|
|
|
|
Re: Regarding parse_calls in v$sqlarea [message #204400 is a reply to message #203904] |
Mon, 20 November 2006 08:05 |
michael_bialik
Messages: 621 Registered: July 2006
|
Senior Member |
|
|
Hi.
In your case Oracle performed so-called SOFT PARSE (search of your statement in shared pool ).
You are probably using sql*plus, so each time you are executing a statement Oracle opens an implicit cursor, fetches a data and closes the cursor. The cursor is freed from session memory, so
the next time it repeats the whole cycle and searches the shared pool for a statement (soft parse).
HTH.
|
|
|