A parsing call should occur every time a new cursor is created, even if the statement is in the library cache. This is a parsing call that checks the library cache. If the statement is found in the library cache, this is soft parsing.
@DCookie answered your question about checking hard and soft parses. I expect you to find that most parsing sessions are soft showdowns. Note that you should not expect the counters returned from v$sysstat to be very close to the general parsing calls from v$sql , since the former is the count since the instance was started, and the latter just shows the statements that are currently time are in the library cache.
The only way to avoid parsing at all is to keep the handle of the existing cursor and execute it if necessary, binding new values ββwhen necessary. This sometimes happens by caching cursors - this is from your explicit control, although I believe that there are parameters that you can change to affect it. In PL / SQL code, you can explicitly hold the cursors that you create and manipulate using the DBMS_SQL package. I would expect C # to have the appropriate capabilities.
In any case, what you are looking at is probably not a problem. Just because the counts seem high doesn't mean that parsing is a bottleneck in your system.
First of all, you should check if the SQL statements are with these high parses even in your control. When I made a modified version of your request on one of my systems:
select parse_calls, executions, parsing_schema_name,sql_text FROM v$sql ORDER BY parse_calls DESC;
I found that the statements with the most parsing parses were recursive SQL processed by SYS. It may not be for you depending on your use, but there is something to check.
source share