Solved

how evaluate performance database in oracle 10gr2

Posted on 2007-12-05
6
369 Views
Last Modified: 2013-12-18
i need yto konw, what process and what sql is more stronger in any moment in a database 10gr2, because in some moments it's very low, but i dont know the problem is memory, cpu, or I-O

Regards

Gerid Garcia
0
Comment
Question by:yerai
  • 3
6 Comments
 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
ID: 20415029
use statspack or, if you've paid for the option,  workload repository.

and look at top sql in between two snapshots.


if you want something realtime, you can query v$sesstat yourself

SELECT   s.SID, sn.NAME,
         TO_CHAR(ss.VALUE * (SELECT TO_NUMBER(VALUE)
                               FROM v$parameter
                              WHERE NAME = 'db_block_size'), '999,999,999,999') bytes_written,
         s.username, s.osuser, s.machine, s.terminal, s.program, to_char(s.logon_time,'yyyy-mm-dd hh24:mi:ss') logon_time
    FROM v$sesstat ss, v$statname sn, v$session s
   WHERE sn.NAME IN('physical writes')
     AND ss.statistic# = sn.statistic#
     AND ss.SID = s.SID
     AND s.USER# > 0
ORDER BY VALUE DESC

change the "IN clause"  to be whatever statistics you're interested in.
note, some stats are "right now" and some stats are cumulative since log in.  So a lightweight process that has been connected for several months might have very high physical write numbers.   So you have to examine each and determine which ones really are the top resource hogs



0
 

Author Comment

by:yerai
ID: 20419078
how it's best practice where i need to read records and after delete every 30 seconds
0
 
LVL 73

Expert Comment

by:sdstuber
ID: 20419118
Do you need to do anything with the records after you read them and before you delete them?  Or are you reading them just to do the delete?

If possible, do the processing in one SQL and the delete in another SQL.

If it's a read just to do the delete, then delete in one sql and done.


For the 30 second timing, I would create a dbms_job with an interval of 'sysdate + 30/86400'


Can you show an outline of what you're currently doing?  Or some code/pseudo-code of your process?

0
 
LVL 73

Expert Comment

by:sdstuber
ID: 20419512
You've asked this question twice now.

Something else to consider...  How and why is the table getting loaded?  Would it be feasible to declare the table a global temporary and load and processes the data for whatever purposes it has and then simply let the data disappear when the session/transaction ends?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Oracle Syntax 8 56
case statement in where clause with not exist 15 46
How can I rollback insert statements after commit in oracle? 7 61
join 2 views with 5 conditions 3 44
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now