Oracle 面试宝典 - 4

1. A tablespace has a table with 30 extents in it. Is this bad? Why or why not.

Multiple extents in and of themselves aren?t bad. However if you also have chained rows this can hurt performance.

2. How do you set up tablespaces during an Oracle installation?

You should always attempt to use the Oracle Flexible Architecture standard or another partitioning scheme to ensure proper separation of SYSTEM, ROLLBACK, REDO LOG, DATA, TEMPORARY and INDEX segments.

3. You see multiple fragments in the SYSTEM tablespace, what should you check first?

Ensure that users don?t have the SYSTEM tablespace as their TEMPORARY or DEFAULT tablespace assignment by checking the DBA_USERS view.

4. What are some indications that you need to increase the SHARED_POOL_SIZE parameter?

Poor data dictionary or library cache hit ratios, getting error ORA-04031. Another indication is steadily decreasing performance with all other tuning parameters the same.

5. What is the general guideline for sizing db_block_size and db_multi_block_read for an application that does many full table scans?

Oracle almost always reads in 64k chunks. The two should have a product equal to 64 or a multiple of 64.

6. What is the fastest query method for a table

Fetch by rowid

7. Explain the use of TKPROF? What initialization parameter should be turned on to get full TKPROF output?

The tkprof tool is a tuning tool used to determine cpu and execution times for SQL statements. You use it by first setting timed_statistics to true in the initialization file and then turning on tracing for either the entire database via the sql_trace parameter or for the session using the ALTER SESSION command. Once the trace file is generated you run the tkprof tool against the trace file and then look at the output from the tkprof tool. This can also be used to generate explain plan output.

8. When looking at v$sysstat you see that sorts (disk) is high. Is this bad or good? If bad -How do you correct it?

If you get excessive disk sorts this is bad. This indicates you need to tune the sort area parameters in the initialization files. The major sort are parameter is the SORT_AREA_SIZe parameter.

9. When should you increase copy latches? What parameters control copy latches

When you get excessive contention for the copy latches as shown by the "redo copy" latch hit ratio. You can increase copy latches via the initialization parameter LOG_SIMULTANEOUS_COPIES to twice the number of CPUs on your system.

10. Where can you get a list of all initialization parameters for your instance? How about an indication if they are default settings or have been changed

You can look in the init.ora file for an indication of manually set parameters. For all parameters, their value and whether or not the current value is the default value, look in the v$parameter view.

11. Describe hit ratio as it pertains to the database buffers. What is the difference between instantaneous and cumulative hit ratio and which should be used for tuning

The hit ratio is a measure of how many times the database was able to read a value from the buffers verses how many times it had to re-read a data value from the disks. A value greater than 80-90% is good, less could indicate problems. If you simply take the ratio of existing parameters this will be a cumulative value since the database started. If you do a comparison between pairs of readings based on some arbitrary time span, this is the instantaneous ratio for that time span. Generally speaking an instantaneous reading gives more valuable data since it will tell you what your instance is doing for the time it was generated over.

12. Discuss row chaining, how does it happen? How can you reduce it? How do you correct it

Row chaining occurs when a VARCHAR2 value is updated and the length of the new value is longer than the old value and won?t fit in the remaining block space. This results in the row chaining to another block. It can be reduced by setting the storage parameters on the table to appropriate values. It can be corrected by export and import of the effected table.

From:http://www.orafaq.com/wiki/Interview_Questions

时间: 2024-09-30 07:10:05

Oracle 面试宝典 - 4的相关文章

Oracle 面试宝典 - 3

1. Describe the difference between a procedure, function and anonymous pl/sql block.  Candidate should mention use of DECLARE statement, a function must return a value while a procedure doesn't have to. 2. What is a mutating table error and how can y

Oracle 面试宝典 - 1

1. Explain the difference between a hot backup and a cold backup and the benefits associated with each. A hot backup is basically taking a backup of the database while it is still up and running and it must be in archive log mode. A cold backup is ta

Oracle 面试宝典 - 5

1. Give one method for transferring a table from one schema to another: There are several possible methods, export-import, CREATE TABLE... AS SELECT, or COPY. 2. What is the purpose of the IMPORT option IGNORE? What is it?s default setting The IMPORT

Oracle 面试宝典 - 2

1. How would you determine the time zone under which a database was operating? SELECT dbtimezone FROM DUAL; 2. Explain the use of setting GLOBAL_NAMES equal to TRUE. It ensure the use of consistent naming conventions for databases and links in a netw

Oracle 面试宝典 - 6

1. How can variables be passed to a SQL routine By use of the & symbol. For passing in variables the numbers 1-8 can be used (&1, &2,...,&8) to pass the values after the command into the SQLPLUS session. To be prompted for a specific varia

Oracle 面试宝典 - 7

1. What is a CO-RELATED SUBQUERY A CO-RELATED SUBQUERY is one that has a correlation name as table or view designator in the FROM clause of the outer query and the same correlation name as a qualifier of a search condition in the WHERE clause of the

Oracle 面试宝典 - 8

1. What is a pseudo column. Give some examples It is a column that is not an actual column in the table. eg USER, UID, SYSDATE, ROWNUM, ROWID, NULL, AND LEVEL. Suppose customer table is there having different columns like customer no, payments.What w

Oracle 面试宝典 - General Questions

转自 http://www.orafaq.com/wiki/Interview_Questions Tell us about yourself/ your background. What are the three major characteristics that you bring to the job market? What motivates you to do a good job? What two or three things are most important to

Java面试宝典2013版(超长版)

一. Java基础部分......................................................................................................2 1.一个".java"源文件里能否够包含多个类(不是内部类)?有什么限制?.....2 2.Java有没有goto?........................................................................