Solved

How much new changes are generated daily in a database.

Posted on 2013-11-06
9
330 Views
Last Modified: 2013-11-11
Hi,

  I wanted to confirm if the correct way to know the amount of changes that are made daily on database can be done by checking the amount of archive logs are generated daily.  

  Is that a correct way ? , if the database created 10G of archive logs files, we can say that changes daily are about 10G ?

Regards,

  Joe Echavarría -
0
Comment
Question by:joe_echavarria
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 73

Expert Comment

by:sdstuber
ID: 39628194
No.

for example...

begin
for i in 1..100000000 loop
insert into my_table(x) values(1,2,3);
delete my_table;
commit;
end loop;
end;


Changes for the day 0  (we deleted everything we inserted)
Logs will have 100million inserts and 100 million deletes

Also note, archive logs contain statements not just data and will have other, system related operations in them as well, so they don't reflect just your application activity.
0
 
LVL 73

Expert Comment

by:sdstuber
ID: 39628195
another thing to think about -  what are you considering a "change" and what is it you're hoping to measure in them?
0
 
LVL 22

Expert Comment

by:Steve Wales
ID: 39628288
Without a clear statement of what you're trying to accomplish / why  you need the data, it's hard to give you a good answer.

If you're trying to measure growth to forecast disk needs, for example, you could capture freespace in your tablespaces daily in a table and analyze that data each month to see how much your objects are growing.

Not perfect, but for my particular needs (the data is always growing, there's rarely any sustained deletes), it lets me see how much data expands each month and let's me know when I might need to provision more disk etc.

Your needs may vary.
0
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.

 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
ID: 39628297
also consider the reverse of the above.


Lets say you have a table with a billion rows in it.

delete that_table;

your archive log will be small.  The amount of data change will be big.
0
 
LVL 1

Author Comment

by:joe_echavarria
ID: 39628301
Good point @sdstuber.

 I want to know how big a differential backup will take according to the daily changes in the database ( delete/update/insert ).

  So changes could be ( delete/update/insert )
0
 
LVL 1

Author Comment

by:joe_echavarria
ID: 39628330
Ok, now i understand.   With archive logs we can not mesasure the amount of data because of the example u gave.
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 39629537
something else ... with zero changes and lots of archive logs

begin
  savepoint a;
    for i in 1..100 loop
      update table set a = a+1;
    end;
  rollback to a;
end;

Open in new window


anything that gets changed in a database produces archivelogs
even when it's rolled back afterwards
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 39629562
to have an idea of how many rows are changed, check the table
select * from DBA_TAB_MODIFICATIONS;

that table is used for gathering statistics when enough changes were doen
0
 
LVL 73

Expert Comment

by:sdstuber
ID: 39630077
if you use dba_tab_modifications - make sure you have monitoring turned on for every table.  And, remember to purge the results so you can get a fresh count, or, store the results so you can compare to previous totals to derive a new count.
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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
dates - loop 12 66
How to connect SQL Server from my Oracle database? 11 98
Processing of multiple cursor 6 47
Can't Access My Database 57 66
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
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…
This video shows how to recover a database from a user managed backup
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

772 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