Solved

How much new changes are generated daily in a database.

Posted on 2013-11-06
9
324 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
Comment Utility
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
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 1

Author Comment

by:joe_echavarria
Comment Utility
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
Comment Utility
Ok, now i understand.   With archive logs we can not mesasure the amount of data because of the example u gave.
0
 
LVL 36

Expert Comment

by:Geert Gruwez
Comment Utility
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 36

Expert Comment

by:Geert Gruwez
Comment Utility
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
Comment Utility
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.

Join & Write a Comment

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
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 explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now