Oracle Performance Tuning Interview Questions

Oracle is one of the most widely used databases in the enterprise world. As organizations increasingly rely on data-driven decision-making and face the challenges of managing large volumes of data, there is a growing demand for professionals who can optimize Oracle database performance. Thorough knowledge of Oracle performance testing features and techniques is a must to outperform in an interview. Explore the following 55 Oracle Performance Testing interview questions that you might encounter during an interview process.

Rating: 4.8

If you're looking for Oracle Performance Tuning Interview Questions for Experienced or Freshers, you are at the right place. There are a lot of opportunities from many reputed companies in the world. According to research, Oracle Performance Tuning has a market share of about 40.3%. So, You still have the opportunity to move ahead in your career in Oracle Performance Tuning Development.

Mindmajix offers Advanced Oracle Performance Tuning Interview Questions 2023 that help you in cracking your interview & acquire a dream career as Oracle Performance Tuning Developer.

Top 10 Frequently Asked Oracle Performance Tuning Interview Questions

  1. What is Performance Tuning?
  2. Types of Optimizers?
  3. How do you collect statistics of a user/schema?
  4. What is an execution plan?
  5. How do you flush the shared pool?
  6. How do you see the trace files?
  7. How do you set up tablespaces during an Oracle installation?
  8. If you see contention for library caches how can you fix it?
  9. What can cause a high value for recursive calls? How can this be fixed?
  10. In a system with an average of 40 concurrent users you get the following from a query on rollback extents?

Oracle Performance Tuning Interview Questions and Answers

1. What is Performance Tuning?

Ans: Making optimal use of the system using existing resources is called performance tuning.

If you would like to become a professional and build a career in this domain, then visit Mindmajix - a global online training platform: Oracle Performance Tuning Training This course will help you to achieve excellence in this domain.

2. What are the different types of Tunings?


  1. CPU Tuning
  2. Memory Tuning
  3. IO Tuning
  4. Application Tuning
  5. Database Tuning

3. What Mainly Database Tuning contains?


  1. Hit Ratios
  2. Wait for Events

4. What is an optimizer?

Ans: Optimizer is a mechanism that will make the execution plan of an SQL statement

5. Types of Optimizers?


  1. RBO(Rule-Based Optimizer)
  2. CBO(Cost Based Optimizer)

MindMajix Youtube Channel

6. Which init parameter is used to make use of Optimizer?

Ans: optimizer_mode= rule—-RBO cost—CBO choose——–First CBO otherwise RBO

7. Which optimizer is the best one?

Ans: CBO


8. What are the pre-requested to make use of Optimizer?


  1. Set the optimizer mode
  2. Collect the statistics of an object

9. How do you collect statistics on a table?

Ans: analyze table emp compute statistics or analyze table emp estimate statistics

10. What is the diff between computing and estimate?

Ans: If you use compute, The FTS will happen, if you use estimate just 10% of the table will be read

11. Data Dictionary follows which optimizer mode?

Ans: RBO

12. How do you delete statistics of an object?

Ans: table emp delete statistics

13. How do you collect statistics of a user/schema?

Ans: exec dbms_stats.gather_schema_stats(Scott)

14. How do you see the statistics of a table?

Ans: select num_rows,blocks,empty_blocks from dba_tables where tab_name=’emp’

15. What are chained rows?

Ans: These are rows, it spans multiple blocks

16. How do you collect statistics of a user in Oracle Apps?

Ans: fnd_stats package

17. How do you know what SQL is currently being used by the session?

Ans: by going v$sql and v$sql_area

18. What is an execution plan?

Ans: It's a road map of how SQL is being executed by oracle DBA?

19. How do you get the index of a table and on which column the index is?

Ans: dba_indexes and dba_ind_columns

20. Which init parameter do you have to set to bypass parsing?

Ans: cursor_sharing=force

21. How do you know which session is running long jobs?

Ans: by going v$session_longops

22. How do you flush the shared pool?

Ans: alter system flush shared_pool

23. How do you get the info about FTS?

Ans: using v$sysstat

24. Where do you get the info on the library cache?

Ans: v$librarycache

25. How do you get the information about a specific session?

Ans: v$mystat

26. How do you see the trace files?

Ans: using tkprof — usage: tkprof allllle.trc llkld.txt

27. Types of hits?

Ans: Buffer hit and library hit

28. Types of wait events?

Ans: CPU time and direct path read

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

Ans: Multiple extents in and of themselves aren’t bad. However, if you also have chained rows this can hurt performance Tuning.

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

Ans: 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.

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

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

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

Ans: 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.

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

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

34. What is the fastest query method for a table?

Ans: Fetch by rowid

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

Ans: A 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.

36. When looking at v$sysstat you see that sorts (disk) are high. Is this bad or good? If bad, how do you correct it?

