Вы находитесь на странице: 1из 7

98.

What are the different approaches used by Optimizer in


choosing an execution plan ?
Rule-based and Cost-based.
99. What are the factors that affect OPTIMIZER in choosing
an Optimization approach ?
The OPTIMIZER_MODE initialization parameter Statistics in
the Data Dictionary the OPTIMIZER_GOAL
parameter of the ALTER SESSION command hints in the
statement.
100. What are the values that can be specified for
OPTIMIZER MODE Parameter ?
COST and RULE.
101. Will the Optimizer always use COST-based approach if
OPTIMIZER_MODE is set to Cost?
Presence of statistics in the data dictionary for atleast one
of the tables accessed by the SQL
statements is necessary for the OPTIMIZER to use COST-
based approach. Otherwise OPTIMIZER chooses
RULE-based approach.
102. What is the effect of setting the value of
OPTIMIZER_MODE to RULE ?
This value causes the optimizer to choose the rule_based
approach for all SQL statements issued to
the instance regardless of the presence of statistics.
103. What are the values that can be specified for
OPTIMIZER_GOAL parameter of the ALTER SESSION
Command ?
CHOOSE,ALL_ROWS,FIRST_ROWS and RULE.
104. What is the effect of setting the value CHOOSE for
OPTIMIZER_GOAL, parameter of the ALTER
SESSION Command ?
The Optimizer chooses Cost_based approach and optimizes
with the goal of best throughput if
statistics for atleast one of the tables accessed by the SQL
statement exist in the data dictionary.
Otherwise the OPTIMIZER chooses RULE_based approach.
105. What is the effect of setting the value ALL_ROWS for
OPTIMIZER_GOAL parameter of the ALTER
SESSION command ?
This value causes the optimizer to the cost-based approach
for all SQL statements in the session
regardless of the presence of statistics and to optimize with
a goal of best throughput.
106. What is the effect of setting the value FIRST_ROWS
for OPTIMIZER_GOAL parameter of the ALTER
SESSION command ?
This value causes the optimizer to use the cost-based
approach for all SQL statements in the session
regardless of the presence of statistics and to optimize with
a goal of best response time.
107. What is the effect of setting the RULE for
OPTIMIER_GOAL parameter of the ALTER SESSION
Command ?
This value causes the optimizer to choose the rule-based
approach for all SQL statements in a
session regardless of the presence of statistics.
108. What is RULE-based approach to optimization ?
Choosing an executing planbased on the access paths
available and the ranks of these access paths.
109. What is COST-based approach to optimization ?
Considering available access paths and determining the
most efficient execution plan based on
statistics in the data dictionary for the tables accessed by
the statement and their associated
clusters and indexes.
PROGRAMMATIC CONSTRUCTS
110. What are the different types of PL/SQL program units
that can be defined and stored in ORACLE
database ?
Procedures and Functions,Packages and Database Triggers.
111. What is a Procedure ?
A Procedure consist of a set of SQL and PL/SQL statements
that are grouped together as a unit to
solve a specific problem or perform a set of related tasks.
112. What is difference between Procedures and Functions ?
A Function returns a value to the caller where as a
Procedure does not.
113. What is a Package ?
A Package is a collection of related procedures, functions,
variables and other package constructs
together as a unit in the database.
114. What are the advantages of having a Package ?
Increased functionality (for example,global package
variables can be declared and used by any
proecdure in the package) and performance (for example all
objects of the package are parsed
compiled, and loaded into memory once)
115. What is Database Trigger ?
A Database Trigger is procedure (set of SQL and PL/SQL
statements) that is automatically executed as
a result of an insert in,update to, or delete from a table.
116. What are the uses of Database Trigger ?
Database triggers can be used to automatic data generation,
audit data modifications, enforce
complex Integrity constraints, and customize complex
security authorizations.
117. What are the differences between Database Trigger and
Integrity constraints ?
A declarative integrity constraint is a statement about the
database that is always true. A
constraint applies to existing data in the table and any
statement that manipulates the table.
A trigger does not apply to data loaded before the definition
of the trigger, therefore, it does not
guarantee all data in a table conforms to the rules
established by an associated trigger.
A trigger can be used to enforce transitional constraints
where as a declarative integrity
constraint cannot be used.
DATABASE SECURITY
118. What are Roles ?
Roles are named groups of related privileges that are
granted to users or other roles.
119. What are the use of Roles ?
REDUCED GRANTING OF PRIVILEGES Rather than explicitly
granting the same set of privileges to many
users a database administrator can grant the privileges for a
group of related users granted to a
role and then grant only the role to each member of the
group.
DYNAMIC PRIVILEGE MANAGEMENT When the privileges of a
group must change, only the privileges of
the role need to be modified. The security domains of all
users granted the groups role
automatically reflect the changes made to the role.
SELECTIVE AVAILABILITY OF PRIVILEGES The roles granted
to a user can be selectively enable
(available for use) or disabled (not available for use). This
allows specific control of a users
privileges in any given situation.
APPLICATION AWARENESS A database application can be
designed to automatically enable and disable
selective roles when a user attempts to use the application.
120. How to prevent unauthorized use of privileges granted
to a Role ?
By creating a Role with a password.
121. What is default tablespace ?
The Tablespace to contain schema objects created without
specifying a tablespace name.
122. What is Tablespace Quota ?
The collective amount of disk space available to the objects
in a schema on a particular tablespace.
123. What is a profile ?
Each database user is assigned a Profile that specifies
limitations on various system resources
available to the user.
124. What are the system resources that can be controlled
through Profile ?
The number of concurrent sessions the user can establish
the CPU processing time available to the
users session the CPU processing time available to a single
call to ORACLE made by a SQL statement
the amount of logical I/O available to the users session the
amout of logical I/O available to a
single call to ORACLE made by a SQL statement the allowed
amount of idle time for the users session
the allowed amount of connect time for the users session.

Вам также может понравиться