Which two tasks are performed during the optimization stage of a SQL statement?
A.
Evaluating the expressions and conditions in the query
B.
Checking the syntax and analyzing the semantics of the statement
C.
Separating the clauses of the SQL statement into structures that can be processed
D.
Inspecting the integrity constraints and optimizing the query based on this metadata
E.
Gathering the statistics before creating the execution plan for the statement
Explanation:
Note:
* Oracle SQL is parsed before execution, and a hard parse includes these steps:
*
The parsing process performs two main functions:
o Syntax Check: is the statement a valid one. Does it make sense given the SQL grammardocumented in the SQL Reference Manual. Does it follow all of the rules for SQL.
o Semantic Analysis: 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 ? for example if there are two tables T1 and T2 and both have a column X, the
query ?select X from T1, T2 where ?? is ambiguous, we don?t know which table to get X
from. And so on.
So, you can think of parsing as basically a two step process, that of a syntax check to
check the validity of the statement and that of a semantic check ? to ensure the
statement can execute properly.
Reference: Oracle hard-parse vs. soft parse
A & D
A and D should be correct.
Agree, A and D are correct
http://docs.oracle.com/cd/E25054_01/server.1111/e16638/optimops.htm#PFGRF001
According to Ask Tom it’s “D” and “E”
Ref:
https://asktom.oracle.com/pls/apex/f?p=100:11:::NO:RP:P11_QUESTION_ID:8178542300346439736
this is why i look at the dump before exam, even mighty tom is not sure about some questions 🙂