Você está na página 1de 3

04030113333

11i : Applications DBA JInitiator Setup Test [ID 162836.1]

About Oracle Applications DBA Minipack 11i.AD.I [ID 233044.1]

http://www.orafaq.com/wiki/Data_Guard_FAQ

http://www.orafaq.com/wiki/Oracle_database_Backup_and_Recovery_FAQ

OPATCH FAQ [ID 242993.1]

http://www.databasejournal.com/features/oracle/

Question: What are the different Optimizer Options Available


Answer: Oracle supports COST based and RULE based optimizer. With version 8, it is
best to use the cost based optimizer to take advantage of new features like
partition pruning etc.

Question: How to set the Optimizer Mode


Answer: Optimizer Mode is set by changing the init.ora parameter optimizer_mode

To set to rule :
optimizer_mode=rule

to set to cost :
optimizer_mode=cost
and analyze the tables involved````There are actually four values for
OPTIMIZER_MODE: RULE and CHOOSE have already been explained.

The other two are specifically for the CBO: ``FIRST_ROWS will cause the optimizer
to favor an execution plan that will return the first row of information the
fastest, even if it means a longer overall execution time. This is a good choice
for situations such as forms that display one record at a time.``ALL_ROWS will
cause the optimizer to favor an execution plan that will complete in the shortest
amount of time, even if it takes longer to provide an initial response. Use this
setting if you are running something like summary reports.

````Also, note that you can override these settings at the session level with ALTER
SESSION commands and at the statement level with hints.

Question: How does COST based optimizer work


Answer: The Cost Based Optimizer calculates the cost of different execution plans
and then chooses the plan with the lowest cost.

To calculate the cost, the Cost Based


Optimizer uses statistics gathered when tables and/or indexes are analyzed.

So, Analyzing tables is a very important part of COST based Optimization

submitted by: faq

Question: How does the RULE Based optimizer Work


Answer: The RULE Based Optimizer uses a strict set of heuristic rules to determine
the plan.

Question: I have large tables, What is the best Estimate Percentage when Analyzing
Statistics
Answer: In our tests and even in Oracle's documentation, 5% is considered to be
good.

Unless your table is too huge, I would suggest using a 10-20%.

Questions In this Category :


How To Enable sql_trace At The Session Level
How To Enable tracing in a session that is already running
Why is the index not being used in an implicit conversion
Why is my hint being ignored
How can I allow developers to Access Trace Files
All the values in a TKPROF Output are 0

Question: How To Enable sql_trace At The Session Level


Answer: In SQL Plus or an interactive session, use

Alter Session set sql_trace=TRUE;

In PL/SQL use

dbms_session.set_sql_Trace(TRUE);

Question: How To Enable tracing in a session that is already running


Answer: First find the sid and serial number of the process that you want to start
a trace in.

To Enable Trace :

Execute dbms_system.set_sql_trace_in_session(sid, serial#, TRUE);

To Disable

Execute dbms_system.set_sql_trace_in_session(sid, serial#, FALSE);

Question: I have a sql statement that has a index on a char column that stores
numbers. Why is it not using the index when I use the following statement

select * from emp


where char=5;
Answer: When you write a statement like above, the optimizer rewrites it as

select * from emp


where to_number(char) = 5;

So, the function disables the usage of index. Put the 5 in quotes ( '5' )
Question: I have specified a hint in my SQL statement. But the optimizer seems to
ignore it
Answer: If the hint is misspelled or not
specified correctly, the hint is ignored without an error. There is no
way of validating the hint usage without verifying the explain plan.

Question: How can I allow developers to Access Trace Files


Answer: Set the hidden and undocumented init.ora parameter

_TRACE_FILES_PUBLIC=TRUE

to create publicly accessible trace files.

Question: I have just tkprof'ed a trace file and everything seems to be zero. Why?
Answer: You may have forgotten to set init.ora parameter
TIMED_STATISTICS=TRUE;

You can also set it dynamically


alter system set timed_statistics=true;

http://www.dbasupport.com/oracle/faq/Database_Administration/Performance_Tuning/SQL
_Tuning/

Question: what does fixed portion of sga contain?


Answer: The fixed size is the part of the SGA that contains general information
about the state of the database and the instance, which the background processes
use. No user data is stored here.

Question: What is an OPTIMAL parameter and where can I use it?


Answer: OPTIMAL is a size limiting (in bytes) parameter for rollback segments.
After executing a long-running transaction the rollback segment size shrinks back
to this size. So if your system has many long-running transactions you might want
to keep it high to reduce fragmentation and to avoid snapshot too old error. On the
other hand if you have short transactions OPTIMAL should be set to low so that the
rollback segments remain small enough to be cached in memory, thus improving the
system performance.
You can mention the OPTIMAL size for a rollback segment while creating it or you
can alter a rollback segment for a different OPTIMAL size.

http://www.orafaq.com/wiki/Oracle_database_Backup_and_Recovery_FAQ

http://teachmeoracle.com/interview.html
http://www.orafaq.com/wiki/Real_Application_Clusters
http://www.orafaq.com/wiki/Data_Guard_FAQ
http://becomeappsdba.blogspot.com/2006/09/performance-tuning-overview-in-
oracle.html
http://download.oracle.com/docs/cd/B19306_01/server.102/b14211.pdf

Você também pode gostar