Solved

Oracle transaction per day in MB

Posted on 2008-06-20
2
2,569 Views
Last Modified: 2008-06-29
Hi all,

Recently I need to generate a report by showing the transaction size in MB per day. Anyone can let me know how to interprete the statspack report below? Is it possible that I can calculate the transaction size in MB per day based on redo size per second? Please advice. Thanks.

Load Profile
~~~~~~~~~~~~                            Per Second       Per Transaction
                                   ---------------       ---------------
                  Redo size:             32,025.02             13,022.66
              Logical reads:              3,873.07              1,574.95
              Block changes:                177.77                 72.29
             Physical reads:                837.19                340.44
            Physical writes:                 11.30                  4.60
                 User calls:                175.73                 71.46
                     Parses:                162.81                 66.21
                Hard parses:                  3.84                  1.56
                      Sorts:                147.53                 59.99
                     Logons:                  0.31                  0.13
                   Executes:                221.90                 90.23
               Transactions:                  2.46

  % Blocks changed per Read:    4.59    Recursive Call %:     80.60
 Rollback per transaction %:   10.74       Rows per Sort:      1.51


Regards,
chewlf
0
Comment
Question by:chewlf
2 Comments
 
LVL 22

Expert Comment

by:DrSQL
ID: 21833476
chewlf,
    My guess is no.  While I don't know the reason behind your request and I don't know what YOU mean by "transaction" there are several problems with using redo statistics.  Here are a few:

1) More than just your application transactions are protected by the redo log.  Oracle's normal operations (changes to dictionary, status, etc.) are also logged.
2) Rollbacks (UNDO) are also logged in order to allow for recover, flashback, etc.  This overhead is duplicative and, again, may be for Oracle and not for your transactions.
3) If you have anything with NOLOGGING - that's what this turns off - the REDO log.  So tables that are part of your "transaction" and are nologging won't be included (directly) in the redo stats.

If you just want a straight MB based assessment of the impact of your transactions on a daily basis, then I'd suggest using the DBA_SEGMENTS table.  If you collected (in a batch job) the amount of "used" space by your applicaiton tables on a daily basis, you should be able to track their growth (and thus your transaction's storage rate).

Good luck!
0
 
LVL 7

Accepted Solution

by:
Dauhee earned 125 total points
ID: 21837848
The following will give you the amount of logs generated per day and multiplies out by redo size. So in essense you get "Oracle transaction per day in MB"


SELECT  to_char(first_time, 'dd-mm-yyyy') "Date",
        count(*) * (Select
       distinct bytes / 1024 / 1024
from sys.v_$log) "Megs_Tran"    
FROM    V$log_history
where first_time > trunc(sysdate - 3)
group by to_char(first_time, 'dd-mm-yyyy')
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

744 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

11 Experts available now in Live!

Get 1:1 Help Now