?
Solved

how evaluate performance database in oracle 10gr2

Posted on 2007-12-05
6
Medium Priority
?
374 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
6 Comments
 
LVL 74

Accepted Solution

by:
sdstuber earned 2000 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 74

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 74

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

765 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