Link to home
Start Free TrialLog in
Avatar of sakthikumar
sakthikumar

asked on

Optimization and Soft parse?

Dear Experts,

I am seeing different anwers for Soft parse,

If the query is already available in library cache, a new plan will be created or any previously created plan for the same sql will be used.
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

A soft parse is recorded when the Oracle Server checks the shared pool for a SQL statement and finds a version of the statement that it can reuse.
http://docs.oracle.com/cd/B16240_01/doc/doc.102/e16282/oracle_database_help/oracle_database_instance_throughput_softparse_pct.html
Avatar of sakthikumar
sakthikumar

ASKER

This is fine, You know there are many steps in processing the sqls before result is given to client.
like semantic checks , syntactic checks, plan generation .. etc.,

which of these will be eliminated for a soft parse?
the steps you mention are those involved in a hard parse.

soft parse, as noted in the first post, is the act of looking of a previously hard parsed statement and using that plan (which means the semantic checks, syntax checks, plan generation, etc have already been completed)  so all of them will be eliminated in a hard parse

soft parse is a lightweight operation, but still non-zero resource consumption.
There is still some parsing done, e.g. to eliminate changed literals. E.g.
   select * from tbl1 where a = '1';
and
   select * from tbl1 where a = '2';
can still use the same plan. An exact comparison would not find a match. But that part is tried to a low level degree only, otherwise the effort needed would be near having to perform a hard parse (with cached meta data).
ASKER CERTIFIED SOLUTION
Avatar of monoceros
monoceros

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial