Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

When to use hard parse or soft parse?


Asked by Dominik Giles on Dec 09, 2021 FAQ



A general high "parse call" (> 10/sec.) indicates that your system has many incoming unique SQL statements, or that your SQL is not reentrant (i.e. not using bind variables). A hard parse is when your SQL must be re-loaded into the shared pool.
Also Know,
Concept• Look at the first step, a soft parse does not require a shared pool reload and associated RAM memory allocation, while a hard parse requires all this.• Excessive Hard Parsing can occur when – Shared pool size is too small – (or) Query has non-reusable SQL statements without host variable• This is...
Subsequently, Excessive hard parsing can occur when your shared_pool_size is too small (and reentrant SQL is paged out), or when you have non-reusable SQL statements without host variables. If a session executes an SQL statement that does not exist in the shared pool, then Oracle has to do a hard parse.
Also,
Soft parse. If a session executes an SQL statement that exists in the shared pool and there is a version of the statement that can be used, then this is refered to as a soft parse .
In fact,
The number of soft parses can be determined by subtracting the hard parse from the total parse. A parse failure is related to the “ORA-00942: table or view does not exist” error or out of shared memory. Discover the current sessions that perform a lot of hard parses: