Saturday, August 17, 2024

Top Ten Mistakes Found in Oracle Database Environment

 💢Top Ten Mistakes Found in Oracle Database Environments 

Database Box


Alireza Kamrani 

08/18/2024


The Oracle Performance Improvement Method:

Oracle performance methodology helps you to identify performance problems in an Oracle database. This involves identifying bottlenecks and fixing them. It is recommended that changes be made to a system only after you have confirmed that there is a bottleneck. 

Performance improvement, by its nature, is iterative. 

For this reason, removing the first bottleneck might not lead to performance improvement immediately, because another bottleneck might be revealed. 

Also, in some cases, if serialization points move to a more inefficient sharing mechanism, then performance could degrade. 

With experience, and by following a rigorous method of bottleneck elimination, applications can be debugged and made scalable.

Performance problems generally result from either a lack of throughput, unacceptable user/job response time, or both. The problem might be localized between application modules, or it might be for the entire system.


Important article that you read in this section:


This section lists the most common mistakes found in Oracle databases. 

By following the Oracle performance improvement methodology, you should be able to avoid these mistakes altogether. 

If you find these mistakes in your system, then re-engineer the application where the performance effort is worthwhile.


  1. Bad connection management
    The application connects and disconnects for each database interaction. This problem is common with stateless middleware in application servers. It has over two orders of magnitude impact on performance, and is totally unscalable.
  2. Bad use of cursors and the shared pool
    Not using cursors results in repeated parses. If bind variables are not used, then there is hard parsing of all SQL statements. This has an order of magnitude impact in performance, and it is totally unscalable. Use cursors with bind variables that open the cursor and execute it many times. Be suspicious of applications generating dynamic SQL.
  3. Bad SQL
    Bad SQL is SQL that uses more resources than appropriate for the application requirement. This can be a decision support systems (DSS) query that runs for more than 24 hours, or a query from an online application that takes more than a minute. You should investigate SQL that consumes significant system resources for potential improvement. ADDM identifies high load SQL. SQL Tuning Advisor can provide recommendations for improvement.
  4. Use of nonstandard initialization parameters
    These might have been implemented based on poor advice or incorrect assumptions. Most databases provide acceptable performance using only the set of basic parameters. In particular, parameters associated with SPIN_COUNT on latches and undocumented optimizer features can cause a great deal of problems that can require considerable investigation.
    Likewise, optimizer parameters set in the initialization parameter file can override proven optimal execution plans. For these reasons, schemas, schema statistics, and optimizer settings should be managed as a group to ensure consistency of performance.
  5. Getting database I/O wrong
    Many sites lay out their databases poorly over the available disks. Other sites specify the number of disks incorrectly, because they configure disks by disk space and not I/O bandwidth.
  6. Online redo log setup problems
    Many sites run with too few online redo log files and files that are too small. Small redo log files cause system checkpoints to continuously put a high load on the buffer cache and I/O system. If too few redo log files exist, then the archive cannot keep up, and the database must wait for the archiver to catch up.
  7. Serialization of data blocks in the buffer cache due to lack of free lists, free list groups, transaction slots (INITRANS), or shortage of rollback segments. 
    This is particularly common on INSERT-heavy applications, in applications that have raised the block size above 8K, or in applications with large numbers of active users and few rollback segments. Use automatic segment-space management (ASSM) and automatic undo management to solve this problem.
  8. Long full table scans
    Long full table scans for high-volume or interactive online operations could indicate poor transaction design, missing indexes, or poor SQL optimization. Long table scans, by nature, are I/O intensive and unscalable.
  9. High amounts of recursive (SYS) SQL
    Large amounts of recursive SQL executed by SYS could indicate space management activities, such as extent allocations, taking place. This is unscalable and impacts user response time. Use locally managed tablespaces to reduce recursive SQL due to extent allocation. Recursive SQL executed under another user ID is probably SQL and PL/SQL, and this is not a problem. 
  10. Deployment and migration errors
    In many cases, an application uses too many resources because the schema owning the tables has not been successfully migrated from the development environment or from an older implementation. Examples of this are missing indexes or incorrect statistics. These errors can lead to sub-optimal execution plans and poor interactive user performance and maybe even facing with  'db sequential read or scattered read ' waiting event. When migrating applications of known performance, export the schema statistics to maintain plan stability using the DBMS_STATS package.
    Although these errors are not directly detected by ADDM, ADDM highlights the resulting high load SQL.

Sincerely ,
Alireza Kamrani.

No comments:

Post a Comment

Oracle Standby troubleshooting

 💢 Oracle Standby troubleshooting💢   Written by: Alireza Kamrani In this post I represented an essential methods to evaluating , configuri...