Ans: 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 is parameter is the SORT_AREA_SIZe parameter.

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

Ans: 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.

38. 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?

Ans: 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.

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

Ans: Hit ratio is a measure of how many times the database was able to read a value from the buffers versus 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 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.

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

Ans: 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 the export and import of the affected table.

41. When looking at the estat events report you see that you are getting busy buffer waits. Is this bad? How can you find what is causing it?

Ans: Buffer busy waits may indicate contention in redo, rollback, or data blocks. You need to check the v$waitstat view to see what areas are causing the problem.

The value of the “count” column tells where the problem is, the “class” column tells you with what. UNDO is rollback segments, DATA is database buffers.

42. If you see contention for library caches how can you fix it?

Ans: Increase the size of the shared pool.

43. If you see statistics that deal with “undo” what are they really talking about?

Ans: Rollback segments and associated structures.

44. If a tablespace has a default pct increase of zero what will this cause (in relationship to the smon process)?

Ans: The SMON process won’t automatically coalesce its free space fragments.

45. If a tablespace shows excessive fragmentation what are some methods to defragment the tablespace? (7.1,7.2 and 7.3 only)

Ans: In Oracle 7.0 to 7.2 The use of the ‘alter session set events ‘immediate trace name coalesce level ts#’;’ command is the easiest way to defragment contiguous free space fragmentation.

The ts# parameter corresponds to the ts# value found in the ts$ SYS table. In version 7.3 the ‘alter tablespace coalesce;’ is best.

If free space isn’t contiguous then exporting, drop and import of the tablespace contents may be the only way to reclaim non-contiguous free space.

46. How can you tell if a tablespace has excessive fragmentation?

Ans: If a selection against the dba_free_space table shows that the count of a tablespaces extents is greater than the count of its data files, then it is fragmented.

47. You see the following on a status report?

Ans: redo log space requests 23
redo log space wait time 0
Is this something to worry about? What if the redo log space wait time is high? How can you fix this?
Since the wait time is zero, no. If wait time was high it might indicate a need for more or larger redo logs.

48. What can cause a high value for recursive calls? How can this be fixed?

Ans: A high value for recursive calls is caused by improper cursor usage, excessive dynamic space management actions, and or excessive statement re-parses.

You need to determine the cause and correct it By either relinking applications to hold cursors, using proper space management techniques (proper storage and sizing) or ensure repeat queries are placed in packages for proper reuse.

49. If you see a pin hit ratio of less than 0.8 in the estat library cache report is this a problem? If so, how do you fix it?

Ans: This indicates that the shared pool may be too small. Increase the shared pool size.

50. If you see the value for reloads is high in the estat library cache report is this a matter of concern?

Ans: Yes, you should strive for zero reloads if possible. If you see excessive reloads then increase the size of the shared pool.

51. You look at the dba_rollback_segs view and see that there is a large number of shrinks and they are of relatively small size, is this a problem? How can it be fixed if it is a problem?

Ans: A large number of small shrinks indicates a need to increase the size of the rollback segment extents. Ideally, you should have no shrinks or a small number of large shrinks.

To fix this just increase the size of the extents and adjust optimal accordingly.

52. You look at the dba_rollback_segs view and see that you have a large number of wraps is this a problem?

Ans: A large number of wraps indicates that your extent size for your rollback segments is probably too small.

Increase the size of your extents to reduce the number of wraps. You can look at the average transaction size in the same view to get the information on transaction size.

53. In a system with an average of 40 concurrent users you get the following from a query on rollback extents?


——————— ————————–

  • R01 11
  • R02 8
  • R03 12
  • R04 9
  • SYSTEM 4

54. You have room for each to grow by 20 more extents each. Is there a problem? Should you take any action?

Ans: No there is no problem. You have 40 extents showing and an average of 40 concurrent users. Since there is plenty of room to grow no action is needed.

55. You see multiple extents in the temporary tablespace. Is this a problem?

Ans: As long as they are all the same size this isn’t a problem. In fact, it can even improve performance since Oracle won’t have to create a new extent when a user needs one.

Join our newsletter

Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!

Course Schedule
Oracle Performance Tuning TrainingDec 02 to Dec 17View Details
Oracle Performance Tuning TrainingDec 05 to Dec 20View Details
Oracle Performance Tuning TrainingDec 09 to Dec 24View Details
Oracle Performance Tuning TrainingDec 12 to Dec 27View Details
Last updated: 06 Jun 2023
About Author

Ravindra Savaram is a Technical Lead at His passion lies in writing articles on the most popular IT platforms including Machine learning, DevOps, Data Science, Artificial Intelligence, RPA, Deep Learning, and so on. You can stay up to date on all these technologies by following him on LinkedIn and Twitter.

read more
Recommended Courses

1 / 15