SQL statement is parsed in a sequence of steps.
Syntax Check: is
the statement a valid one? Does it make sense given the SQL grammar documented
in the SQL Reference Manual. Does it follow all of the rules for SQL.
Semantic Check: Going
beyond the syntax ? is the statement valid in light of the objects in the
database (do the tables and columns referenced exist). Do you have access to
the objects ? are the proper privileges in place? Are there ambiguities in the
statement ?
The next step in the parse operation is
to see if the statement we are currently parsing has already in fact been
processed by some other session. If it has ? we may be in luck here, we can
skip the next two steps in the process. If we can skip these next two steps in
the process, we have done what is known as a Soft Parse.
If we cannot, if we must do all of the
steps, we are performing what is known as a Hard Parse.
Below are only done during Hard
Parsing:
Transformation: Oracle
will transform complex SQL into simpler, equivalent forms
Optimization: Oracle
then creates an execution plan, based on your schema statistics Oracle
build
the decision tree of costs during this period, choosing the path with the
lowest perceived cost.
Comments
Post a Comment