I need to run the method in Java every time a specific Oracle database table is updated (any kinds of updates, including records, additions and changes to records).
What is the most efficient way to βqueryβ a table for changes with Java, which has good performance and does not put too much pressure on the database?
Unfortunately, I have many limitations:
- I cannot create additional tables, triggers, stored procedures, etc., because I do not have control over the administration / design of the database.
- I would rather avoid the Oracle Change Notification , as suggested in post , as it seems to include C / JNI.
- Just counting records is not good enough, as I can skip the changes and add / remove at the same time.
- a delay of up to 30/60 seconds between the actual change and the notification is permissible.
- The tables that I want to track usually have 100k + records (about 1 m +), so I donβt think pulling all the tables is an option (in terms of database load / performance).
source share