Solved

Oracle transaction per day in MB

Posted on 2008-06-20
2
2,692 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
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.

749 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