• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Audit table purge logic

 
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have task for Purging the data from database. This data is from Audit table, hence it does not have any relationship with the other tables. There are around 40 audit tables and it has timestamp. I want to derive best strategy to purge the data. I have idea as below, please let me know your opinion.

My Strategy:
1. I will write a Store procedure which will delete data from all 40 tables which are more than 1 months old.
2. I will write a java program to call SP and inturn Java program will be called by scheduler.
3. The Schedule will trigger at 15 of each month.

What is your opinion on the same, is my steps can be improved in tuns of performance.

Thank you !
 
Ranch Hand
Posts: 262
4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have 40 audit tables. Purging audit data may take a considerable amount of time. So you might want to have more than a single job that can run in parallel.

Is 15th of every month also the time when the database is not going to be very busy? That might also be a thing to consider.
 
Rahul Ba
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Heena, It make sense !
 
A wop bop a lu bop a womp bam boom! Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic