• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

need advise on db cleanup

 
Jim Babcock
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've got several tables that are essentially log files who's data is irrelevant after a week or two, and I'm wondering if there is a "best practice" for cleaning up databases? I'm using a lot of Perl at the moment and am leaning toward throwing a script in cron that uses DBI to delete any thing older than X days or weeks old. But I wondered if there was some facility in mysql or something I was missing that was more appropriate.

Thanks,

JimB
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jim Babcock:
I've got several tables that are essentially log files who's data is irrelevant after a week or two, and I'm wondering if there is a "best practice" for cleaning up databases? I'm using a lot of Perl at the moment and am leaning toward throwing a script in cron that uses DBI to delete any thing older than X days or weeks old. But I wondered if there was some facility in mysql or something I was missing that was more appropriate.

Thanks,

JimB


I don't believe MySQL has anything that would do this for you. MaxDB probably would as well as MS SQL Server. I think the cron job is an excellent idea myself.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65342
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the cron job is an excellent idea myself.


cron is indeed your friend. I rely heavily upon it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic