Oracle Performance
Oracle Performance
Oracle Performance
Analyze the data requirements of your application by following this basic proced
ure:
Collect data.
Interview people to learn about the business, the nature of the application, who
uses information and how, and the expectations of end users. Collect business d
ocuments personnel forms, invoice forms, order forms, and so on to learn how the bus
iness uses information.
Analyze the collected data.
This bottom-up process includes normalization of the data, entity-relationship m
odeling, and transaction analysis.
Do a functional analysis of the data.
The end result of this top-down process is a data flow diagram that identifies t
he main process blocks and how data flows into and out of them over its life tim
e.
2.1.1.2 Create the Database Design for the Application
Create the database design by following this basic procedure:
Create the logical design.
Translate the logical design into the physical design.
Topics:
Create the Logical Design
Create the Physical Design
See Also:
Oracle Database Performance Tuning Guide for more information about designing an
d developing for performance
2.1.1.2.1 Create the Logical Design
The logical design is a graphical representation of the database. The logical de
sign models both relationships between database objects and transaction activity
of the application. Effective logical design considers the requirements of diff
erent users who must own, access, and update data.
To model relationships between database objects:
Translate the data requirements into data items (columns).
Group related columns into tables.
Map relationships among columns and tables, determining primary and foreign key
attributes for each table.
Normalize the tables to minimize redundancy and dependency.
To model transaction activity:
Know the most common transactions and those that users consider most important.
Trace transaction paths through the logical model.
Prototype transactions in SQL and develop a volume table that indicates the size
of your database.
Determine which tables are accessed by which users in which sequences, which tra
on-going tasks for the database administrator, the application developer, and t
he system administrator, respectively. The resources that the business allocates
to maintenance depend on the importance of the database and the database applic
ation, its growth potential, the need to accommodate more users, and so on.
If you are responsible for maintenance, you must periodically monitor the system
, schedule maintenance periods, and inform users of upcoming maintenance periods
. If maintenance periods require down time, schedule them for periods with littl
e or no database activity.
Application maintenance includes fixing bugs, applying patches, and releasing up
grades. Test maintenance work in a test environment to catch and resolve any bef
ore implemented it on production systems.
2.1.2 Setting Performance Goals (Metrics)
Start your application development project by setting performance goals (metrics
), including:
Expected number of application users
Expected number of transactions per second at peak load times
Expected query response times at peak load times
Expected number of records for each table per unit of time (such as one day, one
month, or one year)
Use these metrics to create benchmark tests.
2.1.3 Benchmarking Your Application
Benchmarks are tests that measure aspects of application performance. Benchmark
results either validate application design or raise issues that you can resolve
before putting the application into production.
Usually, you first run benchmarks on an isolated single-user system to minimize
interference from other factors. Results from such benchmarks provide a performa
nce baseline for the application. For meaningful benchmark results, you must tes
t the application in the environment where you expect it to run.
You can create small benchmarks that measure performance of the most important t
ransactions, compare different solutions to performance problems, and help resol
ve design issues that could affect performance.
You must develop much larger, more complex benchmarks to measure application per
formance during peak user loads, peak transaction loads, or both. Such benchmark
s are especially important if you expect the user or transaction load to increas
e over time. You must budget and plan for such benchmarks.
After the application is in production, run benchmarks regularly in the producti
on environment and store their results in a database table. After each benchmark
run, compare the previous and new records for transactions that cannot afford p
erformance degradation. Using this method, you isolate issues as they arise. If
you wait until users complain about performance, you might be unable to determin
e when the problem started.
See Also:
Oracle Database Performance Tuning Guide for more information about benchmarking
applications
2.2 Tools for Performance
Topics:
Several tools that report runtime performance information about your application
are:
DBMS_APPLICATION_INFO Package
SQL Trace Facility (SQL_TRACE)
EXPLAIN PLAN Statement
See Also:
Oracle Database Testing Guide for more information about tools for tuning the da
tabase
2.2.1 DBMS_APPLICATION_INFO Package
Use the DBMS_APPLICATION_INFO package with the SQL Trace facility (described in
Section 2.2.2) and Oracle Trace and to record the names of executing modules or
transactions in the database. System administrators and performance tuning speci
alists can use this recorded information to track the performance of individual
modules and for debugging. System administrators can also use this information t
o track resource use by module.
When you register the application with the database, its name and actions are re
corded in the views V$SESSION and V$SQLAREA.
The DBMS_APPLICATION_INFO package provides subprograms that set the following co
lumns in the V$SESSION view:
MODULE (name of application or package)
ACTION (name of transaction or packaged subprogram)
CLIENT_INFO (additional information about the client application, such as initia
l bind variable values for the current session)
The DBMS_APPLICATION_INFO package also provides subprograms that return informat
ion from the preceding V$SESSION columns for the current session.