Professional Documents
Culture Documents
DBO2: Database Performance: Tables and Indexes.
DBO2: Database Performance: Tables and Indexes.
DBO2: Database Performance: Tables and Indexes.
DATABASE SYSTEM:
It gives the database type, SID, date of analysis.
To view the updated screen, press REFRESH tab, and go for perform database checks.
TABLESPACE
We can have total DB size and available free space.
Current Sizes:
Observe the used (%) column. It gives the used space of TS. When it is above 90% we have to add a
datafile. The no under the column ‘free’ gives the free space available in the TS. When it is less than
10GB we have to add datafile.
The general datafile size is around 2GB. At OS level oracle/sid/sapdata1 is the path.
The default no of datafiles is 254. In init.ora parameter is db_files to change the no.
CAUTION: This size is only a logical limit. It cannot be guaranteed that there will be enough space on the disks for the extension.
You can find more information in the Oracle documentation on the table "dba_data_files", fields "autoextensible", "maxbytes",
"maxblocks", "increment_by".
Missing Indexes: It gives the missing indexes that were missing in the DB but defined in DD cache. It also
gives the unknown indexes that are unknown to the DD cache but existed in the table.
Select the missing index by clicking on the index name. Now click on the button. You
will be prompted to select Processing Type. If the table is big and contains more rows, select
background. If the table is small, select Online.
Space Critical Objects: When an object is trying to pick up space equal to Next Extent and when that
amount of space is unavailable in the TS then it becomes a space critical object.
To view indexes on a particular table: SE11give table name Display tab Indexes Tab.
ST04:
1) Database Buffer: It is part of SGA where the actual data blocks retrieved from DB is stored.
Here the quality of the buffer should be above 95%, such that the system performance doesn’t degrade.
It may be due to DB buffer low size,
Corrupted Indexes on a table,
DB statistics not running properly,
I/O Expensive SQL stmt.(SELECT,UPDATE,DELETE)
For this we have to increase the DB buffer size by increasing the value for DB_CACHE_SIZE in
init<sid>.ora.
Reads: Gives the total no of buffer and disk reads.
Physical Reads: Gives the total no of disk reads. This should as low as possible.
Due to Low size of DB buffer dbms will go to disk for the required data.
May be DBWR is not working properly.
For this we have to increase the size of DB buffer.
2) Shared Pool: It is also a part of SGA which is having Data Dictionary Cache and Library Cache.
Data Dictionary Cache includes user account information, datafile names, table descriptions, user
privileges, and other information.
The database server manages the size of the Data Dictionary Cache internally and the size depends
on the size of the Shared Pool in which the Data Dictionary Cache resides. If the size is too small, then
the data dictionary tables that reside on disk must be queried often for information and this will slow
down performance
DD cache quality should be > 90%. < 90% could indicate that the Shared Pool is too small.
3) Redo Log Buffer: The Redo Log Buffer memory object stores images of all changes made to database
blocks. Changes include insert, update, delete, create, alter, or drop.
Allocation Fault Rate should always be Zero. Allocation Fault gives the no of times the changes couldn’t
write to redo log buffer as it is getting empty slowly due to slow LGWR process.
.
4) Go to Detail Analysis Menu.
Here the busy wait time indicates the time the processes are waiting due to unavailability of resources like
empty online redo log file (or small online redo log files) for LGWR. This may cause to hang DB.
So LGWR, DBWR, ARC0 shouldn’t have high wait times.
SQL request:
Here we find a sql statement which is expensive by comparing with other sql statements.
Disk reads: When the data is not in buffer then oracle will go for disk.
Disk reads are high due to improper statistic updates,
Table not having proper indexes.(ask ABAP’ers to assign Indexes)
Datafile segregation into different volumes reduces disk reads.
For this proper disk planning is to be done as shown below.
Buffer gets/exec
Out of 524 executions the stmt could find its related data in the buffer only 3 times for each execution.
So remaining times it went for disk.
Low buffer size may cause to disk read.
CPU time/exec:
TABLE ACCESS: We need to analyze more on the user tables’ i.e. organizational defined tables and
indexes Hit ratio should be observed. If it high then it is from buffer, if not it is from disk.
To keep table in a buffer as fixed (pinning into buffer)
SE11table namedisplaytechnical settings (buffering type) generic area buffered.
PERFORM DATABASE.
How to check the buffer quality of previous day?
Sol) Just click on perform database.
DISPLAY V$VALUES:
V$recover_file TO know whether systems needs recovery or not.
Check ONLINE column: When it is displayed as RECOVERED, go for recovery.
SUMMARY REPORT:
It gives you the whole summary of the database, the following are the contents of the summary.
Performance:
1 Performance Summary
2 Wait Events
3 File I/O Statistics
State on Disk:
4 Tablespaces: Storage check
5 Tablespaces: Critical Objects
6 Tablespace status
7 Missing indices
8 Database tables without unique Index
9 Extents of Tables and Indices
10 Database Backup
Database Message Log will give all alerts and messages regarding DB actions.
Oracle/sid/saptrace/background is the OS path for alert. log.
Parameter Changes: u can view init<sid>.ora
Oracle/sid/920_64/database is the OS path for init<sid>.ora.