|
Donald K. Burleson |
Oracle and Expert
Systems Technology
Oracle
- SQL Standards Quiz
Question:
What was listed as a benefit for placing all
SQL in stored procedures? (Choose all that apply)
-
Access security is easier to control with GRANT
EXECUTE
-
SQL will run faster than external SQL
-
SQL can be pinned into the shared pool
-
SQL will automatically optimize itself
Correct Answer:
A, C
Explanation:
The correct answers are A and C. Benefits for
placing SQL in stored procedures include: Access security is easier to
control with GRANT EXECUTE, and SQL can be pinned into the shared pool.
These are two great reasons to place SQL into the shared pool. B is
incorrect because external SQL will run just as fast as stored procedure
SQL. D is incorrect because SQL will never optimize itself without DBA
tuning.
Question:
What was listed as a SQL tuning goal for the
DBA? (Choose all that apply)
-
Eliminate unnecessary hard-coded variables
-
Pin frequently-used SQL into the shared pool
-
Eliminate all GRANT EXECUTE privileges
-
Prevent the use of UNIX SQL*Plus with
product_user_profile
Correct Answer:
A, B
Explanation:
The correct answer are A and B. Two SQL tuning
goals for the DBA include eliminating unnecessary hard-coded variables, and
pinning frequently-used SQL into the shared pool. This is because these
items will radically improve overall database performance. C is incorrect
because GRANT EXECUTE are very useful if stored procedures are used. D is
incorrect because SQL*Plus may be appropriate for SQL developers.
Question:
What was listed as a primary goal for the SQL
developer?
-
To write the SQL as quickly as possible
-
To write the SQL to minimize database I/O
-
To write the SQL inside stored procedures
-
To write the SQL to use host variables
Correct Answer:
A
Explanation:
The correct answer is A. The primary goal for the
SQL developer is to write the SQL as quickly as possible. Most SQL
developers are blissfully unaware of the performance impact of their SQL. B
is incorrect because most SQL developers are not aware of database I/O. C
and D are incorrect because SQL developers are only interested in getting
their coding task finished as quickly as possible.
If you like Oracle tuning, see the book "Oracle
Tuning: The Definitive Reference", with 950 pages of tuning tips and
scripts.
You can buy it direct from the publisher for 30%-off and get instant
access to the code depot of Oracle tuning scripts.
Click here for
more books by Donald K. Burleson.
|