db02-st04

13
7/16/2019 DB02-ST04 http://slidepdf.com/reader/full/db02-st04 1/13 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.

Upload: ssvpvr2404

Post on 30-Oct-2015

58 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DB02-ST04

7/16/2019 DB02-ST04

http://slidepdf.com/reader/full/db02-st04 1/13

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.

Page 2: DB02-ST04

7/16/2019 DB02-ST04

http://slidepdf.com/reader/full/db02-st04 2/13

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 a

datafile. The no under the column ‘free’ gives the free space available in the TS. When it is less10GB 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.

Detailed Analysis: We can find the largest table.  

Total maximum autoextensible size (Kbyte)

With Oracle Version 8 you can set datafiles to "autoextensible". These datafiles then increase automatically. This field indwhether the Autoextend function is being used. It can have the values: "AutoExtend off", "Unlimited" (there is no limit to thgrowth of at least one datafile) or a size in KB. This size is the maximum to which a datafile, a tablespace, or the entire dacan increase.

CAUTION: This size is only a logical limit. It cannot be guaranteed that there will be enough space on the disks for the ext

See also: DB02 -> Goto -> Tablespaces -> Dba_Data_Files

You can find more information in the Oracle documentation on the table "dba_data_files", fields "autoextensible", "maxbyt"maxblocks", "increment_by".

Page 3: DB02-ST04

7/16/2019 DB02-ST04

http://slidepdf.com/reader/full/db02-st04 3/13

 Missing Indexes: It gives the missing indexes that were missing in the DB but defined in DD cache. It

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

will be prompted to select  Processing Type. If the table is big and contains more rows,

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 th

amount of space is unavailable in the TS then it becomes a space critical object.

To view indexes on a particular table: SE11

give table name

Display tab

Indexes Tab. 

Page 4: DB02-ST04

7/16/2019 DB02-ST04

http://slidepdf.com/reader/full/db02-st04 4/13

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 deg

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, userprivileges, and other information.

The database server manages the size of the Data Dictionary Cache internally and the size depe

on the size of the Shared Pool in which the Data Dictionary Cache resides. If the size is too small, th

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 datab

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 could

write to redo log buffer as it is getting empty slowly due to slow LGWR process.

Page 5: DB02-ST04

7/16/2019 DB02-ST04

http://slidepdf.com/reader/full/db02-st04 5/13

.

Page 6: DB02-ST04

7/16/2019 DB02-ST04

http://slidepdf.com/reader/full/db02-st04 6/13

4) Go to Detail Analysis Menu.

Buffer Busy Waits:

 

Page 7: DB02-ST04

7/16/2019 DB02-ST04

http://slidepdf.com/reader/full/db02-st04 7/13

Oracle process is waiting for data block, segment header, etc to get into DB buffer from disk.

Such attempts made are under NUMBER column and TIME column gives the time it has waited.

Finally the total average time must be as low as possible.

This happens when DB buffer size is low, no statistical info in library cache for that table or there m

not be proper indexes on that table.

File System Requests:

I/O monitoring is done.

Data file reads and writes is to be checked.

To have a file with high reads/writes clk on that column value and go for SORT button.

When the above times are high then disk is busy.

This happens when the whole data (tablespaces’s) are placed on a single disk.

If we have undo, temp, etc TS’s on different disks we can have less reads and writes.

Click on I/O per path

Observe avg (ms).It should be as low as possible.

Page 8: DB02-ST04

7/16/2019 DB02-ST04

http://slidepdf.com/reader/full/db02-st04 8/13

Wait Events:

Here the busy wait time indicates the time the processes are waiting due to unavailability of resource

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.

Page 9: DB02-ST04

7/16/2019 DB02-ST04

http://slidepdf.com/reader/full/db02-st04 9/13

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.

Sapdata1 datafile1, datafile4

Sapdata2 datafile2, datafile5

Sapdata3 datafile3, datafile6

Page 10: DB02-ST04

7/16/2019 DB02-ST04

http://slidepdf.com/reader/full/db02-st04 10/13

The above screen gives the estimated costs and rows to a table.

These are statistics updated by CBO.

After reading 54 rows of the table the sql stmt couldn’t get any row.

So it goes for entire table scan which makes disk busy.

So go for proper indexes on a table.

Buffer gets/exec

Page 11: DB02-ST04

7/16/2019 DB02-ST04

http://slidepdf.com/reader/full/db02-st04 11/13

Out of 524 executions the stmt could find its related data in the buffer only 3 times for each executio

So remaining times it went for disk.

Low buffer size may cause to disk read.

CPU time/exec:

Time spend in CPU by an SQL stmt.

It shouldn’t be high.

When the SQL stmt is in upper case then it is from buttons, if not, it’s from report by our ABAP

programmer.

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.

Page 12: DB02-ST04

7/16/2019 DB02-ST04

http://slidepdf.com/reader/full/db02-st04 12/13

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.

Page 13: DB02-ST04

7/16/2019 DB02-ST04

http://slidepdf.com/reader/full/db02-st04 13/13

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 

Send to SAP India.

Every Button data is kept in single report.

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.