Database tuning basics
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Database tuning basics

on

  • 301 views

Oracle Performance tuning Basics

Oracle Performance tuning Basics

Statistics

Views

Total Views
301
Views on SlideShare
301
Embed Views
0

Actions

Likes
0
Downloads
11
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Database tuning basics Document Transcript

  • 1. Oracle Database Performance Tuning for Beginners Performance issue is one of the most challenging issues faced by a Database Administrator Everyday. I am providing the basic steps how to get started with the situation when our users start complaining about the Database running slow.  TOP Command:This command provides an ongoing look at processor activity in real time. Check for the Oracle processes which are consuming maximum CPU.  Get the SID from PID:You may use this query to find the sid from the pid of the process. This query is simple, you may customize your own query using the objects v$session and v$process. select sid from v$session s, v$process p where p.spid = <process Id> and s.paddr = p.addr;
  • 2.  Get the details of the waits:Find out the details of the wait from v$session_event set lines 120 trimspool on col event head "Waited for" format a30 col total_waits head "Total|Waits" format 999,999 col tw_ms head "Waited|for (ms)" format 999,999.99 col aw_ms head "Average|Wait (ms)" format 999,999.99 col mw_ms head "Max|Wait (ms)" format 999,999.99 select event, total_waits, time_waited*10 tw_ms, average_wait*10 aw_ms, max_wait*10 mw_ms from v$session_event where sid = 2844; ---<put your SID>  Output shall be like:-
  • 3.  Other objects which also provide important information are:V$ACTIVE_SESSION_HISTORY, V$SESSTAT, etc  These are the other OS commands which provide useful statistics.  Check iostat:The iostat command gives the performance metrics of the storage interfaces.  Check ipcs:When a process runs, it grabs from the “shared memory”. There could be one or many shared memory segments by this process. The processes send messages to each other (“inter-process communication”, or IPC) and use semaphores. To display information about shared memory segments, IPC message queues, and semaphores, you can use a single command: ipcs.
  • 4.  Check vmstat:vmstat, continuously runs and posts its information. It takes two arguments: # vmstat <interval> <count>  Check free:One common question is, “How much memory is being used by my applications and various server, user, and system processes?” Or, “How much memory is free right now?” If the memory used by the running processes is more than the available RAM, the processes are moved to swap. So an ancillary question is, “How much swap is being used?” The free command answers all those questions. What’s more, a very useful option, – m, and shows free memory in megabytes:-
  • 5. There is much more in Database tuning, but I believe this document shall act as a good reference document for beginners in Oracle Database tuning. Author – Akash Pramanik. Database Administrator – IBM Mail – akash007.pramanik@gmail.com Phone – +91 9804944189 Follow – http://akashpramanik.blogspot.in
  • 6. There is much more in Database tuning, but I believe this document shall act as a good reference document for beginners in Oracle Database tuning. Author – Akash Pramanik. Database Administrator – IBM Mail – akash007.pramanik@gmail.com Phone – +91 9804944189 Follow – http://akashpramanik.blogspot.in