Oracle Database Performance Tuning for Beginners
Performance issue is one of the most challenging issues faced by a Databa...
 Get the details of the waits:Find out the details of the wait from v$session_event
set lines 120 trimspool on
col event ...
 Other objects which also provide important information are:V$ACTIVE_SESSION_HISTORY, V$SESSTAT, etc

 These are the oth...
 Check vmstat:vmstat, continuously runs and posts its information. It takes two arguments:
# vmstat <interval> <count>

...
There is much more in Database tuning, but I believe this document shall act as a
good reference document for beginners in...
There is much more in Database tuning, but I believe this document shall act as a
good reference document for beginners in...
Upcoming SlideShare
Loading in...5
×

Database tuning basics

252

Published on

Oracle Performance tuning Basics

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
252
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Database tuning basics"

  1. 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. 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. 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. 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. 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. 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

×